Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 6 additions & 31 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,14 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- ruby: '3.2'
rails: '7.2.2.2'
grape: '~> 1.8.0'
grape-swagger: '1.6.1'
- ruby: '3.2'
rails: '7.2.2.2'
grape: '~> 3.1.0'
grape-swagger: '2.1.4'
- ruby: '3.3'
rails: '7.2.2.2'
grape: '~> 3.1.0'
grape-swagger: '2.1.4'
- ruby: '3.4'
rails: '7.2.2.2'
grape: '~> 3.1.0'
grape-swagger: '2.1.4'
- ruby: '3.2'
rails: '~> 8.1.3'
grape: '~> 3.1.0'
grape-swagger: '2.1.4'
- ruby: '3.3'
rails: '~> 8.1.3'
grape: '~> 3.1.0'
grape-swagger: '2.1.4'
- ruby: '3.4'
rails: '~> 8.1.3'
grape: '~> 3.1.0'
grape-swagger: '2.1.4'
ruby: ['3.2', '3.3', '3.4']
rails: ['~> 8.1.4']
json: ['~> 2.0', '~> 3.0']
env:
GRAPE_VERSION: ${{ matrix.grape }}
GRAPE_SWAGGER_VERSION: ${{ matrix.grape-swagger }}
GRAPE_VERSION: '~> 3.1.0'
GRAPE_SWAGGER_VERSION: '2.1.4'
RAILS_VERSION: ${{ matrix.rails }}
JSON_VERSION: ${{ matrix.json }}
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### Next Release

* [#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).
* Your contribution here.

### 1.0.10 (2026/09/22)
Expand Down
3 changes: 1 addition & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ Config in `.rubocop.yml` targets Ruby 3.4. Plugins: rubocop-capybara, rubocop-rs

## Compatibility Matrix

- Rails 7.2 / 8.1 × Ruby 3.2–3.4 × grape-swagger 2.1.4 (grape ~> 3.1)
- Rails 7.2 × Ruby 3.2 × grape-swagger 1.6.1 (grape ~> 1.8) — legacy combination
- Rails 8.1.4–8.1.x × Ruby 3.2–3.4 × JSON 2/3 × grape-swagger 2.1.4 (grape ~> 3.1)
- Ruby 3.1 is excluded from Rails 8 (requires 3.2+)
- 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
- Both Sprockets and Propshaft asset pipelines are tested in CI
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ else
gem 'grape-swagger', grape_swagger_version
end

case rails_version = ENV.fetch('RAILS_VERSION', '>= 7.2.3.1')
case rails_version = ENV.fetch('RAILS_VERSION', '>= 8.1.4')
when 'edge'
gem 'railties', github: 'rails/rails', branch: 'main'
else
gem 'railties', rails_version
end

gem 'json', ENV.fetch('JSON_VERSION') if ENV.key?('JSON_VERSION')

group :development, :test do
gem 'capybara'
gem 'danger', require: false
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ Or install it yourself as:

This gem is continuously tested against the following stack:

| Ruby | Rails | Grape | grape-swagger | Swagger UI |
|-----:|--------:|--------:|--------------:|-----------:|
| 3.4 | 7.2.2.2 | 1.8.x | 1.6.1 | 5.33.0 |
| 3.2+ | 7.2.2.2 | 3.1.x | 2.1.4 | 5.33.0 |
| 3.2+ | 8.1.x | 3.1.x | 2.1.4 | 5.33.0 |
| Ruby | Rails | JSON | Grape | grape-swagger | Swagger UI |
|-----:|-------:|--------:|------:|--------------:|-----------:|
| 3.2+ | 8.1.4–8.1.x | 2.x/3.x | 3.1.x | 2.1.4 | 5.33.0 |

The dummy app and CI also exercise both supported Rails asset pipelines: Sprockets and Propshaft.
Rails 8.1.4 is required for JSON 3 compatibility; older Rails versions remain supported by the 1.x gem releases.

If you use a nearby version and hit an issue, please open one with your `Gemfile.lock` and a minimal reproduction.

Expand Down
5 changes: 2 additions & 3 deletions grape-swagger-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ Gem::Specification.new do |spec|
spec.require_paths = %w[lib]
spec.required_ruby_version = '>= 3.2'
spec.add_dependency 'haml-rails', '>= 2.0', '< 4.0'
# Supported Rails versions use JSON APIs removed in JSON 3 (quirks_mode and positional parse options).
spec.add_dependency 'json', '>= 2.0', '< 3.0'
spec.add_dependency 'json', '>= 2.0'
spec.add_dependency 'ostruct', '>= 0.6', '< 1.0'
spec.add_dependency 'railties', '>= 7.2.2.2', '< 8.2'
spec.add_dependency 'railties', '>= 8.1.4', '< 8.2'
spec.metadata = {
'bug_tracker_uri' => 'https://github.com/ruby-grape/grape-swagger-rails/issues',
'changelog_uri' => 'https://github.com/ruby-grape/grape-swagger-rails/blob/master/CHANGELOG.md',
Expand Down
Loading