Skip to content

Commit

Permalink
chore: update supported Ruby/Rails versions (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuap authored Mar 21, 2024
1 parent 6e82c78 commit 7e94758
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 207 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
strategy:
matrix:
ruby:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
Expand All @@ -23,26 +22,14 @@ jobs:
- hanami.gemfile
- rack.gemfile
- rack_1.gemfile
- rails5.2.gemfile
- rails6.0.gemfile
- rails6.1.gemfile
- rails7.0.gemfile
- rails7.1.gemfile
- resque.gemfile
- sinatra.gemfile
- sinatra_1.gemfile
- sidekiq.gemfile
- sidekiq7.gemfile
- standalone.gemfile
exclude:
- gemfile: hanami.gemfile
ruby: '2.7'
- gemfile: rails5.2.gemfile
ruby: '3.0'
- gemfile: rails5.2.gemfile
ruby: '3.1'
- gemfile: rails5.2.gemfile
ruby: '3.2'

# Has to be top level to cache properly
env:
Expand Down Expand Up @@ -71,7 +58,6 @@ jobs:
ruby:
- 'jruby-9.2.14.0'
gemfile:
- rails6.0.gemfile
- rails6.1.gemfile
# TODO
# - rails7.0.gemfile
Expand Down
133 changes: 54 additions & 79 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -2,124 +2,99 @@
# https://github.com/rails/rails/blob/main/rails.gemspec
RAILS_GEMS = %w[activesupport activemodel activerecord activejob railties actionpack]

appraise 'standalone' do
appraise "standalone" do
end

if RUBY_PLATFORM !~ /java/
appraise 'binding_of_caller' do
gem 'binding_of_caller'
appraise "binding_of_caller" do
gem "binding_of_caller"
end
end

appraise 'rack-1' do
appraise "rack-1" do
# Old (pre-2.0) Rack, works on all Rubies.
gem 'rack', '< 2.0'
gem "rack", "< 2.0"
end

appraise 'sinatra-1' do
gem 'sinatra', '< 2.0'
gem 'rack-test'
end

appraise 'delayed_job' do
gem 'delayed_job', '< 4.1.2' # See https://github.com/collectiveidea/delayed_job/pull/931
appraise "delayed_job" do
gem "delayed_job", "< 4.1.2" # See https://github.com/collectiveidea/delayed_job/pull/931
gem "activesupport", "> 3.1.12", "< 5.0.0" # Prevent buggy version from being installed
end

appraise 'resque' do
gem 'resque'
gem 'mock_redis'
end

appraise 'sidekiq' do
gem 'sidekiq', '~> 6'
appraise "resque" do
gem "resque"
gem "mock_redis"
end

appraise 'sidekiq7' do
gem 'sidekiq', '~> 7'
appraise "sidekiq" do
gem "sidekiq", "~> 6"
end

appraise 'rails5.2' do
RAILS_GEMS.each { |rails_gem| gem rails_gem, "~> 5.2" }
gem 'sqlite3', '~> 1.4', platforms: :mri
gem 'activerecord-jdbcsqlite3-adapter', '~> 52', platforms: :jruby
gem 'better_errors', require: false, platforms: :mri
gem 'rack-mini-profiler', require: false
gem 'rspec-rails'
gem 'tzinfo-data' # Needed for timezones to work on Windows
appraise "sidekiq7" do
gem "sidekiq", "~> 7"
end

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.5.0')
appraise 'rails6.0' do
RAILS_GEMS.each { |rails_gem| gem rails_gem, "~> 6.0" }
gem 'sqlite3', '~> 1.4', platforms: :mri
gem 'activerecord-jdbcsqlite3-adapter', '~> 60', platforms: :jruby
gem 'better_errors', require: false, platforms: :mri
gem 'rack-mini-profiler', require: false
gem 'rspec-rails'
gem 'tzinfo-data' # Needed for timezones to work on Windows
end

appraise 'rails6.1' do
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.5.0")
appraise "rails6.1" do
RAILS_GEMS.each { |rails_gem| gem rails_gem, "~> 6.1" }
gem 'sqlite3', '~> 1.4', platforms: :mri
gem 'activerecord-jdbcsqlite3-adapter', '~> 61', platforms: :jruby
gem 'better_errors', require: false, platforms: :mri
gem 'rack-mini-profiler', require: false
gem 'rspec-rails'
gem 'listen'
gem 'tzinfo-data' # Needed for timezones to work on Windows
gem "sqlite3", "~> 1.4", platforms: :mri
gem "activerecord-jdbcsqlite3-adapter", "~> 61", platforms: :jruby
gem "better_errors", require: false, platforms: :mri
gem "rack-mini-profiler", require: false
gem "rspec-rails"
gem "listen"
gem "tzinfo-data" # Needed for timezones to work on Windows
end

appraise 'rails7.0' do
appraise "rails7.0" do
RAILS_GEMS.each { |rails_gem| gem rails_gem, "~> 7.0" }
gem 'sqlite3', '~> 1.4', platforms: :mri
gem 'activerecord-jdbcsqlite3-adapter', '~> 60', platforms: :jruby
gem 'better_errors', require: false, platforms: :mri
gem 'rack-mini-profiler', require: false
gem 'rspec-rails'
gem 'tzinfo-data' # Needed for timezones to work on Windows
gem "sqlite3", "~> 1.4", platforms: :mri
gem "activerecord-jdbcsqlite3-adapter", "~> 60", platforms: :jruby
gem "better_errors", require: false, platforms: :mri
gem "rack-mini-profiler", require: false
gem "rspec-rails"
gem "tzinfo-data" # Needed for timezones to work on Windows
end

appraise 'rails7.1' do
appraise "rails7.1" do
RAILS_GEMS.each { |rails_gem| gem rails_gem, "~> 7.1" }
gem 'sqlite3', '~> 1.4', platforms: :mri
gem 'activerecord-jdbcsqlite3-adapter', '~> 60', platforms: :jruby
gem 'better_errors', require: false, platforms: :mri
gem 'rack-mini-profiler', require: false
gem 'rspec-rails'
gem 'tzinfo-data' # Needed for timezones to work on Windows
gem "sqlite3", "~> 1.4", platforms: :mri
gem "activerecord-jdbcsqlite3-adapter", "~> 60", platforms: :jruby
gem "better_errors", require: false, platforms: :mri
gem "rack-mini-profiler", require: false
gem "rspec-rails"
gem "tzinfo-data" # Needed for timezones to work on Windows
end

# Rails edge
appraise 'rails' do
RAILS_GEMS.each { |rails_gem| gem rails_gem, github: 'rails' }
gem 'rack', github: 'rack/rack', branch: '2-2-stable' # Rack's main branch is Rack 3, but ActionPack currently requires Rack 2
gem 'arel', github: 'rails/arel'
gem 'sqlite3', '~> 1.4', platforms: :mri
gem 'capistrano', '~> 3.0'
gem 'better_errors', require: false, platforms: :mri
gem 'rspec-rails'
appraise "rails" do
RAILS_GEMS.each { |rails_gem| gem rails_gem, github: "rails" }
gem "rack", github: "rack/rack", branch: "2-2-stable" # Rack"s main branch is Rack 3, but ActionPack currently requires Rack 2
gem "arel", github: "rails/arel"
gem "sqlite3", "~> 1.4", platforms: :mri
gem "capistrano", "~> 3.0"
gem "better_errors", require: false, platforms: :mri
gem "rspec-rails"

# Listen is a soft-dependency in Rails 5. Guard requires listen (which makes
# it present when generating a new Rails app), so Rails expects it to be
# there. See https://github.com/rails/rails/pull/24066
gem 'listen'
gem 'tzinfo-data' # Needed for timezones to work on Windows
gem "listen"
gem "tzinfo-data" # Needed for timezones to work on Windows
end
end

appraise 'rack' do
gem 'rack', '>= 2.0.0'
appraise "rack" do
gem "rack", ">= 2.0.0"
end

appraise 'sinatra' do
gem 'sinatra', '~> 2.0.0.beta1'
gem 'rack-test'
appraise "sinatra" do
gem "sinatra"
gem "rack-test"
end

appraise 'hanami' do
appraise "hanami" do
gem "hanami", "~> 2.0"
gem "hanami-router", "~> 2.0"
gem 'rack-test'
gem "rack-test"
end
41 changes: 0 additions & 41 deletions gemfiles/rails5.2.gemfile

This file was deleted.

41 changes: 0 additions & 41 deletions gemfiles/rails6.0.gemfile

This file was deleted.

2 changes: 1 addition & 1 deletion gemfiles/sinatra.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ gem "webmock"
gem "capistrano"
gem "rake"
gem "bump", "~> 0.10.0"
gem "sinatra", "~> 2.0.0.beta1"
gem "sinatra"
gem "rack-test"

group :development do
Expand Down
31 changes: 0 additions & 31 deletions gemfiles/sinatra_1.gemfile

This file was deleted.

0 comments on commit 7e94758

Please sign in to comment.