Skip to content

Commit

Permalink
Update sentry-rails' Gemfile conditions to support Rails 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 committed Oct 26, 2024
1 parent 23f7661 commit 1d0eef7
Showing 1 changed file with 27 additions and 21 deletions.
48 changes: 27 additions & 21 deletions sentry-rails/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,53 @@ platform :jruby do
gem "jdbc-sqlite3"
end

ruby_version = Gem::Version.new(RUBY_VERSION)

rails_version = ENV["RAILS_VERSION"]
rails_version = "7.1.0" if rails_version.nil?
rails_version = "7.2.0" if rails_version.nil?
rails_version = Gem::Version.new(rails_version)

if rails_version < Gem::Version.new("6.0.0")
gem "sqlite3", "~> 1.3.0", platform: :ruby
else
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.7.0")
gem "sqlite3", "~> 1.7.3", platform: :ruby
else
gem "sqlite3", "~> 1.6.9", platform: :ruby
end
end

if rails_version >= Gem::Version.new("8.0.0.alpha")
if rails_version >= Gem::Version.new("8.1.0.alpha")
gem "rails", github: "rails/rails"
gem "rspec-rails"
gem "sqlite3", platform: :ruby
elsif rails_version >= Gem::Version.new("7.1.0")
gem "rails", "~> #{rails_version}"
gem "rspec-rails"
gem "sqlite3", "~> 1.7.3", platform: :ruby
elsif rails_version >= Gem::Version.new("6.1.0")
gem "rspec-rails", "~> 4.0"
gem "rails", "~> #{rails_version}"

if ruby_version >= Gem::Version.new("2.7.0")
gem "sqlite3", "~> 1.7.3", platform: :ruby
else
gem "sqlite3", "~> 1.6.9", platform: :ruby
end
elsif rails_version >= Gem::Version.new("6.0.0")
gem "sqlite3", "~> 1.4.0", platform: :ruby
gem "rspec-rails", "~> 4.0"
gem "rails", "~> #{rails_version}"
gem "psych", "~> 3.0.0"
else
gem "sqlite3", "~> 1.3.0", platform: :ruby
gem "rspec-rails", "~> 4.0"
gem "rails", "~> #{rails_version}"
gem "psych", "~> 3.0.0"
end

gem "mini_magick"

gem "sprockets-rails"

gem "sidekiq"


ruby_version = Gem::Version.new(RUBY_VERSION)

if ruby_version < Gem::Version.new("2.5.0")
# https://github.com/flavorjones/loofah/pull/267
# loofah changed the required ruby version in a patch so we need to explicitly pin it
gem "loofah", "2.20.0"
end

gem "mini_magick"

gem "sprockets-rails"

gem "sidekiq"

gem "benchmark-ips"
gem "benchmark_driver"
gem "benchmark-ipsa"
Expand Down

0 comments on commit 1d0eef7

Please sign in to comment.