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
5 changes: 1 addition & 4 deletions .github/workflows/edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ['3.1', '3.2', '3.3', '3.4', '4.0', ruby-head, truffleruby-head, jruby-head]
ruby: ['3.2', '3.3', '3.4', '4.0', ruby-head, truffleruby-head, jruby-head]
gemfile: [rails_edge, rack_edge]
exclude:
- ruby: '3.1'
gemfile: rails_edge
runs-on: ubuntu-latest
continue-on-error: true
env:
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ['3.1', '3.2', '3.3', '3.4', '4.0']
ruby: ['3.2', '3.3', '3.4', '4.0']
gemfile:
- Gemfile
- gemfiles/rack_2_2.gemfile
- gemfiles/rack_3_0.gemfile
- gemfiles/rack_3_1.gemfile
- gemfiles/rack_3_2.gemfile
- gemfiles/rails_7_1.gemfile
- gemfiles/rails_7_2.gemfile
- gemfiles/rails_8_0.gemfile
- gemfiles/rails_8_1.gemfile
Expand All @@ -51,11 +50,6 @@ jobs:
- ruby: '4.0'
gemfile: gemfiles/multi_xml.gemfile
specs: 'spec/integration/multi_xml'
exclude:
- ruby: '3.1'
gemfile: gemfiles/rails_8_0.gemfile
- ruby: '3.1'
gemfile: gemfiles/rails_8_1.gemfile
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AllCops:
NewCops: enable
TargetRubyVersion: 3.1
TargetRubyVersion: 3.2
SuggestExtensions: false
Exclude:
- vendor/**/*
Expand Down
5 changes: 2 additions & 3 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2025-12-20 20:56:19 UTC using RuboCop version 1.81.7.
# on 2026-01-31 18:13:50 UTC using RuboCop version 1.84.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -39,12 +39,11 @@ RSpec/ExampleWording:
- 'spec/grape/integration/global_namespace_function_spec.rb'
- 'spec/grape/validations_spec.rb'

# Offense count: 6
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
RSpec/ExpectActual:
Exclude:
- '**/spec/routing/**/*'
- 'spec/grape/endpoint/declared_spec.rb'
- 'spec/grape/middleware/exception_spec.rb'

# Offense count: 1
Expand Down
9 changes: 2 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
### 3.2.0 (Next)

#### Fixes

* Your contribution here

#### Features

* Your contribution here

### 3.1.1 (2026-01-31)
* Your contribution here.

#### Fixes

* [#2655](https://github.com/ruby-grape/grape/pull/2655): Fix `before_each` method to handle `nil` parameter correctly - [@ericproulx](https://github.com/ericproulx).
* Your contribution here.

### 3.1.0 (2026-01-25)

Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ group :development, :test do
gem 'builder', require: false
gem 'bundler'
gem 'rake'
gem 'rubocop', '1.81.7', require: false
gem 'rubocop', '1.84.0', require: false
gem 'rubocop-performance', '1.26.1', require: false
gem 'rubocop-rspec', '3.8.0', require: false
gem 'rubocop-rspec', '3.9.0', require: false
end

group :development do
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ The maintainers of Grape are working with Tidelift to deliver commercial support

## Installation

Ruby 3.1 or newer is required.
Ruby 3.2 or newer is required.

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

Expand Down
6 changes: 0 additions & 6 deletions gemfiles/rails_7_1.gemfile

This file was deleted.

4 changes: 2 additions & 2 deletions grape.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|
'rubygems_mfa_required' => 'true'
}

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

s.files = Dir['lib/**/*', 'CHANGELOG.md', 'CONTRIBUTING.md', 'README.md', 'grape.png', 'UPGRADING.md', 'LICENSE', 'grape.gemspec']
s.require_paths = ['lib']
s.required_ruby_version = '>= 3.1'
s.required_ruby_version = '>= 3.2'
end
1 change: 0 additions & 1 deletion lib/grape.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
require 'rack/auth/basic'
require 'rack/builder'
require 'rack/head'
require 'set'
require 'singleton'
require 'zeitwerk'

Expand Down
4 changes: 2 additions & 2 deletions lib/grape/dsl/routing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ def routes
#
# @param param [Symbol] The name of the parameter you wish to declare.
# @option options [Regexp] You may supply a regular expression that the declared parameter must meet.
def route_param(param, requirements: nil, type: nil, **options, &)
def route_param(param, requirements: nil, type: nil, **, &)
requirements = { param.to_sym => requirements } if requirements.is_a?(Regexp)

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

namespace(":#{param}", requirements: requirements, **options, &)
namespace(":#{param}", requirements: requirements, **, &)
end

# @return array of defined versions
Expand Down