Skip to content

Update minimum Ruby version to 3.2 and bump dependencies#2653

Merged
dblock merged 1 commit intomasterfrom
update_min_ruby_version_and_rubocop
Feb 3, 2026
Merged

Update minimum Ruby version to 3.2 and bump dependencies#2653
dblock merged 1 commit intomasterfrom
update_min_ruby_version_and_rubocop

Conversation

@ericproulx
Copy link
Contributor

Update minimum Ruby version to 3.2 and bump dependencies

Summary

This PR updates the minimum required Ruby version from 3.1 to 3.2, updates related dependencies, and includes code cleanup improvements.

Changes

Ruby Version Requirements

  • Minimum Ruby version: Updated from >= 3.1 to >= 3.2 in grape.gemspec
  • Documentation: Updated README.md to reflect Ruby 3.2+ requirement
  • CI/CD: Removed Ruby 3.1 from GitHub Actions test matrix in both test.yml and edge.yml
  • RuboCop: Updated target Ruby version from 3.1 to 3.2 in .rubocop.yml

Dependency Updates

  • ActiveSupport: Updated minimum version from >= 7.1 to >= 7.2 in grape.gemspec
  • RuboCop: Updated from 1.81.7 to 1.82.1 in Gemfile
  • rubocop-rspec: Updated from 3.8.0 to 3.9.0 in Gemfile

Code Improvements

  • Removed unused dependency: Removed require 'set' from lib/grape.rb (no longer needed)
  • Modern Ruby syntax: Updated route_param method in lib/grape/dsl/routing.rb to use Ruby 3.2+ ** syntax instead of **options
  • Code style: Fixed indentation in spec/grape/middleware/versioner/header_spec.rb
  • RuboCop: Regenerated .rubocop_todo.yml with updated RuboCop version, reducing offense count from 6 to 2 for RSpec/ExpectActual

CI Configuration

  • Removed Ruby 3.1 exclusions from test matrix (no longer needed since 3.1 is removed)
  • Simplified edge workflow by removing Ruby 3.1 exclusion rules

Breaking Changes

⚠️ This is a breaking change - Grape will now require Ruby 3.2 or newer.

Applications using Grape with Ruby 3.1 will need to upgrade to Ruby 3.2+.

Testing

  • All existing tests pass with Ruby 3.2+
  • CI test matrix updated to test against Ruby 3.2, 3.3, 3.4, and 4.0
  • Edge workflow continues to test against ruby-head, truffleruby-head, and jruby-head

Related

This change aligns with the Ruby community's move away from Ruby 3.1, which reached end-of-life status. Ruby 3.2 is the current stable version and provides better performance and features.

@github-actions
Copy link

github-actions bot commented Jan 25, 2026

Danger Report

No issues found.

View run

@ericproulx ericproulx force-pushed the update_min_ruby_version_and_rubocop branch from f92c8bd to 8db2dd3 Compare January 25, 2026 16:25
@dblock
Copy link
Member

dblock commented Jan 26, 2026

Let's update CHANGELOG and maybe UPGRADING?

@ericproulx ericproulx force-pushed the update_min_ruby_version_and_rubocop branch from 8db2dd3 to fce69fd Compare January 26, 2026 22:48
@ericproulx ericproulx force-pushed the update_min_ruby_version_and_rubocop branch from fce69fd to b73209d Compare January 31, 2026 18:15
@dblock
Copy link
Member

dblock commented Feb 1, 2026

Danger Report

Errors

  • One of the lines below found in CHANGELOG.md doesn't match the expected format. Please make it look like the other lines, pay attention to version numbers, periods, spaces and date formats.
  • Please put back the * Your contribution here. line into CHANGELOG.md.

Markdowns

* Your contribution here
does not include a pull request link, does not include an author link, is missing a period at the end of the line
* Your contribution here
does not include a pull request link, does not include an author link, is missing a period at the end of the line

View run

@ericproulx fix pls ^

- Require Ruby >= 3.2 instead of >= 3.1
- Update ActiveSupport dependency to >= 7.2
- Update RuboCop to 1.84.0 and rubocop-rspec to 3.9.0
- Remove Ruby 3.1 from CI test matrix
- Clean up code: remove unused require, update syntax
@ericproulx ericproulx force-pushed the update_min_ruby_version_and_rubocop branch from b73209d to 3ec67f9 Compare February 2, 2026 06:50
@dblock dblock merged commit 519029a into master Feb 3, 2026
79 checks passed
@dblock dblock deleted the update_min_ruby_version_and_rubocop branch February 3, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants