Skip to content

Commit 1c3d71a

Browse files
committed
Merge pull request #52 from dblock/grape-version-matrix
Confirmed support for grape 0.14.x through 0.16.x and grape-swagger 0.11.x through 0.20.x.
2 parents b8b5981 + b184ca7 commit 1c3d71a

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ rvm:
1717
env:
1818
- GRAPE_SWAGGER_VERSION=0.8.0
1919
- GRAPE_SWAGGER_VERSION=0.9.0
20+
- GRAPE_SWAGGER_VERSION=0.11.0
21+
- GRAPE_SWAGGER_VERSION=0.20.2
2022
- GRAPE_SWAGGER_VERSION=HEAD
2123

2224
matrix:

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
### 0.2.1 (Next)
22

3-
* Your contribution here.
43
* Fixed header-based authorization - [@davidbrewer](https://github.com/davidbrewer).
54
* Support Swagger-UI validatorUrl option - [@davidbrewer](https://github.com/davidbrewer).
5+
* Support for grape 0.14.x through 0.16.x and grape-swagger 0.11.x through 0.20.x - [@dblock](https://github.com/dblock).
6+
* Your contribution here.
67

78
### 0.2.0 (February 23, 2016)
89

Gemfile

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ when '0.8.0'
1111
when '0.9.0'
1212
gem 'grape', '0.10.1'
1313
gem 'grape-swagger', '0.9.0'
14+
when '0.11.0'
15+
gem 'grape', '0.16.2'
16+
gem 'grape-swagger', '0.11.0'
17+
when '0.20.2'
18+
gem 'grape', '0.14.0'
19+
gem 'grape-swagger', '0.20.2'
1420
else
1521
gem 'grape-swagger', version
1622
end

spec/features/swagger_spec.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
expect(headers.select { |key| key.to_s.match(/^header/) }).not_to be_blank
2828
expect(headers.fetch('header_0', {}).fetch('name', {})).to eq GrapeSwaggerRails.options.headers.keys.first
2929
find('#endpointListTogger_headers', visible: true).click
30-
first('a[href="#!/headers/GET_api_headers_format"]', visible: true).click
30+
first('span[class="http_method"] a', visible: true).click
3131
click_button 'Try it out!'
3232
expect(page).to have_css 'span.attribute', text: 'X-Test-Header'
3333
expect(page).to have_css 'span.string', text: 'Test Value'
3434
end
3535
it 'supports multiple headers' do
3636
find('#endpointListTogger_headers', visible: true).click
37-
first('a[href="#!/headers/GET_api_headers_format"]', visible: true).click
37+
first('span[class="http_method"] a', visible: true).click
3838
click_button 'Try it out!'
3939
expect(page).to have_css 'span.attribute', text: 'X-Test-Header'
4040
expect(page).to have_css 'span.string', text: 'Test Value'
@@ -53,7 +53,7 @@
5353
page.execute_script("$('#input_apiKey').val('username:password')")
5454
page.execute_script("$('#input_apiKey').trigger('change')")
5555
find('#endpointListTogger_headers', visible: true).click
56-
first('a[href="#!/headers/GET_api_headers_format"]', visible: true).click
56+
first('span[class="http_method"] a', visible: true).click
5757
click_button 'Try it out!'
5858
expect(page).to have_css 'span.attribute', text: 'Authorization'
5959
expect(page).to have_css 'span.string', text: "Basic #{Base64.encode64('username:password').strip}"
@@ -70,7 +70,7 @@
7070
page.execute_script("$('#input_apiKey').val('token')")
7171
page.execute_script("$('#input_apiKey').trigger('change')")
7272
find('#endpointListTogger_headers', visible: true).click
73-
first('a[href="#!/headers/GET_api_headers_format"]', visible: true).click
73+
first('span[class="http_method"] a', visible: true).click
7474
click_button 'Try it out!'
7575
expect(page).to have_css 'span.attribute', text: 'Authorization'
7676
expect(page).to have_css 'span.string', text: 'Bearer token'
@@ -86,7 +86,7 @@
8686
page.execute_script("$('#input_apiKey').val('dummy')")
8787
page.execute_script("$('#input_apiKey').trigger('change')")
8888
find('#endpointListTogger_params', visible: true).click
89-
first('a[href="#!/params/GET_api_params_format"]', visible: true).click
89+
first('span[class="http_method"] a', visible: true).click
9090
click_button 'Try it out!'
9191
expect(page).to have_css 'span.attribute', text: 'api_token'
9292
expect(page).to have_css 'span.string', text: 'dummy'

0 commit comments

Comments
 (0)