grape-swagger-rails 1.0.9 → 2.0.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: d97001ea5dddef8b88dec458db3cdaa67b831bce1e79786c9039a1f22116997c
4
- data.tar.gz: 16f873ac0fe788d2adff17b2dd1ddc0b9af0f2be771bea694ecaf2b55d3046cf
3
+ metadata.gz: ce061b25fb97c60e7fb24ac904116dd39723899ae633b81b6213868c322cc304
4
+ data.tar.gz: 58775278995267631da4e3d93b0d058d540ac78b8fa1ed8f02c6a672ea233a57
5
5
  SHA512:
6
- metadata.gz: d7ea05d2aff082469f8e454a8cd624be5c3851359be4d189ec9248a38c806d5ae5dba4f3c6a78d34efbe1842d59f7c80c0529aee6392a942aa47f47560679e53
7
- data.tar.gz: dd4490bc71b0366ca9ccfd2c9b2b6a0798a1f7e659cbf0b91e535c68e06da3318b2b45399dac7ccf0cffe664414641b30adc6d6fe7b29c8a2c0a6b84cf088e02
6
+ metadata.gz: 9a7112bdaa28e3c148bf127ec3f0583463961c080ef06f4a19dc7458fba713282d9f2909f19eb93b6d4d749df7d460315f8274be1907ecef138bde4fb3561d4a
7
+ data.tar.gz: 8ef3f5fa56a1d166ec806e3ca51692ba407bc82af058979fdecc7b7c9e2911db6684e536eae115a5ab3e1ba48835adca2441e60a09b47a06f4f667de321bb9fe
@@ -47,6 +47,7 @@ jobs:
47
47
  run: bundle exec rake swagger_ui:dist:update
48
48
 
49
49
  - name: Create pull request
50
+ id: pull-request
50
51
  if: steps.swagger-ui.outputs.update-needed == 'true'
51
52
  uses: peter-evans/create-pull-request@v7
52
53
  with:
@@ -59,3 +60,28 @@ jobs:
59
60
  Updates bundled Swagger UI assets from swagger-api/swagger-ui `${{ steps.swagger-ui.outputs.latest-tag }}`.
60
61
 
61
62
  Generated by the scheduled Swagger UI update workflow.
63
+
64
+ # PRs created with GITHUB_TOKEN do not trigger the Danger PR workflow.
65
+ - name: Add the pull request to the changelog
66
+ if: steps.pull-request.outputs.pull-request-number != ''
67
+ env:
68
+ GH_TOKEN: ${{ github.token }}
69
+ PR_NUMBER: ${{ steps.pull-request.outputs.pull-request-number }}
70
+ PR_BRANCH: update-swagger-ui-${{ steps.swagger-ui.outputs.latest-version }}
71
+ run: |
72
+ git fetch origin "$PR_BRANCH"
73
+ git checkout -B "$PR_BRANCH" FETCH_HEAD
74
+ PR_URL="$(gh pr view "$PR_NUMBER" --json url --jq .url)"
75
+ PR_TITLE="$(gh pr view "$PR_NUMBER" --json title --jq .title)"
76
+ PR_AUTHOR="$(gh api "repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}" --jq .user.login)"
77
+ PR_AUTHOR_URL="$(gh api "repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}" --jq .user.html_url)"
78
+ export PR_URL PR_TITLE PR_AUTHOR PR_AUTHOR_URL
79
+ ruby script/update_changelog
80
+ if git diff --quiet -- CHANGELOG.md; then
81
+ exit 0
82
+ fi
83
+ git config user.name github-actions[bot]
84
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
85
+ git add CHANGELOG.md
86
+ git commit -m "Update changelog for #${PR_NUMBER}"
87
+ git push origin "$PR_BRANCH"
@@ -10,39 +10,14 @@ jobs:
10
10
  strategy:
11
11
  fail-fast: false
12
12
  matrix:
