Skip to content

Commit 65b0e00

Browse files
authored
Add test matrix for multiple Ruby versions & update dependencies (#107)
* Add test matrix * Run Danger on PR * Add Danger fetch-depth * Add ToC * Update CHANGELOG * Update ToC * Update changelog so bot is happy
1 parent 6a43c13 commit 65b0e00

File tree

7 files changed

+67
-58
lines changed

7 files changed

+67
-58
lines changed

.github/workflows/danger.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
name: Danger
2-
on:
3-
push:
4-
branches:
5-
- master
6-
pull_request:
2+
on: [pull_request]
73
jobs:
84
lint:
95
runs-on: ubuntu-latest
106
steps:
117
- uses: actions/checkout@v3
8+
with:
9+
fetch-depth: 0
1210
- name: Set up Ruby
1311
uses: ruby/setup-ruby@v1
1412
with:
15-
ruby-version: "2.5.6"
13+
ruby-version: "2.7"
1614
bundler-cache: true
1715
- name: Run Danger
1816
run: |

.github/workflows/test.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Tests
2-
on:
2+
on:
33
push:
44
branches:
55
- master
@@ -12,15 +12,15 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
grape-swagger:
15-
- { version: "0.8.0", experimental: false }
16-
- { version: "0.9.0", experimental: false }
17-
- { version: "0.11.0", experimental: false }
18-
- { version: "0.20.2", experimental: false }
19-
- { version: "0.33.0", experimental: false }
15+
- { version: "1.6.0", experimental: false }
2016
- { version: "HEAD", experimental: true }
2117
ruby:
22-
- { version: "2.5.6", experimental: false }
18+
- { version: "2.7", experimental: false }
19+
- { version: "3.0", experimental: false }
20+
- { version: "3.1", experimental: false }
21+
- { version: "3.2", experimental: false }
2322
- { version: "ruby-head", experimental: true }
23+
- { version: "jruby-9.4.2", experimental: false }
2424
- { version: "jruby-head", experimental: true }
2525
env:
2626
GRAPE_SWAGGER_VERSION: ${{ matrix.grape-swagger.version }}
@@ -34,10 +34,10 @@ jobs:
3434
- name: Setup Firefox
3535
uses: browser-actions/setup-firefox@v1
3636
with:
37-
firefox-version: "54.0"
37+
firefox-version: "111.0.1"
3838
- uses: browser-actions/setup-geckodriver@latest
3939
with:
40-
geckodriver-version: "0.18.0"
41-
- uses: GabrielBB/xvfb-action@v1
40+
geckodriver-version: "0.32.2"
41+
- uses: coactions/setup-xvfb@v1
4242
with:
4343
run: bundle exec rake spec

CHANGELOG.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
### Next Release
22

3+
* [#107](https://github.com/ruby-grape/grape-swagger-rails/pull/107): Add test matrix for multiple ruby versions - [@duffn](https://github.com/duffn).
34
* [#105](https://github.com/ruby-grape/grape-swagger-rails/pull/105): Migrate to GitHub Actions - [@duffn](https://github.com/duffn).
45
* [#98](https://github.com/ruby-grape/grape-swagger-rails/pull/98): Fix: test against Rails 6 - [@dblock](https://github.com/dblock).
56

67
* Your contribution here.
78

8-
### 0.3.1 (February 16, 2019)
9+
### 0.3.1 (2019/02/16)
910

1011
* [#82](https://github.com/ruby-grape/grape-swagger-rails/pull/82): Fixed api_key_default_value - [@konto-andrzeja](https://github.com/konto-andrzeja).
1112
* [#84](https://github.com/ruby-grape/grape-swagger-rails/pull/84): Added the token api_auth type - [@Jack12816](https://github.com/Jack12816).
1213

13-
### 0.3.0 (September 22, 2016)
14+
### 0.3.0 (2016/09/22)
1415

1516
* [#70](https://github.com/ruby-grape/grape-swagger-rails/pull/70): Rails 5 support - [@serggl](https://github.com/serggl).
1617
* [#68](https://github.com/ruby-grape/grape-swagger-rails/pull/68): Added danger, PR linter - [@dblock](https://github.com/dblock).
1718

18-
### 0.2.2 (July 13, 2016)
19+
### 0.2.2 (2016/07/13)
1920

2021
* [#57](https://github.com/ruby-grape/grape-swagger-rails/pull/57): Support Swagger-UI supportedSubmitMethods option - [@ShadowWrathOogles](https://github.com/ShadowWrathOogles).
2122
* [#61](https://github.com/ruby-grape/grape-swagger-rails/pull/61): Removed grape and grape-swagger from required dependencies - [@aschuster3](https://github.com/aschuster3).
2223

23-
### 0.2.1 (May 21, 2016)
24+
### 0.2.1 (2016/05/21)
2425

2526
* Fixed header-based authorization - [@davidbrewer](https://github.com/davidbrewer).
2627
* Support Swagger-UI validatorUrl option - [@davidbrewer](https://github.com/davidbrewer).
2728
* 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).
2829
* [#55](https://github.com/ruby-grape/grape-swagger-rails/pull/55): Update Swagger-UI assets and add ability to hide input boxes - [@aschuster3](https://github.com/aschuster3).
2930

30-
### 0.2.0 (February 23, 2016)
31+
### 0.2.0 (2016/02/23)
3132

3233
* [#6](https://github.com/ruby-grape/grape-swagger-rails/pull/6): Fix: support multiple predefined headers - [@Tyr0](https://github.com/tyr0).
3334
* Upgraded swagger-ui to v2.1.1 - [@dblock](https://github.com/dblock).
@@ -38,11 +39,11 @@
3839
* [#39](https://github.com/ruby-grape/grape-swagger-rails/pull/39): Support CSS media queries - [@alexagranov](https://github.com/alexagranov).
3940
* [#42](https://github.com/ruby-grape/grape-swagger-rails/pull/42): Headers added on swaggerUi initialization (before swaggerUi.load() call) - [@sedx](https://github.com/sedx).
4041

41-
### 0.1.0 (February 5, 2015)
42+
### 0.1.0 (2015/02/05)
4243

4344
* [#41](https://github.com/BrandyMint/grape-swagger-rails/pull/41): Compatibility with grape-swagger 0.8.0 and 0.9.0 - [@dblock](https://github.com/dblock).
4445

45-
### 0.0.10 (September 30, 2014)
46+
### 0.0.10 (2014/09/30)
4647

4748
* [#33](https://github.com/BrandyMint/grape-swagger-rails/pull/33): Fix: make the dummy app runnable - [@dblock](https://github.com/dblock).
4849
* [#33](https://github.com/BrandyMint/grape-swagger-rails/pull/33): Fix: headers default to nil - [@dblock](https://github.com/dblock).
@@ -54,24 +55,24 @@
5455
* [#14](https://github.com/BrandyMint/grape-swagger-rails/pull/14): Added app_name to configure title of the app - [@ghilead](https://github.com/ghilead).
5556
* [#12](https://github.com/BrandyMint/grape-swagger-rails/pull/12): Fix: SwaggerUI url is combined with appUrl - [@ghilead](https://github.com/ghilead).
5657

57-
### 0.0.8 (February 6, 2014)
58+
### 0.0.8 (2014/02/06)
5859

5960
* [#11](https://github.com/BrandyMint/grape-swagger-rails/pull/11): Fixed image loading - [@bitboxer](https://github.com/bitboxer).
6061

61-
### 0.0.7 (February 5, 2014)
62+
### 0.0.7 (2014/02/05)
6263

6364
* [#7](https://github.com/BrandyMint/grape-swagger-rails/pull/7): Updated to Swagger-UI 2.0.3 - [@joelvh](https://github.com/joelvh).
6465
* [#6](https://github.com/BrandyMint/grape-swagger-rails/pull/6): Added appName and appUrl configuration options - [@swistaczek](https://github.com/swistaczek).
6566

66-
### 0.0.4 (July 16, 2013)
67+
### 0.0.4 (2013/07/16)
6768

6869
* Configure discoveryUrl from Rails - [@dapi](https://github.com/dapi).
6970
* Added default support for all HTTP methods - [@mtavaresOS](https://github.com/mtavaresOS).
7071

71-
### 0.0.3 (May 24, 2013)
72+
### 0.0.3 (2013/05/24)
7273

7374
* Converted to Rails Engine - [@unloved](https://github.com/unloved).
7475

75-
### 0.0.1 (April 5, 2013)
76+
### 0.0.1 (2013/04/05)
7677

7778
* Initial public release - [@radanisk](https://github.com/Radanisk).

Gemfile

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,32 @@ source 'https://rubygems.org'
22

33
gemspec
44

5-
case version = ENV['GRAPE_SWAGGER_VERSION'] || '~> 0.9.0'
5+
case version = ENV['GRAPE_SWAGGER_VERSION'] || '~> 1.6.0'
66
when 'HEAD'
77
gem 'grape-swagger', github: 'ruby-grape/grape-swagger'
8-
when '0.8.0'
9-
gem 'grape', '0.9.0'
10-
gem 'grape-swagger', '0.8.0'
11-
when '0.9.0'
12-
gem 'grape', '0.10.1'
13-
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'
208
else
219
gem 'grape-swagger', version
10+
gem 'grape', '>= 1.3.0'
2211
end
2312

2413
group :development, :test do
25-
gem 'ruby-grape-danger', '~> 0.2.0', require: false
26-
gem 'rake'
27-
gem 'rspec-rails'
2814
gem 'capybara'
29-
gem 'selenium-webdriver'
30-
gem 'sass'
31-
gem 'sass-rails'
32-
gem 'uglifier'
3315
gem 'coffee-rails'
34-
gem 'jquery-rails'
3516
gem 'grape-swagger-ui'
36-
gem 'sprockets'
37-
gem 'rack', '~> 1.6'
17+
gem 'jquery-rails'
18+
gem 'mime-types'
19+
gem 'nokogiri'
20+
gem 'rack', '< 3.0'
3821
gem 'rack-cors'
39-
gem 'rubocop', '0.77.0'
40-
gem 'mime-types', '< 3.0'
4122
gem 'rack-no_animations'
42-
gem 'nokogiri'
23+
gem 'rake'
24+
gem 'rspec-rails'
25+
gem 'rubocop', '0.77.0'
26+
gem 'ruby-grape-danger', '~> 0.2.0', require: false
27+
gem 'sass'
28+
gem 'sass-rails'
29+
gem 'selenium-webdriver'
30+
gem 'sprockets'
31+
gem 'uglifier'
32+
gem 'webrick'
4333
end

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@
66

77
Swagger UI as Rails Engine for grape-swagger gem.
88

9+
# Table of Contents
10+
11+
- [Installation](#installation)
12+
- [Compatibility](#compatibility)
13+
- [Usage](#usage)
14+
- [Basic Authentication](#basic-authentication)
15+
- [Pre-fill Authentication](#pre-fill-authentication)
16+
- [API Token Authentication](#api-token-authentication)
17+
- [Swagger UI Authorization](#swagger-ui-authorization)
18+
- [Integration with DoorKeeper](#integration-with-doorkeeper)
19+
- [Hiding the API or Authorization text boxes](#hiding-the-api-or-authorization-text-boxes)
20+
- [Updating Swagger UI from Dist](#updating-swagger-ui-from-dist)
21+
- [Enabling in a Rails-API Project](#enabling-in-a-rails-api-project)
22+
- [Enabling in Rails 6 (Sprokets 5)](#enabling-in-rails-6-sprokets-5)
23+
- [Contributors](#contributors)
24+
- [Contributing](#contributing)
25+
- [License](#license)
26+
927
## Installation
1028

1129
Add this line to your application's Gemfile:

grape-swagger-rails.gemspec

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# coding: utf-8
2-
lib = File.expand_path('../lib', __FILE__)
1+
lib = File.expand_path('lib', __dir__)
32
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
43
require 'grape-swagger-rails/version'
54

@@ -14,7 +13,7 @@ Gem::Specification.new do |spec|
1413
spec.license = 'MIT'
1514
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
1615
spec.test_files = `git ls-files spec`.split($INPUT_RECORD_SEPARATOR)
17-
spec.require_paths = %w(lib)
16+
spec.require_paths = %w[lib]
1817

19-
spec.add_dependency 'railties', '>= 3.2.12'
18+
spec.add_dependency 'railties', '>= 6.0.6.1'
2019
end
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ActiveSupport::Inflector.inflections(:en) do |inflect|
2+
inflect.acronym 'API'
3+
end

0 commit comments

Comments
 (0)