From 4dcef5f28ab5aa151ed6177d728a826362d89d82 Mon Sep 17 00:00:00 2001 From: RicardoTrindade Date: Wed, 16 Oct 2024 22:44:28 +0100 Subject: [PATCH 1/2] Remove Ruby version checks from gemfile --- Gemfile | 2 -- integration/apps/rack/Gemfile | 21 ++++++--------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/Gemfile b/Gemfile index 3e123675675..12abc1f80b5 100644 --- a/Gemfile +++ b/Gemfile @@ -73,8 +73,6 @@ gem 'dogstatsd-ruby', '>= 3.3.0', '!= 5.0.0', '!= 5.0.1', '!= 5.1.0' if RUBY_PLATFORM != 'java' if RUBY_VERSION >= '2.7.0' # Bundler 1.x fails to find that versions >= 3.8.0 are not compatible because of binary gems gem 'google-protobuf', ['~> 3.0', '!= 3.7.0', '!= 3.7.1'] - elsif RUBY_VERSION >= '2.3.0' - gem 'google-protobuf', ['~> 3.0', '!= 3.7.0', '!= 3.7.1', '< 3.19.2'] else gem 'google-protobuf', ['~> 3.0', '!= 3.7.0', '!= 3.7.1', '< 3.8.0'] end diff --git a/integration/apps/rack/Gemfile b/integration/apps/rack/Gemfile index f3f9469dda9..28b027890ea 100644 --- a/integration/apps/rack/Gemfile +++ b/integration/apps/rack/Gemfile @@ -10,19 +10,11 @@ else gem 'passenger' end gem 'rack' -gem 'rackup' if RUBY_VERSION >= '2.4' # The `rackup` is its own gem since Rack 3.0 +gem 'rackup' -if RUBY_VERSION < '2.3' - gem 'redis', '< 4.1.1' # 4.1.1 "claims" to support 2.2 but is actually broken -else - # Known compatibility issue: https://github.com/redis/redis-rb/issues/1142 - gem 'redis', '< 5' -end -if RUBY_VERSION < '2.2' - gem 'sidekiq', '< 5' # 5.0.3 checks for older Rubies and breaks, but does not declare it on the gemspec :( -else - gem 'sidekiq' -end +# Known compatibility issue: https://github.com/redis/redis-rb/issues/1142 +gem 'redis', '< 5' +gem 'sidekiq' gem 'resque' gem 'rake' @@ -31,12 +23,11 @@ gem 'dogstatsd-ruby' gem 'datadog', *Datadog::DemoEnv.gem_spec('datadog') # Development -gem 'pry-byebug' if RUBY_VERSION >= '2.3.0' && RUBY_ENGINE != 'truffleruby' && RUBY_VERSION < '3.2.0' -gem 'pry-nav' if RUBY_VERSION < '2.3.0' +gem 'pry-byebug' if RUBY_ENGINE != 'truffleruby' && RUBY_VERSION < '3.2.0' # gem 'pry-stack_explorer', platform: :ruby # gem 'rbtrace' # gem 'ruby-prof' gem 'rspec' gem 'rspec-wait' -gem 'webrick' if RUBY_VERSION >= '2.3' # Older Rubies can just use the built-in version of webrick +gem 'webrick' From 9085e6202748e71b4d91a69005aa5319b71a32d9 Mon Sep 17 00:00:00 2001 From: RicardoTrindade Date: Thu, 17 Oct 2024 09:54:51 +0100 Subject: [PATCH 2/2] Fix google-protobuf conditions --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 12abc1f80b5..0a02fae14a9 100644 --- a/Gemfile +++ b/Gemfile @@ -74,7 +74,7 @@ if RUBY_PLATFORM != 'java' if RUBY_VERSION >= '2.7.0' # Bundler 1.x fails to find that versions >= 3.8.0 are not compatible because of binary gems gem 'google-protobuf', ['~> 3.0', '!= 3.7.0', '!= 3.7.1'] else - gem 'google-protobuf', ['~> 3.0', '!= 3.7.0', '!= 3.7.1', '< 3.8.0'] + gem 'google-protobuf', ['~> 3.0', '!= 3.7.0', '!= 3.7.1', '< 3.19.2'] end end