grape-swagger-rails 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2fbbe31ef3358e338372a0e2ad589acff22eec986accfaf7169a5af2357701d6
4
- data.tar.gz: 6b9672241d274f8b350836b3877d0bd79579d6b499ecf963f66b3aeae4c8303c
3
+ metadata.gz: de0a074a12ae467fe6e2ee5941f8efd906d5350eee5e39edf2503916c6be9c5b
4
+ data.tar.gz: 727ff6e73e22a466b559e848971aca21cfabfc6cda38aaedcf2d1e19e7d78fb8
5
5
  SHA512:
6
- metadata.gz: 6e9d7ae03cf73df5422183cc1485fb6cc915900fc5cfeaafab6b494491238199ae99094feecf4be65c9a794b93cad21cc7cb6e01c09bc6ae55fc66368ce1f116
7
- data.tar.gz: 4e5b3c98c11a2316fd2712ee612cabd009ea3baf0e9bdaeacca8a0d497aee8879e27afbd3dc1b102ea83eb0abae7e5d8ecb04b89bb5750b7dcdf591cf2fc1071
6
+ metadata.gz: 5e88a46e45e9809d1b1870a9efa9e204b918099e4cc070bbb73d5edc4261fa22939cf1b0fb3ee583c0c7a91f88d5fa4e9f848508635eb3098ff2e93453f13439
7
+ data.tar.gz: f087a0aa5ce0479b9cff260c30df08cca47d426b5bf390cbc9d54311051f9767da873378542181b5ee640b15b7abe40990fdb79ec4e498943754016465b2585c
@@ -0,0 +1,19 @@
1
+ name: Danger
2
+ on: [pull_request]
3
+ jobs:
4
+ lint:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/checkout@v3
8
+ with:
9
+ fetch-depth: 0
10
+ - name: Set up Ruby
11
+ uses: ruby/setup-ruby@v1
12
+ with:
13
+ ruby-version: "2.7"
14
+ bundler-cache: true
15
+ - name: Run Danger
16
+ run: |
17
+ # the token is public, has public_repo scope and belongs to the grape-bot user owned by @dblock, this is ok
18
+ TOKEN=$(echo -n Z2hwX2lYb0dPNXNyejYzOFJyaTV3QUxUdkNiS1dtblFwZTFuRXpmMwo= | base64 --decode)
19
+ DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
@@ -0,0 +1,43 @@
1
+ name: Tests
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ pull_request:
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ continue-on-error: ${{ (matrix.grape-swagger.experimental) || (matrix.ruby.experimental) }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ grape-swagger:
15
+ - { version: "1.6.0", experimental: false }
16
+ - { version: "HEAD", experimental: true }
17
+ ruby:
18
+ - { version: "2.7", experimental: false }
19
+ - { version: "3.0", experimental: false }
20
+ - { version: "3.1", experimental: false }
21
+ - { version: "3.2", experimental: false }
22
+ - { version: "ruby-head", experimental: true }
23
+ - { version: "jruby-9.4.2", experimental: false }
24
+ - { version: "jruby-head", experimental: true }
25
+ env:
26
+ GRAPE_SWAGGER_VERSION: ${{ matrix.grape-swagger.version }}
27
+ steps:
28
+ - uses: actions/checkout@v3
29
+ - name: Set up Ruby
30
+ uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: ${{ matrix.ruby.version }}
33
+ bundler-cache: true
34
+ - name: Setup Firefox
35
+ uses: browser-actions/setup-firefox@v1
36
+ with:
37
+ firefox-version: "111.0.1"
38
+ - uses: browser-actions/setup-geckodriver@latest
39
+ with:
40
+ geckodriver-version: "0.32.2"
41
+ - uses: coactions/setup-xvfb@v1
42
+ with:
43
+ run: bundle exec rake spec
data/.rubocop_todo.yml CHANGED
@@ -1,11 +1,54 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2015-08-19 12:23:54 -0400 using RuboCop version 0.38.0.
3
+ # on 2019-12-08 10:39:57 -0500 using RuboCop version 0.77.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Offense count: 8
10
+ # Configuration parameters: Include.
11
+ # Include: **/*.gemfile, **/Gemfile, **/gems.rb
12
+ Bundler/DuplicatedGem:
13
+ Exclude:
14
+ - 'Gemfile'
15
+
16
+ # Offense count: 8
17
+ # Cop supports --auto-correct.
18
+ # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
19
+ # Include: **/*.gemfile, **/Gemfile, **/gems.rb
20
+ Bundler/OrderedGems:
21
+ Exclude:
22
+ - 'Gemfile'
23
+
24
+ # Offense count: 1
25
+ # Cop supports --auto-correct.
26
+ Layout/EmptyLineAfterGuardClause:
27
+ Exclude:
28
+ - 'app/controllers/grape_swagger_rails/application_controller.rb'
29
+
30
+ # Offense count: 1
31
+ # Cop supports --auto-correct.
32
+ Layout/EmptyLineAfterMagicComment:
33
+ Exclude:
34
+ - 'grape-swagger-rails.gemspec'
35
+
36
+ # Offense count: 1
37
+ # Cop supports --auto-correct.
38
+ Layout/EmptyLinesAroundArguments:
39
+ Exclude:
40
+ - 'lib/grape-swagger-rails.rb'
41
+
42
+ # Offense count: 12
43
+ # Cop supports --auto-correct.
44
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
45
+ # SupportedHashRocketStyles: key, separator, table
46
+ # SupportedColonStyles: key, separator, table
47
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
48
+ Layout/HashAlignment:
49
+ Exclude:
50
+ - 'lib/grape-swagger-rails.rb'
51
+
9
52
  # Offense count: 1
10
53
  Lint/AmbiguousRegexpLiteral:
11
54
  Exclude:
@@ -18,44 +61,119 @@ Lint/AssignmentInCondition:
18
61
  - 'spec/dummy/bin/spring'
19
62
 
20
63
  # Offense count: 2
21
- Lint/HandleExceptions:
64
+ # Cop supports --auto-correct.
65
+ Lint/ScriptPermission:
66
+ Exclude:
67
+ - 'Rakefile'
68
+ - 'spec/dummy/Rakefile'
69
+
70
+ # Offense count: 2
71
+ # Configuration parameters: AllowComments.
72
+ Lint/SuppressedException:
22
73
  Exclude:
23
74
  - 'spec/dummy/bin/rails'
24
75
  - 'spec/dummy/bin/rake'
25
76
 
26
- # Offense count: 31
27
- # Configuration parameters: AllowURI, URISchemes.
28
- Metrics/LineLength:
29
- Max: 129
77
+ # Offense count: 9
78
+ # Configuration parameters: CountComments, ExcludedMethods.
79
+ # ExcludedMethods: refine
80
+ Metrics/BlockLength:
81
+ Max: 282
82
+
83
+ # Offense count: 2
84
+ # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
85
+ # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
86
+ Naming/FileName:
87
+ Exclude:
88
+ - 'lib/grape-swagger-rails.rb'
89
+ - 'spec/features/grape-swagger-rails_spec.rb'
30
90
 
31
91
  # Offense count: 2
32
92
  # Cop supports --auto-correct.
33
- # Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
93
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
94
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
95
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
96
+ # FunctionalMethods: let, let!, subject, watch
97
+ # IgnoredMethods: lambda, proc, it
34
98
  Style/BlockDelimiters:
35
- Enabled: false
99
+ Exclude:
100
+ - 'lib/tasks/swagger_ui.rake'
36
101
 
37
- # Offense count: 9
102
+ # Offense count: 4
38
103
  Style/Documentation:
39
104
  Exclude:
105
+ - 'spec/**/*'
106
+ - 'test/**/*'
40
107
  - 'app/controllers/grape_swagger_rails/application_controller.rb'
41
108
  - 'lib/grape-swagger-rails.rb'
42
109
  - 'lib/grape-swagger-rails/engine.rb'
43
- - 'lib/grape-swagger-rails/version.rb'
44
- - 'spec/dummy/app/api/api.rb'
45
- - 'spec/dummy/app/controllers/application_controller.rb'
110
+
111
+ # Offense count: 2
112
+ # Cop supports --auto-correct.
113
+ # Configuration parameters: EnforcedStyle.
114
+ # SupportedStyles: compact, expanded
115
+ Style/EmptyMethod:
116
+ Exclude:
117
+ - 'app/controllers/grape_swagger_rails/application_controller.rb'
46
118
  - 'spec/dummy/app/controllers/welcome_controller.rb'
119
+
120
+ # Offense count: 1
121
+ # Cop supports --auto-correct.
122
+ Style/Encoding:
123
+ Exclude:
124
+ - 'grape-swagger-rails.gemspec'
125
+
126
+ # Offense count: 14
127
+ # Cop supports --auto-correct.
128
+ Style/ExpandPathArguments:
129
+ Exclude:
130
+ - 'Rakefile'
131
+ - 'grape-swagger-rails.gemspec'
132
+ - 'lib/script/rails'
133
+ - 'lib/tasks/swagger_ui.rake'
134
+ - 'spec/dummy/Rakefile'
135
+ - 'spec/dummy/bin/bundle'
136
+ - 'spec/dummy/bin/rails'
137
+ - 'spec/dummy/bin/rake'
47
138
  - 'spec/dummy/config/application.rb'
139
+ - 'spec/dummy/config/boot.rb'
140
+ - 'spec/dummy/config/environment.rb'
141
+ - 'spec/spec_helper.rb'
48
142
 
49
- # Offense count: 2
50
- # Configuration parameters: Exclude.
51
- Style/FileName:
143
+ # Offense count: 37
144
+ # Cop supports --auto-correct.
145
+ # Configuration parameters: EnforcedStyle.
146
+ # SupportedStyles: always, never
147
+ Style/FrozenStringLiteralComment:
148
+ Enabled: false
149
+
150
+ # Offense count: 3
151
+ # Cop supports --auto-correct.
152
+ # Configuration parameters: PreferredDelimiters.
153
+ Style/PercentLiteralDelimiters:
52
154
  Exclude:
155
+ - 'grape-swagger-rails.gemspec'
53
156
  - 'lib/grape-swagger-rails.rb'
54
- - 'spec/features/grape-swagger-rails_spec.rb'
157
+ - 'spec/features/swagger_spec.rb'
55
158
 
56
159
  # Offense count: 1
57
160
  # Cop supports --auto-correct.
58
- # Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
161
+ # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
162
+ # SupportedStyles: slashes, percent_r, mixed
59
163
  Style/RegexpLiteral:
60
164
  Exclude:
61
165
  - 'lib/tasks/swagger_ui.rake'
166
+
167
+ # Offense count: 2
168
+ # Cop supports --auto-correct.
169
+ # Configuration parameters: MinSize.
170
+ # SupportedStyles: percent, brackets
171
+ Style/SymbolArray:
172
+ EnforcedStyle: brackets
173
+
174
+ # Offense count: 48
175
+ # Cop supports --auto-correct.
176
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
177
+ # URISchemes: http, https
178
+ Metrics/LineLength:
179
+ Max: 129
data/CHANGELOG.md CHANGED
@@ -1,30 +1,32 @@
1
- ### Next Release
1
+ ### 0.4.0 (2023/03/28)
2
2
 
3
- * Your contribution here.
3
+ * [#107](https://github.com/ruby-grape/grape-swagger-rails/pull/107): Add test matrix for multiple ruby versions - [@duffn](https://github.com/duffn).
4
+ * [#105](https://github.com/ruby-grape/grape-swagger-rails/pull/105): Migrate to GitHub Actions - [@duffn](https://github.com/duffn).
5
+ * [#98](https://github.com/ruby-grape/grape-swagger-rails/pull/98): Fix: test against Rails 6 - [@dblock](https://github.com/dblock).
4
6
 
5
- ### 0.3.1 (February 16, 2019)
7
+ ### 0.3.1 (2019/02/16)
6
8
 
7
9
  * [#82](https://github.com/ruby-grape/grape-swagger-rails/pull/82): Fixed api_key_default_value - [@konto-andrzeja](https://github.com/konto-andrzeja).
8
10
  * [#84](https://github.com/ruby-grape/grape-swagger-rails/pull/84): Added the token api_auth type - [@Jack12816](https://github.com/Jack12816).
9
11
 
10
- ### 0.3.0 (September 22, 2016)
12
+ ### 0.3.0 (2016/09/22)
11
13
 
12
14
  * [#70](https://github.com/ruby-grape/grape-swagger-rails/pull/70): Rails 5 support - [@serggl](https://github.com/serggl).
13
15
  * [#68](https://github.com/ruby-grape/grape-swagger-rails/pull/68): Added danger, PR linter - [@dblock](https://github.com/dblock).
14
16
 
15
- ### 0.2.2 (July 13, 2016)
17
+ ### 0.2.2 (2016/07/13)
16
18
 
17
19
  * [#57](https://github.com/ruby-grape/grape-swagger-rails/pull/57): Support Swagger-UI supportedSubmitMethods option - [@ShadowWrathOogles](https://github.com/ShadowWrathOogles).
18
20
  * [#61](https://github.com/ruby-grape/grape-swagger-rails/pull/61): Removed grape and grape-swagger from required dependencies - [@aschuster3](https://github.com/aschuster3).
19
21
 
20
- ### 0.2.1 (May 21, 2016)
22
+ ### 0.2.1 (2016/05/21)
21
23
 
22
24
  * Fixed header-based authorization - [@davidbrewer](https://github.com/davidbrewer).
23
25
  * Support Swagger-UI validatorUrl option - [@davidbrewer](https://github.com/davidbrewer).
24
26
  * 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).
25
27
  * [#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).
26
28
 
27
- ### 0.2.0 (February 23, 2016)
29
+ ### 0.2.0 (2016/02/23)
28
30
 
29
31
  * [#6](https://github.com/ruby-grape/grape-swagger-rails/pull/6): Fix: support multiple predefined headers - [@Tyr0](https://github.com/tyr0).
30
32
  * Upgraded swagger-ui to v2.1.1 - [@dblock](https://github.com/dblock).
@@ -35,11 +37,11 @@
35
37
  * [#39](https://github.com/ruby-grape/grape-swagger-rails/pull/39): Support CSS media queries - [@alexagranov](https://github.com/alexagranov).
36
38
  * [#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).
37
39
 
38
- ### 0.1.0 (February 5, 2015)
40
+ ### 0.1.0 (2015/02/05)
39
41
 
40
42
  * [#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).
41
43
 
42
- ### 0.0.10 (September 30, 2014)
44
+ ### 0.0.10 (2014/09/30)
43
45
 
44
46
  * [#33](https://github.com/BrandyMint/grape-swagger-rails/pull/33): Fix: make the dummy app runnable - [@dblock](https://github.com/dblock).
45
47
  * [#33](https://github.com/BrandyMint/grape-swagger-rails/pull/33): Fix: headers default to nil - [@dblock](https://github.com/dblock).
@@ -51,24 +53,24 @@
51
53
  * [#14](https://github.com/BrandyMint/grape-swagger-rails/pull/14): Added app_name to configure title of the app - [@ghilead](https://github.com/ghilead).
52
54
  * [#12](https://github.com/BrandyMint/grape-swagger-rails/pull/12): Fix: SwaggerUI url is combined with appUrl - [@ghilead](https://github.com/ghilead).
53
55
 
54
- ### 0.0.8 (February 6, 2014)
56
+ ### 0.0.8 (2014/02/06)
55
57
 
56
58
  * [#11](https://github.com/BrandyMint/grape-swagger-rails/pull/11): Fixed image loading - [@bitboxer](https://github.com/bitboxer).
57
59
 
58
- ### 0.0.7 (February 5, 2014)
60
+ ### 0.0.7 (2014/02/05)
59
61
 
60
62
  * [#7](https://github.com/BrandyMint/grape-swagger-rails/pull/7): Updated to Swagger-UI 2.0.3 - [@joelvh](https://github.com/joelvh).
61
63
  * [#6](https://github.com/BrandyMint/grape-swagger-rails/pull/6): Added appName and appUrl configuration options - [@swistaczek](https://github.com/swistaczek).
62
64
 
63
- ### 0.0.4 (July 16, 2013)
65
+ ### 0.0.4 (2013/07/16)
64
66
 
65
67
  * Configure discoveryUrl from Rails - [@dapi](https://github.com/dapi).
66
68
  * Added default support for all HTTP methods - [@mtavaresOS](https://github.com/mtavaresOS).
67
69
 
68
- ### 0.0.3 (May 24, 2013)
70
+ ### 0.0.3 (2013/05/24)
69
71
 
70
72
  * Converted to Rails Engine - [@unloved](https://github.com/unloved).
71
73
 
72
- ### 0.0.1 (April 5, 2013)
74
+ ### 0.0.1 (2013/04/05)
73
75
 
74
76
  * Initial public release - [@radanisk](https://github.com/Radanisk).
data/Gemfile CHANGED
@@ -2,25 +2,32 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- case version = ENV['GRAPE_SWAGGER_VERSION'] || '~> 0.9.0'
5
+ case version = ENV['GRAPE_SWAGGER_VERSION'] || '~> 1.6.0'
6
6
  when 'HEAD'
7
- gem 'grape-swagger', github: 'tim-vandecasteele/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'
7
+ gem 'grape-swagger', github: 'ruby-grape/grape-swagger'
20
8
  else
21
9
  gem 'grape-swagger', version
10
+ gem 'grape', '>= 1.3.0'
22
11
  end
23
12
 
24
- group :test do
25
- gem 'ruby-grape-danger', '~> 0.1.0', require: false
13
+ group :development, :test do
14
+ gem 'capybara'
15
+ gem 'coffee-rails'
16
+ gem 'grape-swagger-ui'
17
+ gem 'jquery-rails'
18
+ gem 'mime-types'
19
+ gem 'nokogiri'
20
+ gem 'rack', '< 3.0'
21
+ gem 'rack-cors'
22
+ gem 'rack-no_animations'
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'
26
33
  end
data/README.md CHANGED
@@ -1,11 +1,29 @@
1
1
  # GrapeSwaggerRails
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/grape-swagger-rails.svg)](http://badge.fury.io/rb/grape-swagger-rails)
4
- [![Build Status](https://travis-ci.org/ruby-grape/grape-swagger-rails.svg)](https://travis-ci.org/ruby-grape/grape-swagger-rails)
4
+ [![Test](https://github.com/ruby-grape/grape-swagger-rails/workflows/test/badge.svg?branch=master)](https://github.com/ruby-grape/grape-swagger-rails/actions)
5
5
  [![Code Climate](https://codeclimate.com/github/ruby-grape/grape-swagger-rails/badges/gpa.svg)](https://codeclimate.com/github/ruby-grape/grape-swagger-rails)
6
6
 
7
7
  Swagger UI as Rails Engine for grape-swagger gem.
8
8
 
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
+
9
27
  ## Installation
10
28
 
11
29
  Add this line to your application's Gemfile:
@@ -221,6 +239,17 @@ Include CSS stylesheets in `app/assets/stylesheets/application.css`.
221
239
  */
222
240
  ```
223
241
 
242
+ ### Enabling in Rails 6 (Sprokets 5)
243
+
244
+ Rails 6 top-level targets are determined via `./app/assets/config/manifest.js`. Specify `grape-swagger-rails` asset files as follows.
245
+
246
+ ```javascript
247
+ //= link grape_swagger_rails/application.css
248
+ //= link grape_swagger_rails/application.js
249
+ ```
250
+
251
+ See [Upgrading Sprokets](https://github.com/rails/sprockets/blob/master/UPGRADING.md#manifestjs) for more information.
252
+
224
253
  ## Contributors
225
254
 
226
255
  * [unloved](https://github.com/unloved)
data/RELEASING.md CHANGED
@@ -11,12 +11,12 @@ bundle install
11
11
  rake
12
12
  ```
13
13
 
14
- Check that the last build succeeded in [Travis CI](https://travis-ci.org/ruby-grape/grape-swagger-rails) for all supported platforms.
14
+ Check that the last build succeeded in [GitHub Actions](https://github.com/ruby-grape/grape-swagger-rails/actions) for all supported platforms.
15
15
 
16
16
  Increment the version, modify [lib/grape-swagger-rails/version.rb](lib/grape-swagger-rails/version.rb).
17
17
 
18
- * Increment the third number if the release has bug fixes and/or very minor features, only (eg. change `0.1.0` to `0.1.1`).
19
- * Increment the second number if the release contains major features or breaking API changes (eg. change `0.1.0` to `0.2.0`).
18
+ * Increment the third number if the release has bug fixes and/or very minor features, only (eg. change `0.1.0` to `0.1.1`).
19
+ * Increment the second number if the release contains major features or breaking API changes (eg. change `0.1.0` to `0.2.0`).
20
20
 
21
21
  Change "Next Release" in [CHANGELOG.md](CHANGELOG.md) to the new version.
22
22
 
@@ -50,8 +50,7 @@ Pushed grape-swagger-rails 0.1.1 to rubygems.org.
50
50
  Add the next release to [CHANGELOG.md](CHANGELOG.md).
51
51
 
52
52
  ```
53
- Next Release
54
- ============
53
+ ### Next Release
55
54
 
56
55
  * Your contribution here.
57
56
  ```
@@ -1,5 +1,4 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'grape-swagger-rails/version'
5
4
 
@@ -14,28 +13,7 @@ Gem::Specification.new do |spec|
14
13
  spec.license = 'MIT'
15
14
  spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
16
15
  spec.test_files = `git ls-files spec`.split($INPUT_RECORD_SEPARATOR)
17
- spec.require_paths = %w(lib)
16
+ spec.require_paths = %w[lib]
18
17
 
19
- spec.add_dependency 'railties', '>= 3.2.12'
20
-
21
- spec.add_development_dependency 'bundler', '~> 1.15'
22
- spec.add_development_dependency 'rake'
23
- spec.add_development_dependency 'git'
24
- spec.add_development_dependency 'rspec-rails'
25
- spec.add_development_dependency 'capybara'
26
- spec.add_development_dependency 'grape'
27
- spec.add_development_dependency 'grape-swagger', '>= 0.7.2'
28
- spec.add_development_dependency 'selenium-webdriver'
29
- spec.add_development_dependency 'sass-rails'
30
- spec.add_development_dependency 'uglifier'
31
- spec.add_development_dependency 'coffee-rails'
32
- spec.add_development_dependency 'jquery-rails'
33
- spec.add_development_dependency 'grape-swagger-ui'
34
- spec.add_development_dependency 'sprockets'
35
- spec.add_development_dependency 'rack', '~> 1.6'
36
- spec.add_development_dependency 'rack-cors'
37
- spec.add_development_dependency 'rubocop', '0.38.0'
38
- spec.add_development_dependency 'mime-types', '< 3.0'
39
- spec.add_development_dependency 'rack-no_animations'
40
- spec.add_development_dependency 'nokogiri', '< 1.7.0'
18
+ spec.add_dependency 'railties', '>= 6.0.6.1'
41
19
  end
@@ -1,3 +1,3 @@
1
1
  module GrapeSwaggerRails
2
- VERSION = '0.3.1'.freeze
2
+ VERSION = '0.4.0'.freeze
3
3
  end
@@ -0,0 +1,4 @@
1
+ //= link application.js
2
+ //= link application.css
3
+ //= link grape_swagger_rails/application.css
4
+ //= link grape_swagger_rails/application.js
@@ -0,0 +1,3 @@
1
+ ActiveSupport::Inflector.inflections(:en) do |inflect|
2
+ inflect.acronym 'API'
3
+ end
@@ -3,3 +3,4 @@ require 'capybara/rails'
3
3
 
4
4
  Capybara.default_driver = :selenium
5
5
  Capybara.server_port = 3000
6
+ Capybara.server = :webrick
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-swagger-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Logunov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-16 00:00:00.000000000 Z
11
+ date: 2023-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -16,294 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.2.12
19
+ version: 6.0.6.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 3.2.12
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.15'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.15'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: git
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec-rails
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: capybara
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: grape
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: grape-swagger
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: 0.7.2
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: 0.7.2
125
- - !ruby/object:Gem::Dependency
126
- name: selenium-webdriver
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: sass-rails
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: uglifier
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: coffee-rails
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
- - !ruby/object:Gem::Dependency
182
- name: jquery-rails
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: '0'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- version: '0'
195
- - !ruby/object:Gem::Dependency
196
- name: grape-swagger-ui
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - ">="
200
- - !ruby/object:Gem::Version
201
- version: '0'
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - ">="
207
- - !ruby/object:Gem::Version
208
- version: '0'
209
- - !ruby/object:Gem::Dependency
210
- name: sprockets
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - ">="
214
- - !ruby/object:Gem::Version
215
- version: '0'
216
- type: :development
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - ">="
221
- - !ruby/object:Gem::Version
222
- version: '0'
223
- - !ruby/object:Gem::Dependency
224
- name: rack
225
- requirement: !ruby/object:Gem::Requirement
226
- requirements:
227
- - - "~>"
228
- - !ruby/object:Gem::Version
229
- version: '1.6'
230
- type: :development
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- requirements:
234
- - - "~>"
235
- - !ruby/object:Gem::Version
236
- version: '1.6'
237
- - !ruby/object:Gem::Dependency
238
- name: rack-cors
239
- requirement: !ruby/object:Gem::Requirement
240
- requirements:
241
- - - ">="
242
- - !ruby/object:Gem::Version
243
- version: '0'
244
- type: :development
245
- prerelease: false
246
- version_requirements: !ruby/object:Gem::Requirement
247
- requirements:
248
- - - ">="
249
- - !ruby/object:Gem::Version
250
- version: '0'
251
- - !ruby/object:Gem::Dependency
252
- name: rubocop
253
- requirement: !ruby/object:Gem::Requirement
254
- requirements:
255
- - - '='
256
- - !ruby/object:Gem::Version
257
- version: 0.38.0
258
- type: :development
259
- prerelease: false
260
- version_requirements: !ruby/object:Gem::Requirement
261
- requirements:
262
- - - '='
263
- - !ruby/object:Gem::Version
264
- version: 0.38.0
265
- - !ruby/object:Gem::Dependency
266
- name: mime-types
267
- requirement: !ruby/object:Gem::Requirement
268
- requirements:
269
- - - "<"
270
- - !ruby/object:Gem::Version
271
- version: '3.0'
272
- type: :development
273
- prerelease: false
274
- version_requirements: !ruby/object:Gem::Requirement
275
- requirements:
276
- - - "<"
277
- - !ruby/object:Gem::Version
278
- version: '3.0'
279
- - !ruby/object:Gem::Dependency
280
- name: rack-no_animations
281
- requirement: !ruby/object:Gem::Requirement
282
- requirements:
283
- - - ">="
284
- - !ruby/object:Gem::Version
285
- version: '0'
286
- type: :development
287
- prerelease: false
288
- version_requirements: !ruby/object:Gem::Requirement
289
- requirements:
290
- - - ">="
291
- - !ruby/object:Gem::Version
292
- version: '0'
293
- - !ruby/object:Gem::Dependency
294
- name: nokogiri
295
- requirement: !ruby/object:Gem::Requirement
296
- requirements:
297
- - - "<"
298
- - !ruby/object:Gem::Version
299
- version: 1.7.0
300
- type: :development
301
- prerelease: false
302
- version_requirements: !ruby/object:Gem::Requirement
303
- requirements:
304
- - - "<"
305
- - !ruby/object:Gem::Version
306
- version: 1.7.0
26
+ version: 6.0.6.1
307
27
  description: Swagger UI as Rails Engine for grape-swagger gem
308
28
  email:
309
29
  - unlovedru@gmail.com
@@ -311,12 +31,13 @@ executables: []
311
31
  extensions: []
312
32
  extra_rdoc_files: []
313
33
  files:
34
+ - ".github/workflows/danger.yml"
35
+ - ".github/workflows/test.yml"
314
36
  - ".gitignore"
315
37
  - ".rspec"
316
38
  - ".rubocop.yml"
317
39
  - ".rubocop_todo.yml"
318
40
  - ".ruby-gemset"
319
- - ".travis.yml"
320
41
  - CHANGELOG.md
321
42
  - CONTRIBUTING.md
322
43
  - Dangerfile
@@ -373,6 +94,7 @@ files:
373
94
  - spec/dummy/.gitignore
374
95
  - spec/dummy/Rakefile
375
96
  - spec/dummy/app/api/api.rb
97
+ - spec/dummy/app/assets/config/manifest.js
376
98
  - spec/dummy/app/assets/javascripts/application.js
377
99
  - spec/dummy/app/assets/stylesheets/application.css
378
100
  - spec/dummy/app/controllers/application_controller.rb
@@ -393,6 +115,7 @@ files:
393
115
  - spec/dummy/config/environments/test.rb
394
116
  - spec/dummy/config/initializers/assets.rb
395
117
  - spec/dummy/config/initializers/cookies_serializer.rb
118
+ - spec/dummy/config/initializers/inflections.rb
396
119
  - spec/dummy/config/initializers/session_store.rb
397
120
  - spec/dummy/config/initializers/swagger.rb
398
121
  - spec/dummy/config/routes.rb
@@ -415,7 +138,7 @@ homepage: https://github.com/ruby-grape/grape-swagger-rails
415
138
  licenses:
416
139
  - MIT
417
140
  metadata: {}
418
- post_install_message:
141
+ post_install_message:
419
142
  rdoc_options: []
420
143
  require_paths:
421
144
  - lib
@@ -430,14 +153,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
430
153
  - !ruby/object:Gem::Version
431
154
  version: '0'
432
155
  requirements: []
433
- rubygems_version: 3.0.2
434
- signing_key:
156
+ rubygems_version: 3.3.7
157
+ signing_key:
435
158
  specification_version: 4
436
159
  summary: Swagger UI as Rails Engine for grape-swagger gem
437
160
  test_files:
438
161
  - spec/dummy/.gitignore
439
162
  - spec/dummy/Rakefile
440
163
  - spec/dummy/app/api/api.rb
164
+ - spec/dummy/app/assets/config/manifest.js
441
165
  - spec/dummy/app/assets/javascripts/application.js
442
166
  - spec/dummy/app/assets/stylesheets/application.css
443
167
  - spec/dummy/app/controllers/application_controller.rb
@@ -458,6 +182,7 @@ test_files:
458
182
  - spec/dummy/config/environments/test.rb
459
183
  - spec/dummy/config/initializers/assets.rb
460
184
  - spec/dummy/config/initializers/cookies_serializer.rb
185
+ - spec/dummy/config/initializers/inflections.rb
461
186
  - spec/dummy/config/initializers/session_store.rb
462
187
  - spec/dummy/config/initializers/swagger.rb
463
188
  - spec/dummy/config/routes.rb
data/.travis.yml DELETED
@@ -1,53 +0,0 @@
1
- addons:
2
- firefox: 54.0
3
-
4
- services:
5
- - xvfb
6
-
7
- before_install:
8
- - wget https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-linux64.tar.gz
9
- - mkdir geckodriver
10
- - tar -xzf geckodriver-v0.18.0-linux64.tar.gz -C geckodriver
11
- - export PATH=$PATH:$PWD/geckodriver
12
- - gem install bundler -v'< 2'
13
-
14
- before_script:
15
- - "export DISPLAY=:99.0"
16
- - "sh -e /etc/init.d/xvfb start"
17
- - sleep 3 # give xvfb some time to start
18
-
19
- language: ruby
20
-
21
- cache: bundler
22
-
23
- matrix:
24
- include:
25
- - rvm: 2.3.1
26
- script:
27
- - bundle exec danger
28
- - rvm: 2.3.1
29
- env:
30
- - GRAPE_SWAGGER_VERSION=0.8.0
31
- - rvm: 2.3.1
32
- env:
33
- - GRAPE_SWAGGER_VERSION=0.9.0
34
- - rvm: 2.3.1
35
- env:
36
- - GRAPE_SWAGGER_VERSION=0.11.0
37
- - rvm: 2.3.1
38
- env:
39
- - GRAPE_SWAGGER_VERSION=0.20.2
40
- - rvm: 2.3.1
41
- env:
42
- - GRAPE_SWAGGER_VERSION=HEAD
43
- - rvm: 2.3.0
44
- - rvm: 2.2.5
45
- - rvm: 2.0.0
46
- - rvm: rbx-2
47
- - rvm: ruby-head
48
- - rvm: jruby-head
49
- allow_failures:
50
- - env: GRAPE_SWAGGER_VERSION=HEAD
51
- - rvm: ruby-head
52
- - rvm: jruby-head
53
- - rvm: rbx-2