13
- include:
14
- - ruby: '3.2'
15
- rails: '7.2.2.2'
16
- grape: '~> 1.8.0'
17
- grape-swagger: '1.6.1'
18
- - ruby: '3.2'
19
- rails: '7.2.2.2'
20
- grape: '~> 3.1.0'
21
- grape-swagger: '2.1.4'
22
- - ruby: '3.3'
23
- rails: '7.2.2.2'
24
- grape: '~> 3.1.0'
25
- grape-swagger: '2.1.4'
26
- - ruby: '3.4'
27
- rails: '7.2.2.2'
28
- grape: '~> 3.1.0'
29
- grape-swagger: '2.1.4'
30
- - ruby: '3.2'
31
- rails: '~> 8.1.3'
32
- grape: '~> 3.1.0'
33
- grape-swagger: '2.1.4'
34
- - ruby: '3.3'
35
- rails: '~> 8.1.3'
36
- grape: '~> 3.1.0'
37
- grape-swagger: '2.1.4'
38
- - ruby: '3.4'
39
- rails: '~> 8.1.3'
40
- grape: '~> 3.1.0'
41
- grape-swagger: '2.1.4'
13
+ ruby: ['3.2', '3.3', '3.4']
14
+ rails: ['~> 8.1.4']
15
+ json: ['~> 2.0', '~> 3.0']
42
16
  env:
43
- GRAPE_VERSION: ${{ matrix.grape }}
44
- GRAPE_SWAGGER_VERSION: ${{ matrix.grape-swagger }}
17
+ GRAPE_VERSION: '~> 3.1.0'
18
+ GRAPE_SWAGGER_VERSION: '2.1.4'
45
19
  RAILS_VERSION: ${{ matrix.rails }}
20
+ JSON_VERSION: ${{ matrix.json }}
46
21
  steps:
47
22
  - uses: actions/checkout@v6
48
23
  - name: Set up Ruby
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  * Your contribution here.
4
4
 
