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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: efdc8bb56a0364b50351abe79d3abfc95202397cdc5a0c1e766e4e3bc143490f
4
- data.tar.gz: 8c118f83a1a0580dc8fd0e52ea3f6589b58d9fd7c6d7ce8cf53af466cbb8ec23
3
+ metadata.gz: 6acf0c3a11fe817b12f2b4c4469f1fc3a6efce7517731b3afd217474a95840a0
4
+ data.tar.gz: c4ab9b45226c2946ee4d20ff9c34e0cd3decfa83754c4119412587d383a4d12b
5
5
  SHA512:
6
- metadata.gz: 641d69aca0022a9c06bbc1da9e2cb802cdb20e6735c60aee3d7a5f95d2c0e2c21bf6643b3d7d2934762eef3e03baafeceab3a09d7673de77bddb7a24ffd8fde3
7
- data.tar.gz: 7a487d5c67cd911ac06a35e6671852f7745b487caf742119fc80101320aed28ae1a3cac7c017fe05349e870fced745c2b2bdb9ecc6be007efe06f30764546e0c
6
+ metadata.gz: d34167607d9a37eadcd4e387b1eb94e7ea1a810ef3abbfaf212de698c0d58d5f56d3c76325a6acc3863440aff2dddfd79e81bd56b949e77355a84dbbe796498d
7
+ data.tar.gz: 272375f5ff9dc45ff9d78e8b35d199936f59c4011bf5cf972e794ea55793ca1cdc5311ae07ce35d868c5c18e68fae4311fc2d9eddd621e8ab7fa139d8d6df963
@@ -4,7 +4,7 @@ jobs:
4
4
  lint:
5
5
  runs-on: ubuntu-latest
6
6
  steps:
7
- - uses: actions/checkout@v3
7
+ - uses: actions/checkout@v5
8
8
  with:
9
9
  fetch-depth: 0
10
10
  - name: Set up Ruby
@@ -7,19 +7,18 @@ jobs:
7
7
  strategy:
8
8
  fail-fast: false
9
9
  matrix:
10
- entry:
11
- - { ruby: "3.2", rails: "edge", grape-swagger: "HEAD" }
12
- - { ruby: "ruby-head", rails: "edge", grape-swagger: "HEAD" }
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.entry.grape-swagger }}
16
- RAILS_VERSION: ${{ matrix.entry.rails }}
14
+ GRAPE_SWAGGER_VERSION: ${{ matrix.grape-swagger }}
15
+ RAILS_VERSION: ${{ matrix.rails }}
17
16
  steps:
18
- - uses: actions/checkout@v3
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.entry.ruby }}
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
- - uses: coactions/setup-xvfb@v1
32
+ - name: Run tests
33
+ uses: coactions/setup-xvfb@v1
34
34
  with:
35
35
  run: bundle exec rake spec
@@ -4,7 +4,7 @@ jobs:
4
4
  rubocop:
5
5
  runs-on: ubuntu-latest
6
6
  steps:
7
- - uses: actions/checkout@v3
7
+ - uses: actions/checkout@v5
8
8
  - name: Set up Ruby
9
9
  uses: ruby/setup-ruby@v1
10
10
  with:
@@ -6,32 +6,20 @@ jobs:
6
6
  strategy:
7
7
  fail-fast: false
8
8
  matrix:
9
- entry:
10
- - { ruby: "2.7", rails: "6.1.7", grape-swagger: "1.6.1" }
11
- - { ruby: "3.0", rails: "6.1.7", grape-swagger: "1.6.1" }
12
- - { ruby: "3.1", rails: "6.1.7", grape-swagger: "1.6.1" }
13
- - { ruby: "3.1", rails: "7.2.1", grape-swagger: "1.6.1" }
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.entry.grape-swagger }}
28
- RAILS_VERSION: ${{ matrix.entry.rails }}
15
+ GRAPE_SWAGGER_VERSION: ${{ matrix.grape-swagger }}
16
+ RAILS_VERSION: ${{ matrix.rails }}
29
17
  steps:
30
- - uses: actions/checkout@v3
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.entry.ruby }}
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
- - uses: coactions/setup-xvfb@v1
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-rails', require: 'sprockets/railtie'
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)
@@ -1,5 +1,5 @@
1
1
  /*
2
2
  *= require ./reset
3
- *= require ./screen
3
+ *= require ./screen-sprockets
4
4
  *= require_self
5
5
  */