Skip to content

Commit

Permalink
Add rack 3.0 to the text matrix only in Ruby 2.4.0+
Browse files Browse the repository at this point in the history
Signed-off-by: Takuya Noguchi <[email protected]>
  • Loading branch information
tnir authored and imjoehaines committed May 9, 2024
1 parent f1b1c58 commit 522d1b9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,15 @@ if ruby_version >= Gem::Version.new('2.2.0')
gem 'redis'
end

# rack 2.2.0 dropped support for Ruby 2.2
gem 'rack', ruby_version < Gem::Version.new('2.3.0') ? '< 2.2.0' : '~> 2.2'
if ruby_version < Gem::Version.new('2.3.0')
# rack 2.2.0 dropped support for Ruby 2.2
gem 'rack', '< 2.2.0'
elsif ruby_version < Gem::Version.new('2.4.0')
# rack 3.0.0 dropped support for Ruby 2.3
gem 'rack', '~> 2.2'
else
gem 'rack', '~> 3.0'
end

# rack-protection 3.0.0 requires Ruby 2.6+
gem 'rack-protection', '< 3.0.0' if ruby_version < Gem::Version.new('2.6.0')
Expand Down

0 comments on commit 522d1b9

Please sign in to comment.