grape-swagger-rails 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/danger.yml +1 -1
- data/.github/workflows/head.yml +9 -9
- data/.github/workflows/rubocop.yml +1 -1
- data/.github/workflows/test.yml +19 -22
- data/CHANGELOG.md +5 -0
- data/Gemfile +3 -1
- data/README.md +0 -38
- data/app/assets/stylesheets/grape_swagger_rails/application.css +1 -1
- data/app/assets/stylesheets/grape_swagger_rails/screen-propshaft.css +1489 -0
- data/app/views/grape_swagger_rails/application/index.html.erb +23 -2
- data/lib/grape-swagger-rails/engine.rb +15 -0
- data/lib/grape-swagger-rails/version.rb +1 -1
- data/lib/tasks/swagger_ui.rake +4 -4
- data/spec/dummy/app/assets/config/manifest.js +0 -1
- data/spec/spec_helper.rb +9 -0
- metadata +6 -8
- /data/app/assets/stylesheets/grape_swagger_rails/{screen.css.erb → screen-sprockets.css.erb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6acf0c3a11fe817b12f2b4c4469f1fc3a6efce7517731b3afd217474a95840a0
|
4
|
+
data.tar.gz: c4ab9b45226c2946ee4d20ff9c34e0cd3decfa83754c4119412587d383a4d12b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d34167607d9a37eadcd4e387b1eb94e7ea1a810ef3abbfaf212de698c0d58d5f56d3c76325a6acc3863440aff2dddfd79e81bd56b949e77355a84dbbe796498d
|
7
|
+
data.tar.gz: 272375f5ff9dc45ff9d78e8b35d199936f59c4011bf5cf972e794ea55793ca1cdc5311ae07ce35d868c5c18e68fae4311fc2d9eddd621e8ab7fa139d8d6df963
|
data/.github/workflows/head.yml
CHANGED
@@ -7,19 +7,18 @@ jobs:
|
|
7
7
|
strategy:
|
8
8
|
fail-fast: false
|
9
9
|
matrix:
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
- { ruby: "jruby-head", rails: "edge", grape-swagger: "HEAD" }
|
10
|
+
ruby: ['3.2', 'ruby-head', 'jruby-head']
|
11
|
+
rails: ['edge']
|
12
|
+
grape-swagger: ['HEAD']
|
14
13
|
env:
|
15
|
-
GRAPE_SWAGGER_VERSION: ${{ matrix.
|
16
|
-
RAILS_VERSION: ${{ matrix.
|
14
|
+
GRAPE_SWAGGER_VERSION: ${{ matrix.grape-swagger }}
|
15
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
17
16
|
steps:
|
18
|
-
- uses: actions/checkout@
|
17
|
+
- uses: actions/checkout@v5
|
19
18
|
- name: Set up Ruby
|
20
19
|
uses: ruby/setup-ruby@v1
|
21
20
|
with:
|
22
|
-
ruby-version: ${{ matrix.
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
23
22
|
bundler-cache: true
|
24
23
|
- name: Print Bundler Versions
|
25
24
|
run: bundle show
|
@@ -30,6 +29,7 @@ jobs:
|
|
30
29
|
- uses: browser-actions/setup-geckodriver@latest
|
31
30
|
with:
|
32
31
|
geckodriver-version: "0.35.0"
|
33
|
-
-
|
32
|
+
- name: Run tests
|
33
|
+
uses: coactions/setup-xvfb@v1
|
34
34
|
with:
|
35
35
|
run: bundle exec rake spec
|
data/.github/workflows/test.yml
CHANGED
@@ -6,32 +6,20 @@ jobs:
|
|
6
6
|
strategy:
|
7
7
|
fail-fast: false
|
8
8
|
matrix:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
- { ruby:
|
14
|
-
- { ruby: "3.2", rails: "6.1.7", grape-swagger: "1.6.1" }
|
15
|
-
- { ruby: "3.2", rails: "6.1.7", grape-swagger: "2.1.1" }
|
16
|
-
- { ruby: "3.2", rails: "7.2.1", grape-swagger: "1.6.1" }
|
17
|
-
- { ruby: "3.2", rails: "7.2.1", grape-swagger: "2.1.1" }
|
18
|
-
- { ruby: "3.3", rails: "6.1.7", grape-swagger: "1.6.1" }
|
19
|
-
- { ruby: "3.3", rails: "6.1.7", grape-swagger: "2.1.1" }
|
20
|
-
- { ruby: "3.3", rails: "7.2.1", grape-swagger: "1.6.1" }
|
21
|
-
- { ruby: "3.3", rails: "7.2.1", grape-swagger: "2.1.1" }
|
22
|
-
- { ruby: "jruby-9.4.6", rails: "6.1.7", grape-swagger: "1.6.1" }
|
23
|
-
- { ruby: "jruby-9.4.6", rails: "6.1.7", grape-swagger: "2.1.1" }
|
24
|
-
- { ruby: "jruby-9.4.6", rails: "7.2.1", grape-swagger: "1.6.1" }
|
25
|
-
- { ruby: "jruby-9.4.6", rails: "7.2.1", grape-swagger: "2.1.1" }
|
9
|
+
ruby: ['3.1', '3.2', '3.3', '3.4', 'jruby']
|
10
|
+
rails: ['7.2.2.2', '8.0.2.1']
|
11
|
+
grape-swagger: ['1.6.1', '2.1.2']
|
12
|
+
exclude:
|
13
|
+
- { ruby: '3.1', rails: '8.0.2.1' } # Rails 8 requires Ruby >= 3.2
|
26
14
|
env:
|
27
|
-
GRAPE_SWAGGER_VERSION: ${{ matrix.
|
28
|
-
RAILS_VERSION: ${{ matrix.
|
15
|
+
GRAPE_SWAGGER_VERSION: ${{ matrix.grape-swagger }}
|
16
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
29
17
|
steps:
|
30
|
-
- uses: actions/checkout@
|
18
|
+
- uses: actions/checkout@v5
|
31
19
|
- name: Set up Ruby
|
32
20
|
uses: ruby/setup-ruby@v1
|
33
21
|
with:
|
34
|
-
ruby-version: ${{ matrix.
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
35
23
|
bundler-cache: true
|
36
24
|
- name: Print Bundler Versions
|
37
25
|
run: bundle show
|
@@ -42,6 +30,15 @@ jobs:
|
|
42
30
|
- uses: browser-actions/setup-geckodriver@latest
|
43
31
|
with:
|
44
32
|
geckodriver-version: "0.35.0"
|
45
|
-
-
|
33
|
+
- name: Run tests with Sprockets
|
34
|
+
uses: coactions/setup-xvfb@v1
|
35
|
+
env:
|
36
|
+
ASSET_PIPELINE: sprockets
|
37
|
+
with:
|
38
|
+
run: bundle exec rake spec
|
39
|
+
- name: Run tests with Propshaft
|
40
|
+
uses: coactions/setup-xvfb@v1
|
41
|
+
env:
|
42
|
+
ASSET_PIPELINE: propshaft
|
46
43
|
with:
|
47
44
|
run: bundle exec rake spec
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
### 0.7.0 (2025/09/16)
|
2
|
+
|
3
|
+
* [#132](https://github.com/ruby-grape/grape-swagger-rails/pull/132): Automatically register assets with Sprockets - [@olivier-thatch](https://github.com/olivier-thatch).
|
4
|
+
* [#130](https://github.com/ruby-grape/grape-swagger-rails/pull/130): Propshaft support - [@olivier-thatch](https://github.com/olivier-thatch).
|
5
|
+
|
1
6
|
### 0.6.0 (2024/11/21)
|
2
7
|
|
3
8
|
* [#124](https://github.com/ruby-grape/grape-swagger-rails/pull/124): Rails 7 compatibility - [@padde](https://github.com/padde).
|
data/Gemfile
CHANGED
@@ -25,6 +25,7 @@ group :development, :test do
|
|
25
25
|
gem 'jquery-rails'
|
26
26
|
gem 'mime-types'
|
27
27
|
gem 'nokogiri'
|
28
|
+
gem 'propshaft', require: false
|
28
29
|
gem 'rack', '< 3.0'
|
29
30
|
gem 'rack-cors'
|
30
31
|
gem 'rake'
|
@@ -35,7 +36,8 @@ group :development, :test do
|
|
35
36
|
gem 'rubocop-rspec'
|
36
37
|
gem 'ruby-grape-danger', '~> 0.2.0', require: false
|
37
38
|
gem 'selenium-webdriver'
|
38
|
-
gem 'sprockets
|
39
|
+
gem 'sprockets', ENV.fetch('SPROCKETS_VERSION', '>= 4.0.0'), require: false
|
40
|
+
gem 'sprockets-rails', require: false
|
39
41
|
gem 'uglifier'
|
40
42
|
gem 'webrick'
|
41
43
|
end
|
data/README.md
CHANGED
@@ -18,8 +18,6 @@ Swagger UI as Rails Engine for grape-swagger gem.
|
|
18
18
|
- [Integration with DoorKeeper](#integration-with-doorkeeper)
|
19
19
|
- [Hiding the API or Authorization text boxes](#hiding-the-api-or-authorization-text-boxes)
|
20
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
21
|
- [Contributors](#contributors)
|
24
22
|
- [Contributing](#contributing)
|
25
23
|
- [License](#license)
|
@@ -217,42 +215,6 @@ NOTE: This action should be run part of this gem (not your application). In case
|
|
217
215
|
make it up-to-date, clone the repo, run the rake task, examine the diff, fix any bugs, make sure
|
218
216
|
tests pass and then send PR here.
|
219
217
|
|
220
|
-
### Enabling in a Rails-API Project
|
221
|
-
|
222
|
-
The grape-swagger-rails gem uses the Rails asset pipeline for its Javascript and CSS. Enable the asset pipeline with [rails-api](https://github.com/rails-api/rails-api).
|
223
|
-
|
224
|
-
Add sprockets to `config/application.rb`.
|
225
|
-
|
226
|
-
```ruby
|
227
|
-
require 'sprockets/railtie'
|
228
|
-
```
|
229
|
-
|
230
|
-
Include JavaScript in `app/assets/javascripts/application.js`.
|
231
|
-
|
232
|
-
```javascript
|
233
|
-
//
|
234
|
-
//= require_tree .
|
235
|
-
```
|
236
|
-
|
237
|
-
Include CSS stylesheets in `app/assets/stylesheets/application.css`.
|
238
|
-
|
239
|
-
```css
|
240
|
-
/*
|
241
|
-
*= require_tree .
|
242
|
-
*/
|
243
|
-
```
|
244
|
-
|
245
|
-
### Enabling in Rails 6 (Sprokets 5)
|
246
|
-
|
247
|
-
Rails 6 top-level targets are determined via `./app/assets/config/manifest.js`. Specify `grape-swagger-rails` asset files as follows.
|
248
|
-
|
249
|
-
```javascript
|
250
|
-
//= link grape_swagger_rails/application.css
|
251
|
-
//= link grape_swagger_rails/application.js
|
252
|
-
```
|
253
|
-
|
254
|
-
See [Upgrading Sprokets](https://github.com/rails/sprockets/blob/master/UPGRADING.md#manifestjs) for more information.
|
255
|
-
|
256
218
|
## Contributors
|
257
219
|
|
258
220
|
* [unloved](https://github.com/unloved)
|