From 522d1b9128035666e41f35465ab420b23e1003d4 Mon Sep 17 00:00:00 2001 From: Takuya Noguchi Date: Sat, 24 Jun 2023 11:27:43 +0000 Subject: [PATCH] Add rack 3.0 to the text matrix only in Ruby 2.4.0+ Signed-off-by: Takuya Noguchi --- Gemfile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 6a736ccc..f8184ec4 100644 --- a/Gemfile +++ b/Gemfile @@ -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')