Skip to content

Commit 8db2dd3

Browse files
committed
Update minimum Ruby version to 3.2
- 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
1 parent 2bd3145 commit 8db2dd3

11 files changed

Lines changed: 20 additions & 37 deletions

File tree

.github/workflows/edge.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
ruby: ['3.1', '3.2', '3.3', '3.4', '4.0', ruby-head, truffleruby-head, jruby-head]
9+
ruby: ['3.2', '3.3', '3.4', '4.0', ruby-head, truffleruby-head, jruby-head]
1010
gemfile: [rails_edge, rack_edge]
11-
exclude:
12-
- ruby: '3.1'
13-
gemfile: rails_edge
1411
runs-on: ubuntu-latest
1512
continue-on-error: true
1613
env:

.github/workflows/test.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
ruby: ['3.1', '3.2', '3.3', '3.4', '4.0']
26+
ruby: ['3.2', '3.3', '3.4', '4.0']
2727
gemfile:
2828
- Gemfile
2929
- gemfiles/rack_2_2.gemfile
3030
- gemfiles/rack_3_0.gemfile
3131
- gemfiles/rack_3_1.gemfile
3232
- gemfiles/rack_3_2.gemfile
33-
- gemfiles/rails_7_1.gemfile
3433
- gemfiles/rails_7_2.gemfile
3534
- gemfiles/rails_8_0.gemfile
3635
- gemfiles/rails_8_1.gemfile
@@ -51,11 +50,6 @@ jobs:
5150
- ruby: '4.0'
5251
gemfile: gemfiles/multi_xml.gemfile
5352
specs: 'spec/integration/multi_xml'
54-
exclude:
55-
- ruby: '3.1'
56-
gemfile: gemfiles/rails_8_0.gemfile
57-
- ruby: '3.1'
58-
gemfile: gemfiles/rails_8_1.gemfile
5953
runs-on: ubuntu-latest
6054
env:
6155
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AllCops:
22
NewCops: enable
3-
TargetRubyVersion: 3.1
3+
TargetRubyVersion: 3.2
44
SuggestExtensions: false
55
Exclude:
66
- vendor/**/*

.rubocop_todo.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2025-12-20 20:56:19 UTC using RuboCop version 1.81.7.
3+
# on 2026-01-25 16:15:24 UTC using RuboCop version 1.82.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -39,12 +39,11 @@ RSpec/ExampleWording:
3939
- 'spec/grape/integration/global_namespace_function_spec.rb'
4040
- 'spec/grape/validations_spec.rb'
4141

42-
# Offense count: 6
42+
# Offense count: 2
4343
# This cop supports safe autocorrection (--autocorrect).
4444
RSpec/ExpectActual:
4545
Exclude:
4646
- '**/spec/routing/**/*'
47-
- 'spec/grape/endpoint/declared_spec.rb'
4847
- 'spec/grape/middleware/exception_spec.rb'
4948

5049
# Offense count: 1

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ group :development, :test do
88
gem 'builder', require: false
99
gem 'bundler'
1010
gem 'rake'
11-
gem 'rubocop', '1.81.7', require: false
11+
gem 'rubocop', '1.82.1', require: false
1212
gem 'rubocop-performance', '1.26.1', require: false
13-
gem 'rubocop-rspec', '3.8.0', require: false
13+
gem 'rubocop-rspec', '3.9.0', require: false
1414
end
1515

1616
group :development do

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ The maintainers of Grape are working with Tidelift to deliver commercial support
178178

179179
## Installation
180180

181-
Ruby 3.1 or newer is required.
181+
Ruby 3.2 or newer is required.
182182

183183
Grape is available as a gem, to install it run:
184184

gemfiles/rails_7_1.gemfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

grape.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
2020
'rubygems_mfa_required' => 'true'
2121
}
2222

23-
s.add_dependency 'activesupport', '>= 7.1'
23+
s.add_dependency 'activesupport', '>= 7.2'
2424
s.add_dependency 'dry-configurable'
2525
s.add_dependency 'dry-types', '>= 1.1'
2626
s.add_dependency 'mustermann-grape', '~> 1.1.0'
@@ -29,5 +29,5 @@ Gem::Specification.new do |s|
2929

3030
s.files = Dir['lib/**/*', 'CHANGELOG.md', 'CONTRIBUTING.md', 'README.md', 'grape.png', 'UPGRADING.md', 'LICENSE', 'grape.gemspec']
3131
s.require_paths = ['lib']
32-
s.required_ruby_version = '>= 3.1'
32+
s.required_ruby_version = '>= 3.2'
3333
end

lib/grape.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
require 'rack/auth/basic'
3434
require 'rack/builder'
3535
require 'rack/head'
36-
require 'set'
3736
require 'singleton'
3837
require 'zeitwerk'
3938

lib/grape/dsl/routing.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,14 @@ def routes
223223
#
224224
# @param param [Symbol] The name of the parameter you wish to declare.
225225
# @option options [Regexp] You may supply a regular expression that the declared parameter must meet.
226-
def route_param(param, requirements: nil, type: nil, **options, &)
226+
def route_param(param, requirements: nil, type: nil, **, &)
227227
requirements = { param.to_sym => requirements } if requirements.is_a?(Regexp)
228228

229229
Grape::Validations::ParamsScope.new(api: self) do
230230
requires param, type: type
231231
end if type
232232

233-
namespace(":#{param}", requirements: requirements, **options, &)
233+
namespace(":#{param}", requirements: requirements, **, &)
234234
end
235235

236236
# @return array of defined versions

0 commit comments

Comments
 (0)