From 380d0cd14fb3376df447820706f1117c97508ed3 Mon Sep 17 00:00:00 2001 From: Brian Shand Date: Tue, 28 Apr 2026 10:44:04 +0100 Subject: [PATCH 1/3] Support Rails 8.1, Ruby 4.0 --- .github/workflows/test.yml | 19 ++----------------- CHANGELOG.md | 3 ++- gemfiles/Gemfile.rails61 | 12 ------------ gemfiles/Gemfile.rails70 | 12 ------------ gemfiles/Gemfile.rails71 | 3 --- gemfiles/Gemfile.rails81 | 5 +++++ ndr_error.gemspec | 24 ++---------------------- 7 files changed, 11 insertions(+), 67 deletions(-) delete mode 100644 gemfiles/Gemfile.rails61 delete mode 100644 gemfiles/Gemfile.rails70 create mode 100644 gemfiles/Gemfile.rails81 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 270e31e..0dc56e6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,33 +8,18 @@ jobs: fail-fast: false matrix: ruby-version: - - '3.0' - - '3.1' - '3.2' - '3.3' - '3.4' + - '4.0' gemfile: - - gemfiles/Gemfile.rails61 - - gemfiles/Gemfile.rails70 - gemfiles/Gemfile.rails71 - gemfiles/Gemfile.rails72 - gemfiles/Gemfile.rails80 + - gemfiles/Gemfile.rails81 exclude: - # rails 6.1 requires ruby < 3.4 - - ruby-version: '3.4' - gemfile: 'gemfiles/Gemfile.rails61' - # rails 7.0 requires ruby >= 2.7, < 3.4 - # https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html - - ruby-version: '3.4' - gemfile: 'gemfiles/Gemfile.rails70' - # rails 7.2 requires ruby >= 3.1 - # https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html - - ruby-version: '3.0' - gemfile: 'gemfiles/Gemfile.rails72' # rails 8.0 requires ruby >= 3.2 # https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html - - ruby-version: '3.0' - gemfile: 'gemfiles/Gemfile.rails80' - ruby-version: '3.1' gemfile: 'gemfiles/Gemfile.rails80' diff --git a/CHANGELOG.md b/CHANGELOG.md index 87dffbc..8c03fa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [Unreleased] -* no unreleased changes +### Fixed +* Support Rails 8.1, Ruby 4.0 ## 2.4.3 / 2025-11-07 ### Fixed diff --git a/gemfiles/Gemfile.rails61 b/gemfiles/Gemfile.rails61 deleted file mode 100644 index 8fdb206..0000000 --- a/gemfiles/Gemfile.rails61 +++ /dev/null @@ -1,12 +0,0 @@ -source 'https://rubygems.org' - -gemspec path: '..' - -gem 'rails', '~> 6.1.0' - -# Rails 6.1 does not support sqlite3 2.x; it specifies gem "sqlite3", "~> 1.4" -# in lib/active_record/connection_adapters/sqlite3_adapter.rb -gem 'sqlite3', '~> 1.7' - -# Latest concurrent-ruby breaks Rails < 7.1. See https://github.com/rails/rails/issues/54260 -gem 'concurrent-ruby', '1.3.4' diff --git a/gemfiles/Gemfile.rails70 b/gemfiles/Gemfile.rails70 deleted file mode 100644 index 085807e..0000000 --- a/gemfiles/Gemfile.rails70 +++ /dev/null @@ -1,12 +0,0 @@ -source 'https://rubygems.org' - -gemspec path: '..' - -gem 'rails', '~> 7.0.0' - -# Rails 7.0 does not support sqlite3 2.x; it specifies gem "sqlite3", "~> 1.4" -# in lib/active_record/connection_adapters/sqlite3_adapter.rb -gem 'sqlite3', '~> 1.7' - -# Latest concurrent-ruby breaks Rails < 7.1. See https://github.com/rails/rails/issues/54260 -gem 'concurrent-ruby', '1.3.4' diff --git a/gemfiles/Gemfile.rails71 b/gemfiles/Gemfile.rails71 index 50624d7..173bb3f 100644 --- a/gemfiles/Gemfile.rails71 +++ b/gemfiles/Gemfile.rails71 @@ -3,6 +3,3 @@ source 'https://rubygems.org' gemspec path: '..' gem 'rails', '~> 7.1.0' - -# sqlite3 2.x is not supported on ruby 3.0 -gem 'sqlite3', '~> 1.7' diff --git a/gemfiles/Gemfile.rails81 b/gemfiles/Gemfile.rails81 new file mode 100644 index 0000000..4b958c0 --- /dev/null +++ b/gemfiles/Gemfile.rails81 @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gemspec path: '..' + +gem 'rails', '~> 8.1.0' diff --git a/ndr_error.gemspec b/ndr_error.gemspec index 3eb4556..7a53367 100644 --- a/ndr_error.gemspec +++ b/ndr_error.gemspec @@ -19,14 +19,9 @@ Gem::Specification.new do |s| s.files = Dir['{app,config,db,lib}/**/*', 'CHANGELOG.md', 'CODE_OF_CONDUCT.md', 'MIT-LICENSE', 'Rakefile', 'README.md'] - ['.travis.yml'] - s.required_ruby_version = '>= 3.0' + s.required_ruby_version = '>= 3.2' - s.add_dependency 'rails', '>= 6.1', '< 8.1' - - # Support rails 6.1 with Ruby 3.1 - s.add_dependency 'net-imap' - s.add_dependency 'net-pop' - s.add_dependency 'net-smtp' + s.add_dependency 'rails', '>= 7.1', '< 8.2' s.add_dependency 'will_paginate' @@ -35,23 +30,8 @@ Gem::Specification.new do |s| s.add_development_dependency 'pry' s.add_development_dependency 'puma' - # Rails 6.1 and 7.0 do not support sqlite3 2.x; they specify gem "sqlite3", "~> 1.4" - # in lib/active_record/connection_adapters/sqlite3_adapter.rb - # cf. gemfiles/Gemfile.rails70 s.add_development_dependency 'sqlite3' - # Workaround build issue on GitHub Actions with ruby <= 3.1 when installing sass-embedded - # gem version 1.81.0: NoMethodError: undefined method `parse' for # - # https://bugs.ruby-lang.org/issues/19371 - s.add_development_dependency 'psych', '< 5' - - # Workaround build issue on GitHub Actions with ruby <= 3.1 when installing sass-embedded - # Versions 1.77.0 and above require ruby >= 3.2 for packaged x86_64-linux binaries - # but say they're compatible with ruby 3.1. - # 1.76.0 has a bug that was fixed in 1.77.1, which we can't use yet. - # https://github.com/sass/dart-sass/issues/2239 - s.add_development_dependency 'sass-embedded', '~> 1.75.0' if RUBY_VERSION.start_with?('3.1') # rubocop:disable Gemspec/RubyVersionGlobalsUsage - s.add_development_dependency 'mocha' s.add_development_dependency 'test-unit', '~> 3.0' From 34cf1c8a2c32718b9e77220cc2fb815faf840c2e Mon Sep 17 00:00:00 2001 From: Brian Shand Date: Wed, 8 Jul 2026 11:08:21 +0100 Subject: [PATCH 2/3] Drop support for Ruby 3.2 --- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 1 - CHANGELOG.md | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2e22d41..86b05be 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # ruby/setup-ruby@v1 see https://github.com/ruby/setup-ruby/tree/v1 with: - ruby-version: 3.4 + ruby-version: 4.0 - name: Install dependencies run: bundle install - name: Run RuboCop against BASE..HEAD changes diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 976037d..1379e29 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,6 @@ jobs: fail-fast: false matrix: ruby-version: - - '3.2' - '3.3' - '3.4' - '4.0' diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c03fa6..c3a8624 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## [Unreleased] ### Fixed -* Support Rails 8.1, Ruby 4.0 +* Support Rails 8.1, Ruby 4.0. Drop support for Ruby 3.2 ## 2.4.3 / 2025-11-07 ### Fixed From e01b17940206da9fb4909bc747485e2615f98d08 Mon Sep 17 00:00:00 2001 From: Brian Shand Date: Wed, 8 Jul 2026 11:09:38 +0100 Subject: [PATCH 3/3] Drop support for Ruby 3.2 --- ndr_error.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndr_error.gemspec b/ndr_error.gemspec index acad14c..87d8a53 100644 --- a/ndr_error.gemspec +++ b/ndr_error.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| s.files = Dir['{app,config,db,lib}/**/*', 'CHANGELOG.md', 'CODE_OF_CONDUCT.md', 'MIT-LICENSE', 'Rakefile', 'README.md', 'SECURITY.md'] - s.required_ruby_version = '>= 3.2' + s.required_ruby_version = '>= 3.3' s.add_dependency 'rails', '>= 7.1', '< 8.2'