grape-swagger-rails 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/danger.yml +19 -0
- data/.github/workflows/test.yml +43 -0
- data/.rubocop_todo.yml +135 -17
- data/CHANGELOG.md +22 -12
- data/Gemfile +23 -16
- data/README.md +46 -4
- data/RELEASING.md +5 -6
- data/app/views/grape_swagger_rails/application/index.html.erb +19 -5
- data/grape-swagger-rails.gemspec +3 -24
- data/lib/grape-swagger-rails/version.rb +1 -1
- data/lib/tasks/swagger_ui.rake +2 -2
- data/spec/dummy/app/assets/config/manifest.js +4 -0
- data/spec/dummy/config/initializers/inflections.rb +3 -0
- data/spec/features/swagger_spec.rb +34 -2
- data/spec/support/capybara.rb +1 -0
- metadata +14 -276
- data/.travis.yml +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: de0a074a12ae467fe6e2ee5941f8efd906d5350eee5e39edf2503916c6be9c5b
|
4
|
+
data.tar.gz: 727ff6e73e22a466b559e848971aca21cfabfc6cda38aaedcf2d1e19e7d78fb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
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:
|
27
|
-
# Configuration parameters:
|
28
|
-
|
29
|
-
|
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,
|
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
|
-
|
99
|
+
Exclude:
|
100
|
+
- 'lib/tasks/swagger_ui.rake'
|
36
101
|
|
37
|
-
# Offense count:
|
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
|
-
|
44
|
-
|
45
|
-
|
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:
|
50
|
-
#
|
51
|
-
|
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/
|
157
|
+
- 'spec/features/swagger_spec.rb'
|
55
158
|
|
56
159
|
# Offense count: 1
|
57
160
|
# Cop supports --auto-correct.
|
58
|
-
# Configuration parameters: EnforcedStyle,
|
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,22 +1,32 @@
|
|
1
|
-
### 0.
|
1
|
+
### 0.4.0 (2023/03/28)
|
2
|
+
|
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).
|
6
|
+
|
7
|
+
### 0.3.1 (2019/02/16)
|
8
|
+
|
9
|
+
* [#82](https://github.com/ruby-grape/grape-swagger-rails/pull/82): Fixed api_key_default_value - [@konto-andrzeja](https://github.com/konto-andrzeja).
|
10
|
+
* [#84](https://github.com/ruby-grape/grape-swagger-rails/pull/84): Added the token api_auth type - [@Jack12816](https://github.com/Jack12816).
|
11
|
+
|
12
|
+
### 0.3.0 (2016/09/22)
|
2
13
|
|
3
14
|
* [#70](https://github.com/ruby-grape/grape-swagger-rails/pull/70): Rails 5 support - [@serggl](https://github.com/serggl).
|
4
15
|
* [#68](https://github.com/ruby-grape/grape-swagger-rails/pull/68): Added danger, PR linter - [@dblock](https://github.com/dblock).
|
5
|
-
* Your contribution here.
|
6
16
|
|
7
|
-
### 0.2.2 (
|
17
|
+
### 0.2.2 (2016/07/13)
|
8
18
|
|
9
19
|
* [#57](https://github.com/ruby-grape/grape-swagger-rails/pull/57): Support Swagger-UI supportedSubmitMethods option - [@ShadowWrathOogles](https://github.com/ShadowWrathOogles).
|
10
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).
|
11
21
|
|
12
|
-
### 0.2.1 (
|
22
|
+
### 0.2.1 (2016/05/21)
|
13
23
|
|
14
24
|
* Fixed header-based authorization - [@davidbrewer](https://github.com/davidbrewer).
|
15
25
|
* Support Swagger-UI validatorUrl option - [@davidbrewer](https://github.com/davidbrewer).
|
16
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).
|
17
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).
|
18
28
|
|
19
|
-
### 0.2.0 (
|
29
|
+
### 0.2.0 (2016/02/23)
|
20
30
|
|
21
31
|
* [#6](https://github.com/ruby-grape/grape-swagger-rails/pull/6): Fix: support multiple predefined headers - [@Tyr0](https://github.com/tyr0).
|
22
32
|
* Upgraded swagger-ui to v2.1.1 - [@dblock](https://github.com/dblock).
|
@@ -27,11 +37,11 @@
|
|
27
37
|
* [#39](https://github.com/ruby-grape/grape-swagger-rails/pull/39): Support CSS media queries - [@alexagranov](https://github.com/alexagranov).
|
28
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).
|
29
39
|
|
30
|
-
### 0.1.0 (
|
40
|
+
### 0.1.0 (2015/02/05)
|
31
41
|
|
32
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).
|
33
43
|
|
34
|
-
### 0.0.10 (
|
44
|
+
### 0.0.10 (2014/09/30)
|
35
45
|
|
36
46
|
* [#33](https://github.com/BrandyMint/grape-swagger-rails/pull/33): Fix: make the dummy app runnable - [@dblock](https://github.com/dblock).
|
37
47
|
* [#33](https://github.com/BrandyMint/grape-swagger-rails/pull/33): Fix: headers default to nil - [@dblock](https://github.com/dblock).
|
@@ -43,24 +53,24 @@
|
|
43
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).
|
44
54
|
* [#12](https://github.com/BrandyMint/grape-swagger-rails/pull/12): Fix: SwaggerUI url is combined with appUrl - [@ghilead](https://github.com/ghilead).
|
45
55
|
|
46
|
-
### 0.0.8 (
|
56
|
+
### 0.0.8 (2014/02/06)
|
47
57
|
|
48
58
|
* [#11](https://github.com/BrandyMint/grape-swagger-rails/pull/11): Fixed image loading - [@bitboxer](https://github.com/bitboxer).
|
49
59
|
|
50
|
-
### 0.0.7 (
|
60
|
+
### 0.0.7 (2014/02/05)
|
51
61
|
|
52
62
|
* [#7](https://github.com/BrandyMint/grape-swagger-rails/pull/7): Updated to Swagger-UI 2.0.3 - [@joelvh](https://github.com/joelvh).
|
53
63
|
* [#6](https://github.com/BrandyMint/grape-swagger-rails/pull/6): Added appName and appUrl configuration options - [@swistaczek](https://github.com/swistaczek).
|
54
64
|
|
55
|
-
### 0.0.4 (
|
65
|
+
### 0.0.4 (2013/07/16)
|
56
66
|
|
57
67
|
* Configure discoveryUrl from Rails - [@dapi](https://github.com/dapi).
|
58
68
|
* Added default support for all HTTP methods - [@mtavaresOS](https://github.com/mtavaresOS).
|
59
69
|
|
60
|
-
### 0.0.3 (
|
70
|
+
### 0.0.3 (2013/05/24)
|
61
71
|
|
62
72
|
* Converted to Rails Engine - [@unloved](https://github.com/unloved).
|
63
73
|
|
64
|
-
### 0.0.1 (
|
74
|
+
### 0.0.1 (2013/04/05)
|
65
75
|
|
66
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'] || '~>
|
5
|
+
case version = ENV['GRAPE_SWAGGER_VERSION'] || '~> 1.6.0'
|
6
6
|
when 'HEAD'
|
7
|
-
gem 'grape-swagger', github: '
|
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 '
|
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,12 +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
|
-
[![
|
5
|
-
[![Dependency Status](https://gemnasium.com/ruby-grape/grape-swagger-rails.svg)](https://gemnasium.com/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)
|
6
5
|
[![Code Climate](https://codeclimate.com/github/ruby-grape/grape-swagger-rails/badges/gpa.svg)](https://codeclimate.com/github/ruby-grape/grape-swagger-rails)
|
7
6
|
|
8
7
|
Swagger UI as Rails Engine for grape-swagger gem.
|
9
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
|
+
|
10
27
|
## Installation
|
11
28
|
|
12
29
|
Add this line to your application's Gemfile:
|
@@ -69,7 +86,7 @@ GrapeSwaggerRails.options.headers['Special-Header'] = 'Some Secret Value'
|
|
69
86
|
```
|
70
87
|
|
71
88
|
You can set docExpansion with "none" or "list" or "full", default is "none".
|
72
|
-
See the official Swagger-UI documentation about [SwaggerUi Parameters](https://github.com/swagger-api/swagger-ui#parameters).
|
89
|
+
See the official Swagger-UI documentation about [SwaggerUi Parameters](https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md#parameters).
|
73
90
|
|
74
91
|
```ruby
|
75
92
|
GrapeSwaggerRails.options.doc_expansion = 'list'
|
@@ -77,7 +94,7 @@ GrapeSwaggerRails.options.doc_expansion = 'list'
|
|
77
94
|
|
78
95
|
You can set supportedSubmitMethods with an array of the supported HTTP methods, default is `%w{ get post put delete patch }`.
|
79
96
|
|
80
|
-
See the official Swagger-UI documentation about [SwaggerUi Parameters](https://github.com/swagger-api/swagger-ui#parameters).
|
97
|
+
See the official Swagger-UI documentation about [SwaggerUi Parameters](https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md#parameters).
|
81
98
|
|
82
99
|
```ruby
|
83
100
|
GrapeSwaggerRails.options.supported_submit_methods = ["get"]
|
@@ -129,6 +146,20 @@ GrapeSwaggerRails.options.api_key_name = 'api_token'
|
|
129
146
|
GrapeSwaggerRails.options.api_key_type = 'query'
|
130
147
|
```
|
131
148
|
|
149
|
+
If your application used token authentication passed as a header, like Rails does (`authenticate_or_request_with_http_token`), you can configure Swagger to send the token in this form:
|
150
|
+
|
151
|
+
```
|
152
|
+
Authorization: Token token="WCZZYjnOQFUYfJIN2ShH1iD24UHo58A6TI"
|
153
|
+
```
|
154
|
+
|
155
|
+
by specify:
|
156
|
+
|
157
|
+
```ruby
|
158
|
+
GrapeSwaggerRails.options.api_auth = 'token'
|
159
|
+
GrapeSwaggerRails.options.api_key_name = 'Authorization'
|
160
|
+
GrapeSwaggerRails.options.api_key_type = 'header'
|
161
|
+
```
|
162
|
+
|
132
163
|
You can use the ```api_key``` input box to fill in your API token.
|
133
164
|
### Swagger UI Authorization
|
134
165
|
|
@@ -208,6 +239,17 @@ Include CSS stylesheets in `app/assets/stylesheets/application.css`.
|
|
208
239
|
*/
|
209
240
|
```
|
210
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
|
+
|
211
253
|
## Contributors
|
212
254
|
|
213
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 [
|
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
|
-
*
|
19
|
-
*
|
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,13 +50,12 @@ 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
|
```
|
58
57
|
|
59
|
-
|
58
|
+
Commit your changes.
|
60
59
|
|
61
60
|
```
|
62
61
|
git add CHANGELOG.md
|
@@ -15,6 +15,12 @@
|
|
15
15
|
<%=raw "headers.header_#{index} = new SwaggerClient.ApiKeyAuthorization('#{CGI.escapeHTML(key)}', '#{CGI.escapeHTML(value)}', 'header');" %>
|
16
16
|
<% end %>
|
17
17
|
|
18
|
+
<% if GrapeSwaggerRails.options.api_key_default_value.try(:strip).present? &&
|
19
|
+
GrapeSwaggerRails.options.headers['Authorization'].blank? %>
|
20
|
+
<% headers_count = GrapeSwaggerRails.options.headers.count %>
|
21
|
+
<%= raw "headers.header_#{headers_count} = getApiKeyAuthorization();" %>
|
22
|
+
<% end %>
|
23
|
+
|
18
24
|
window.swaggerUi = new SwaggerUi({
|
19
25
|
url: options.app_url + options.url,
|
20
26
|
dom_id: "swagger-ui-container",
|
@@ -28,7 +34,6 @@
|
|
28
34
|
console.log(swaggerUi);
|
29
35
|
}
|
30
36
|
$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
|
31
|
-
addApiKeyAuthorization();
|
32
37
|
},
|
33
38
|
onFailure: function(data) {
|
34
39
|
if('console' in window) {
|
@@ -41,18 +46,27 @@
|
|
41
46
|
apisSorter: "alpha"
|
42
47
|
});
|
43
48
|
|
44
|
-
function
|
49
|
+
function getApiKeyAuthorization() {
|
45
50
|
var key = $('#input_apiKey')[0].value;
|
46
51
|
|
47
52
|
if (key && key.trim() != "") {
|
48
53
|
if (options.api_auth == 'basic') {
|
49
54
|
key = "Basic " + Base64.encode(key);
|
50
55
|
} else if (options.api_auth == 'bearer') {
|
51
|
-
key = "Bearer " + key
|
56
|
+
key = "Bearer " + key;
|
57
|
+
} else if (options.api_auth == 'token') {
|
58
|
+
key = 'Token token="' + key + '"';
|
52
59
|
}
|
53
|
-
|
60
|
+
return new SwaggerClient.ApiKeyAuthorization(options.api_key_name, key, options.api_key_type);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
function addApiKeyAuthorization() {
|
65
|
+
var apiKeyAuthorization = getApiKeyAuthorization();
|
66
|
+
if (apiKeyAuthorization) {
|
67
|
+
window.swaggerUi.api.clientAuthorizations.add("key", apiKeyAuthorization);
|
54
68
|
}
|
55
|
-
|
69
|
+
}
|
56
70
|
|
57
71
|
$('#input_apiKey').change(addApiKeyAuthorization);
|
58
72
|
|
data/grape-swagger-rails.gemspec
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
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,27 +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
|
16
|
+
spec.require_paths = %w[lib]
|
18
17
|
|
19
|
-
spec.add_dependency 'railties', '>=
|
20
|
-
|
21
|
-
spec.add_development_dependency 'bundler', '~> 1.3'
|
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.33.0'
|
38
|
-
spec.add_development_dependency 'mime-types', '< 3.0'
|
39
|
-
spec.add_development_dependency 'rack-no_animations'
|
18
|
+
spec.add_dependency 'railties', '>= 6.0.6.1'
|
40
19
|
end
|
data/lib/tasks/swagger_ui.rake
CHANGED
@@ -36,7 +36,7 @@ namespace :swagger_ui do
|
|
36
36
|
'object-assign-pollyfill.js',
|
37
37
|
'swagger-oauth.js',
|
38
38
|
'base64.js'
|
39
|
-
]
|
39
|
+
].freeze
|
40
40
|
javascript_files = Dir["#{root}/app/assets/javascripts/grape_swagger_rails/*.js"].map { |f|
|
41
41
|
f.split('/').last
|
42
42
|
} - ['application.js']
|
@@ -61,7 +61,7 @@ namespace :swagger_ui do
|
|
61
61
|
CSS_FILES = [
|
62
62
|
'reset.css',
|
63
63
|
'screen.css'
|
64
|
-
]
|
64
|
+
].freeze
|
65
65
|
css_files = Dir["#{root}/app/assets/stylesheets/grape_swagger_rails/*.css"].map { |f|
|
66
66
|
f.split('/').last
|
67
67
|
} - ['application.css']
|
@@ -19,8 +19,8 @@ describe 'Swagger' do
|
|
19
19
|
|
20
20
|
it 'evaluates config options correctly' do
|
21
21
|
visit '/swagger'
|
22
|
-
|
23
|
-
expect(
|
22
|
+
page_options = page.evaluate_script("$('html').data('swagger-options')").symbolize_keys
|
23
|
+
expect(page_options).to eq(@options.marshal_dump)
|
24
24
|
end
|
25
25
|
|
26
26
|
context '#headers' do
|
@@ -49,6 +49,21 @@ describe 'Swagger' do
|
|
49
49
|
expect(page).to have_css 'span.hljs-string', text: 'Another Value'
|
50
50
|
end
|
51
51
|
end
|
52
|
+
context '#api_key_default_value' do
|
53
|
+
before do
|
54
|
+
GrapeSwaggerRails.options.api_auth = 'bearer'
|
55
|
+
GrapeSwaggerRails.options.api_key_name = 'Authorization'
|
56
|
+
GrapeSwaggerRails.options.api_key_type = 'header'
|
57
|
+
GrapeSwaggerRails.options.api_key_default_value = 'token'
|
58
|
+
visit '/swagger'
|
59
|
+
end
|
60
|
+
it 'adds an Authorization header' do
|
61
|
+
headers = page.evaluate_script('swaggerUi.api.clientAuthorizations')['authz']
|
62
|
+
last_header = headers.fetch("header_#{headers.length - 1}", {})
|
63
|
+
expect(last_header.slice('name', 'value'))
|
64
|
+
.to eq('name' => 'Authorization', 'value' => 'Bearer token')
|
65
|
+
end
|
66
|
+
end
|
52
67
|
context '#api_auth:basic' do
|
53
68
|
before do
|
54
69
|
GrapeSwaggerRails.options.api_auth = 'basic'
|
@@ -83,6 +98,23 @@ describe 'Swagger' do
|
|
83
98
|
expect(page).to have_css 'span.hljs-string', text: 'Bearer token'
|
84
99
|
end
|
85
100
|
end
|
101
|
+
context '#api_auth:token and #api_key_type:header' do
|
102
|
+
before do
|
103
|
+
GrapeSwaggerRails.options.api_auth = 'token'
|
104
|
+
GrapeSwaggerRails.options.api_key_name = 'Authorization'
|
105
|
+
GrapeSwaggerRails.options.api_key_type = 'header'
|
106
|
+
visit '/swagger'
|
107
|
+
end
|
108
|
+
it 'adds an Authorization header' do
|
109
|
+
page.execute_script("$('#input_apiKey').val('token')")
|
110
|
+
page.execute_script("$('#input_apiKey').trigger('change')")
|
111
|
+
find('#endpointListTogger_headers', visible: true).click
|
112
|
+
first('span[class="http_method"] a', visible: true).click
|
113
|
+
click_button 'Try it out!'
|
114
|
+
expect(page).to have_css 'span.hljs-attr', text: 'Authorization'
|
115
|
+
expect(page).to have_css 'span.hljs-string', text: 'Token token'
|
116
|
+
end
|
117
|
+
end
|
86
118
|
context '#api_auth:token' do
|
87
119
|
before do
|
88
120
|
GrapeSwaggerRails.options.api_key_name = 'api_token'
|
data/spec/support/capybara.rb
CHANGED
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.
|
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:
|
11
|
+
date: 2023-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -16,280 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
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:
|
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.3'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.3'
|
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.33.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.33.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'
|
26
|
+
version: 6.0.6.1
|
293
27
|
description: Swagger UI as Rails Engine for grape-swagger gem
|
294
28
|
email:
|
295
29
|
- unlovedru@gmail.com
|
@@ -297,12 +31,13 @@ executables: []
|
|
297
31
|
extensions: []
|
298
32
|
extra_rdoc_files: []
|
299
33
|
files:
|
34
|
+
- ".github/workflows/danger.yml"
|
35
|
+
- ".github/workflows/test.yml"
|
300
36
|
- ".gitignore"
|
301
37
|
- ".rspec"
|
302
38
|
- ".rubocop.yml"
|
303
39
|
- ".rubocop_todo.yml"
|
304
40
|
- ".ruby-gemset"
|
305
|
-
- ".travis.yml"
|
306
41
|
- CHANGELOG.md
|
307
42
|
- CONTRIBUTING.md
|
308
43
|
- Dangerfile
|
@@ -359,6 +94,7 @@ files:
|
|
359
94
|
- spec/dummy/.gitignore
|
360
95
|
- spec/dummy/Rakefile
|
361
96
|
- spec/dummy/app/api/api.rb
|
97
|
+
- spec/dummy/app/assets/config/manifest.js
|
362
98
|
- spec/dummy/app/assets/javascripts/application.js
|
363
99
|
- spec/dummy/app/assets/stylesheets/application.css
|
364
100
|
- spec/dummy/app/controllers/application_controller.rb
|
@@ -379,6 +115,7 @@ files:
|
|
379
115
|
- spec/dummy/config/environments/test.rb
|
380
116
|
- spec/dummy/config/initializers/assets.rb
|
381
117
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
118
|
+
- spec/dummy/config/initializers/inflections.rb
|
382
119
|
- spec/dummy/config/initializers/session_store.rb
|
383
120
|
- spec/dummy/config/initializers/swagger.rb
|
384
121
|
- spec/dummy/config/routes.rb
|
@@ -401,7 +138,7 @@ homepage: https://github.com/ruby-grape/grape-swagger-rails
|
|
401
138
|
licenses:
|
402
139
|
- MIT
|
403
140
|
metadata: {}
|
404
|
-
post_install_message:
|
141
|
+
post_install_message:
|
405
142
|
rdoc_options: []
|
406
143
|
require_paths:
|
407
144
|
- lib
|
@@ -416,15 +153,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
416
153
|
- !ruby/object:Gem::Version
|
417
154
|
version: '0'
|
418
155
|
requirements: []
|
419
|
-
|
420
|
-
|
421
|
-
signing_key:
|
156
|
+
rubygems_version: 3.3.7
|
157
|
+
signing_key:
|
422
158
|
specification_version: 4
|
423
159
|
summary: Swagger UI as Rails Engine for grape-swagger gem
|
424
160
|
test_files:
|
425
161
|
- spec/dummy/.gitignore
|
426
162
|
- spec/dummy/Rakefile
|
427
163
|
- spec/dummy/app/api/api.rb
|
164
|
+
- spec/dummy/app/assets/config/manifest.js
|
428
165
|
- spec/dummy/app/assets/javascripts/application.js
|
429
166
|
- spec/dummy/app/assets/stylesheets/application.css
|
430
167
|
- spec/dummy/app/controllers/application_controller.rb
|
@@ -445,6 +182,7 @@ test_files:
|
|
445
182
|
- spec/dummy/config/environments/test.rb
|
446
183
|
- spec/dummy/config/initializers/assets.rb
|
447
184
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
185
|
+
- spec/dummy/config/initializers/inflections.rb
|
448
186
|
- spec/dummy/config/initializers/session_store.rb
|
449
187
|
- spec/dummy/config/initializers/swagger.rb
|
450
188
|
- spec/dummy/config/routes.rb
|
data/.travis.yml
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
sudo: false
|
2
|
-
|
3
|
-
before_install:
|
4
|
-
- "export DISPLAY=:99.0"
|
5
|
-
- "sh -e /etc/init.d/xvfb start"
|
6
|
-
|
7
|
-
language: ruby
|
8
|
-
|
9
|
-
cache: bundler
|
10
|
-
|
11
|
-
matrix:
|
12
|
-
include:
|
13
|
-
- rvm: 2.3.1
|
14
|
-
script:
|
15
|
-
- bundle exec danger
|
16
|
-
- rvm: 2.3.1
|
17
|
-
env:
|
18
|
-
- GRAPE_SWAGGER_VERSION=0.8.0
|
19
|
-
- rvm: 2.3.1
|
20
|
-
env:
|
21
|
-
- GRAPE_SWAGGER_VERSION=0.9.0
|
22
|
-
- rvm: 2.3.1
|
23
|
-
env:
|
24
|
-
- GRAPE_SWAGGER_VERSION=0.11.0
|
25
|
-
- rvm: 2.3.1
|
26
|
-
env:
|
27
|
-
- GRAPE_SWAGGER_VERSION=0.20.2
|
28
|
-
- rvm: 2.3.1
|
29
|
-
env:
|
30
|
-
- GRAPE_SWAGGER_VERSION=HEAD
|
31
|
-
- rvm: 2.3.0
|
32
|
-
- rvm: 2.2.5
|
33
|
-
- rvm: 2.0.0
|
34
|
-
- rvm: rbx-2
|
35
|
-
- rvm: ruby-head
|
36
|
-
- rvm: jruby-head
|
37
|
-
allow_failures:
|
38
|
-
- env: GRAPE_SWAGGER_VERSION=HEAD
|
39
|
-
- rvm: ruby-head
|
40
|
-
- rvm: jruby-head
|
41
|
-
- rvm: rbx-2
|
42
|
-
|