5
+ ### 2.0.0 (2026/10/02)
6
+
7
+ * [#179](https://github.com/ruby-grape/grape-swagger-rails/pull/179): Require Rails 8.1.4+ and allow JSON 3 - [@moskvin](https://github.com/moskvin).
8
+
9
+ ### 1.0.10 (2026/09/22)
10
+
11
+ * [#177](https://github.com/ruby-grape/grape-swagger-rails/pull/177): Bump Swagger UI to 5.33.0 - [@moskvin](https://github.com/moskvin).
12
+
5
13
  ### 1.0.9 (2026/09/08)
6
14
 
7
15
  * [#176](https://github.com/ruby-grape/grape-swagger-rails/pull/176): Bump Swagger UI to 5.32.15 - [@moskvin](https://github.com/moskvin).
data/CLAUDE.md CHANGED
@@ -73,8 +73,7 @@ Config in `.rubocop.yml` targets Ruby 3.4. Plugins: rubocop-capybara, rubocop-rs
73
73
 
74
74
  ## Compatibility Matrix
75
75
 
76
- - Rails 7.2 / 8.1 × Ruby 3.2–3.4 × grape-swagger 2.1.4 (grape ~> 3.1)
77
- - Rails 7.2 × Ruby 3.2 × grape-swagger 1.6.1 (grape ~> 1.8) — legacy combination
76
+ - Rails 8.1.4–8.1.x × Ruby 3.2–3.4 × JSON 2/3 × grape-swagger 2.1.4 (grape ~> 3.1)
78
77
  - Ruby 3.1 is excluded from Rails 8 (requires 3.2+)
79
78
  - grape ~> 1.8 is not tested on Ruby 3.4: Ruby 3.4 tightened `Forwardable` to raise on private-method delegation, which breaks Mustermann's `named_captures` forwarding used by grape-swagger 1.6.1 to introspect routes
80
79
  - Both Sprockets and Propshaft asset pipelines are tested in CI
data/CONTRIBUTING.md CHANGED
@@ -123,6 +123,16 @@ Go back to your pull request after a few minutes and see whether it passed muste
123
123
 
124
124
  It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!
125
125
 
126
+ ## Preparing a Release
127
+
128
+ Run `bin/bump 1.0.11` with the desired new version. This updates the gem version
129
+ and moves all entries under `Next Release` into a new section dated today,
130
+ leaving `Your contribution here.` under `Next Release`. It refuses empty releases
131
+ and versions that are not newer than the current version.
132
+
133
+ Review the diff, commit it, and follow the usual gem release process. The script
134
+ does not commit, tag, push, or publish the gem.
135
+
126
136
  ## Thank You
127
137
 
128
138
  Please do know that we really appreciate and value your time and work. We love you, really.
data/Gemfile CHANGED
@@ -18,13 +18,15 @@ else
18
18
  gem 'grape-swagger', grape_swagger_version
19
19
  end
20
20
 
21
- case rails_version = ENV.fetch('RAILS_VERSION', '>= 7.2.3.1')
21
+ case rails_version = ENV.fetch('RAILS_VERSION', '>= 8.1.4')
22
22
  when 'edge'
23
23
  gem 'railties', github: 'rails/rails', branch: 'main'
24
24
  else
25
25
  gem 'railties', rails_version
26
26
  end
27
27
 
28
+ gem 'json', ENV.fetch('JSON_VERSION') if ENV.key?('JSON_VERSION')
29
+
28
30
  group :development, :test do
29
31
  gem 'capybara'
30
32
  gem 'danger', require: false
data/README.md CHANGED
@@ -44,13 +44,12 @@ Or install it yourself as:
44
44
 
45
45
  This gem is continuously tested against the following stack:
46
46
 
47
- | Ruby | Rails | Grape | grape-swagger | Swagger UI |
48
- |-----:|--------:|--------:|--------------:|-----------:|
49
- | 3.4 | 7.2.2.2 | 1.8.x | 1.6.1 | 5.32.15 |
50
- | 3.2+ | 7.2.2.2 | 3.1.x | 2.1.4 | 5.32.15 |
51
- | 3.2+ | 8.1.x | 3.1.x | 2.1.4 | 5.32.15 |
47
+ | Ruby | Rails | JSON | Grape | grape-swagger | Swagger UI |
48
+ |-----:|-------:|--------:|------:|--------------:|-----------:|
49
+ | 3.2+ | 8.1.4–8.1.x | 2.x/3.x | 3.1.x | 2.1.4 | 5.33.0 |
52
50
 
53
51
  The dummy app and CI also exercise both supported Rails asset pipelines: Sprockets and Propshaft.
52
+ Rails 8.1.4 is required for JSON 3 compatibility; older Rails versions remain supported by the 1.x gem releases.
54
53
 
55
54
  If you use a nearby version and hit an issue, please open one with your `Gemfile.lock` and a minimal reproduction.
56
55
 
data/UPGRADING.md CHANGED
@@ -1,6 +1,23 @@
1
1
  Upgrading Grape Swagger Rails
2
2
  =============================
3
3
 
4
+ ### Upgrading to 2.0.0
5
+
6
+ Version `2.0.0` drops support for Rails versions older than 8.1.4 and allows JSON 3. See [#179](https://github.com/ruby-grape/grape-swagger-rails/pull/179).
7
+
8
+ #### Upgrade checklist
9
+
10
+ 1. Upgrade your application to Rails `>= 8.1.4, < 8.2`. The gem now depends on `railties >= 8.1.4, < 8.2` (previously `>= 7.2.2.2, < 8.2`); Rails 8.1.4 is the first release compatible with JSON 3.
11
+ 2. The Ruby requirement is unchanged (`>= 3.2`).
12
+ 3. The `json < 3.0` upper bound was removed, so both `json` 2.x and 3.x are supported. No configuration changes are needed.
13
+ 4. If you cannot upgrade Rails yet, stay on the 1.x line:
14
+
15
+ ```ruby
16
+ gem 'grape-swagger-rails', '~> 1.0'
17
+ ```
18
+
19
+ No `GrapeSwaggerRails.options` or template changes are required.
20
+
4
21
  ### Upgrading to 1.0.0
5
22
 
6
23
  Version `1.0.0` includes a major Swagger UI integration refresh and several configuration additions.