Skip to content

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?

- Require Ruby >= 3.2 instead of >= 3.1
- Update ActiveSupport dependency to >= 7.2
- Update RuboCop to 1.82.1 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 8db2dd3 to fce69fd Compare January 26, 2026 22:48
#### Features

* Your contribution here.
* Update minimum Ruby version to 3.2 and bump dependencies - [@ericproulx](https://github.com/ericproulx).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Update minimum Ruby version to 3.2 and bump dependencies - [@ericproulx](https://github.com/ericproulx).
* * [#2653](https://github.com/ruby-grape/grape/pull/2653): Require Ruby 3.2 - [@ericproulx](https://github.com/ericproulx).

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.

3 participants