From d81b08d5e31583419c4a27b0c186ac90d16ef6c3 Mon Sep 17 00:00:00 2001 From: Yuva Date: Fri, 22 Nov 2024 23:48:26 +0530 Subject: [PATCH] Remove unsupported Rails/Ruby versions --- .github/workflows/ci.yml | 86 ++----------------- Gemfile | 2 +- gemfiles/Gemfile.rails-4.2.x | 7 -- gemfiles/Gemfile.rails-5.0.x | 7 -- gemfiles/Gemfile.rails-5.1.x | 7 -- gemfiles/Gemfile.rails-5.2.x | 6 -- ...emfile.rails-6.0.x => Gemfile.rails-7.1.x} | 2 +- ...emfile.rails-6.1.x => Gemfile.rails-7.2.x} | 2 +- rapidfire.gemspec | 5 -- 9 files changed, 12 insertions(+), 112 deletions(-) delete mode 100644 gemfiles/Gemfile.rails-4.2.x delete mode 100644 gemfiles/Gemfile.rails-5.0.x delete mode 100644 gemfiles/Gemfile.rails-5.1.x delete mode 100644 gemfiles/Gemfile.rails-5.2.x rename gemfiles/{Gemfile.rails-6.0.x => Gemfile.rails-7.1.x} (73%) rename gemfiles/{Gemfile.rails-6.1.x => Gemfile.rails-7.2.x} (73%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e904dc4d..14a45d03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,90 +15,22 @@ jobs: # https://rubyonrails.org/category/releases # https://rubyonrails.org/maintenance rails: - - 4.2.0 # not maintained by rails team - - 5.0.0 # not maintained by rails team - - 5.1.0 # not maintained by rails team - - 5.2.0 # not maintained by rails team - - 6.0.0 - - 6.1.0 - 7.0.0 + - 7.1.0 + - 7.2.0 - 8.0.0 # https://www.ruby-lang.org/en/downloads/ ruby: - - 2.4.10 # not maintained by ruby team - - 2.5.9 # not maintained by ruby team - - 2.6.10 # not maintained by ruby team - - 2.7.8 # security maintenance phase - - 3.0.6 - - 3.1.4 - - 3.2.2 + - 3.1.6 + - 3.2.6 + - 3.3.6 exclude: - # rails 4.2.x needs bundler version < 2.0 - - rails: 4.2.0 - ruby: 2.4.10 - - rails: 4.2.0 - ruby: 2.5.9 - - rails: 4.2.0 - ruby: 2.6.10 - - rails: 4.2.0 - ruby: 2.7.8 - - rails: 4.2.0 - ruby: 3.0.6 - - rails: 4.2.0 - ruby: 3.1.4 - - rails: 4.2.0 - ruby: 3.2.2 - # rails 5.x.x won't support Ruby 3+ - # https://github.com/rails/rails/issues/38426 - - rails: 5.0.0 - ruby: 3.0.6 - - rails: 5.0.0 - ruby: 3.1.4 - - rails: 5.0.0 - ruby: 3.2.2 - - rails: 5.1.0 - ruby: 3.0.6 - - rails: 5.1.0 - ruby: 3.1.4 - - rails: 5.1.0 - ruby: 3.2.2 - - rails: 5.2.0 - ruby: 3.0.6 - - rails: 5.2.0 - ruby: 3.1.4 - - rails: 5.2.0 - ruby: 3.2.2 - # rails 5.2.0 has issues with psych gem with AR - # https://github.com/rails/rails/issues/45590 - - rails: 5.2.0 - ruby: 2.5.9 - # Rails 6 needs ruby >= 2.5.0 - - rails: 6.0.0 - ruby: 2.4.10 - # Rails 6.1 needs ruby >= 2.5.0 - - rails: 6.1.0 - ruby: 2.4.10 - # Rails 7 needs ruby >= 2.7.0 - - rails: 7.0.0 - ruby: 2.4.10 - - rails: 7.0.0 - ruby: 2.5.9 - - rails: 7.0.0 - ruby: 2.6.10 - # Rails 8 needs ruby >= 3.1.0 + # rails 8.0.x needs Ruby version >= 3.2 - rails: 8.0.0 - ruby: 2.4.10 - - rails: 8.0.0 - ruby: 2.5.9 - - rails: 8.0.0 - ruby: 2.6.10 - - rails: 8.0.0 - ruby: 2.7.8 - - rails: 8.0.0 - ruby: 3.0.6 + ruby: 3.1.6 services: postgres: - image: postgres:11-alpine + image: postgres:17.1-alpine ports: - "5432:5432" env: @@ -112,7 +44,7 @@ jobs: DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test" steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Ruby and gems uses: ruby/setup-ruby@v1 with: diff --git a/Gemfile b/Gemfile index ba5c6c34..bf17eb4c 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' gemspec -gem 'rails', '~> 8.0.0' +gem 'rails', "~> #{ENV['RAILS_VERSION']}" gem 'pg' gem 'ostruct' diff --git a/gemfiles/Gemfile.rails-4.2.x b/gemfiles/Gemfile.rails-4.2.x deleted file mode 100644 index 946788b8..00000000 --- a/gemfiles/Gemfile.rails-4.2.x +++ /dev/null @@ -1,7 +0,0 @@ -# -*- ruby -*- - -source 'https://rubygems.org' - -gemspec path: '..' -gem 'rails', '~> 4.2.0' -gem 'sqlite3', '~> 1.3.6' diff --git a/gemfiles/Gemfile.rails-5.0.x b/gemfiles/Gemfile.rails-5.0.x deleted file mode 100644 index 670982b0..00000000 --- a/gemfiles/Gemfile.rails-5.0.x +++ /dev/null @@ -1,7 +0,0 @@ -# -*- ruby -*- - -source 'https://rubygems.org' - -gemspec path: '..' -gem 'rails', '~> 5.0.0' -gem 'sqlite3', '~> 1.3.6' diff --git a/gemfiles/Gemfile.rails-5.1.x b/gemfiles/Gemfile.rails-5.1.x deleted file mode 100644 index 269c6da1..00000000 --- a/gemfiles/Gemfile.rails-5.1.x +++ /dev/null @@ -1,7 +0,0 @@ -# -*- ruby -*- - -source 'https://rubygems.org' - -gemspec path: '..' -gem 'rails', '~> 5.1.0' -gem 'sqlite3', '~> 1.3.6' diff --git a/gemfiles/Gemfile.rails-5.2.x b/gemfiles/Gemfile.rails-5.2.x deleted file mode 100644 index d4e6d87b..00000000 --- a/gemfiles/Gemfile.rails-5.2.x +++ /dev/null @@ -1,6 +0,0 @@ -# -*- ruby -*- - -source 'https://rubygems.org' - -gemspec path: '..' -gem 'rails', '~> 5.2.0' diff --git a/gemfiles/Gemfile.rails-6.0.x b/gemfiles/Gemfile.rails-7.1.x similarity index 73% rename from gemfiles/Gemfile.rails-6.0.x rename to gemfiles/Gemfile.rails-7.1.x index d1f5f994..3f24c459 100644 --- a/gemfiles/Gemfile.rails-6.0.x +++ b/gemfiles/Gemfile.rails-7.1.x @@ -3,4 +3,4 @@ source 'https://rubygems.org' gemspec path: '..' -gem 'rails', '~> 6.0.0' +gem 'rails', '~> 7.1.0' diff --git a/gemfiles/Gemfile.rails-6.1.x b/gemfiles/Gemfile.rails-7.2.x similarity index 73% rename from gemfiles/Gemfile.rails-6.1.x rename to gemfiles/Gemfile.rails-7.2.x index 660c1a51..564aca78 100644 --- a/gemfiles/Gemfile.rails-6.1.x +++ b/gemfiles/Gemfile.rails-7.2.x @@ -3,4 +3,4 @@ source 'https://rubygems.org' gemspec path: '..' -gem 'rails', '~> 6.1.0' +gem 'rails', '~> 7.2.0' diff --git a/rapidfire.gemspec b/rapidfire.gemspec index 15debd51..0a5de5de 100644 --- a/rapidfire.gemspec +++ b/rapidfire.gemspec @@ -15,11 +15,6 @@ Gem::Specification.new do |s| s.files = Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.md'] s.test_files = Dir['spec/**/*'] - s.post_install_message = <<-PIM -There is breaking delimiter change when upgrading to version 2.0.0. -Please see Readme for more information. -PIM - s.add_dependency 'rails', '>= 7.0.0' s.add_dependency 'active_model_serializers', '~> 0.10.0' s.add_development_dependency 'sqlite3'