diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 217f8329..18b05cc4 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -13,7 +13,6 @@ jobs: strategy: matrix: ruby: - - '2.7' - '3.0' - '3.1' - '3.2' @@ -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: @@ -71,7 +58,6 @@ jobs: ruby: - 'jruby-9.2.14.0' gemfile: - - rails6.0.gemfile - rails6.1.gemfile # TODO # - rails7.0.gemfile diff --git a/Appraisals b/Appraisals index 1451317b..30eeab1b 100644 --- a/Appraisals +++ b/Appraisals @@ -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 diff --git a/gemfiles/rails5.2.gemfile b/gemfiles/rails5.2.gemfile deleted file mode 100644 index 51584e71..00000000 --- a/gemfiles/rails5.2.gemfile +++ /dev/null @@ -1,41 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "allocation_stats", platforms: :mri, require: false -gem "appraisal", "~> 2.1" -gem "aruba", "~> 2.0" -gem "rspec", "~> 3.0" -gem "rspec-its" -gem "ruby-prof", platforms: :mri, require: false -gem "timecop" -gem "webmock" -gem "capistrano" -gem "rake" -gem "bump", "~> 0.10.0" -gem "activesupport", "~> 5.2" -gem "activemodel", "~> 5.2" -gem "activerecord", "~> 5.2" -gem "activejob", "~> 5.2" -gem "railties", "~> 5.2" -gem "actionpack", "~> 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" - -group :development do - gem "guard" - gem "guard-rspec" - gem "pry" - gem "pry-byebug", platforms: :mri - gem "rdoc" -end - -platforms :ruby_25 do - gem "mathn" -end - -gemspec path: "../" diff --git a/gemfiles/rails6.0.gemfile b/gemfiles/rails6.0.gemfile deleted file mode 100644 index ab0e971b..00000000 --- a/gemfiles/rails6.0.gemfile +++ /dev/null @@ -1,41 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "allocation_stats", platforms: :mri, require: false -gem "appraisal", "~> 2.1" -gem "aruba", "~> 2.0" -gem "rspec", "~> 3.0" -gem "rspec-its" -gem "ruby-prof", platforms: :mri, require: false -gem "timecop" -gem "webmock" -gem "capistrano" -gem "rake" -gem "bump", "~> 0.10.0" -gem "activesupport", "~> 6.0" -gem "activemodel", "~> 6.0" -gem "activerecord", "~> 6.0" -gem "activejob", "~> 6.0" -gem "railties", "~> 6.0" -gem "actionpack", "~> 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" - -group :development do - gem "guard" - gem "guard-rspec" - gem "pry" - gem "pry-byebug", platforms: :mri - gem "rdoc" -end - -platforms :ruby_25 do - gem "mathn" -end - -gemspec path: "../" diff --git a/gemfiles/sinatra.gemfile b/gemfiles/sinatra.gemfile index 3dd4bc34..be008e19 100644 --- a/gemfiles/sinatra.gemfile +++ b/gemfiles/sinatra.gemfile @@ -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 diff --git a/gemfiles/sinatra_1.gemfile b/gemfiles/sinatra_1.gemfile deleted file mode 100644 index cbea7f77..00000000 --- a/gemfiles/sinatra_1.gemfile +++ /dev/null @@ -1,31 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "allocation_stats", platforms: :mri, require: false -gem "appraisal", "~> 2.1" -gem "aruba", "~> 2.0" -gem "rspec", "~> 3.0" -gem "rspec-its" -gem "ruby-prof", platforms: :mri, require: false -gem "timecop" -gem "webmock" -gem "capistrano" -gem "rake" -gem "bump", "~> 0.10.0" -gem "sinatra", "< 2.0" -gem "rack-test" - -group :development do - gem "guard" - gem "guard-rspec" - gem "pry" - gem "pry-byebug", platforms: :mri - gem "rdoc" -end - -platforms :ruby_25 do - gem "mathn" -end - -gemspec path: "../"