From 3891f34c24c5f9ff073bcdf5dea0eaf8820a9bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl-Ian?= Date: Thu, 23 Oct 2025 11:23:27 +0200 Subject: [PATCH] Drop support for Rails 7.1 and Ruby 2.7 and 3.0 --- .github/workflows/unit-tests.yml | 18 ++---------------- .rubocop.yml | 2 +- dev/gemfiles/rails-7.1.x.gemfile | 9 --------- postcode_validator.gemspec | 2 +- spec/spec_helper.rb | 2 +- 5 files changed, 5 insertions(+), 28 deletions(-) delete mode 100644 dev/gemfiles/rails-7.1.x.gemfile diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index a027788..801b47d 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -10,28 +10,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4"] + ruby: ["3.1", "3.2", "3.3", "3.4"] gemfile: [ - dev/gemfiles/rails-7.1.x.gemfile, dev/gemfiles/rails-7.2.x.gemfile, dev/gemfiles/rails-8.0.x.gemfile, Gemfile ] exclude: - # Exclude rubies < 3.1 for ActiveModel ~> 7.2 - - ruby: "2.7" - gemfile: dev/gemfiles/rails-7.2.x.gemfile - - ruby: "3.0" - gemfile: dev/gemfiles/rails-7.2.x.gemfile - # Exclude rubies < 3.2 for ActiveModel ~> 8.0 - - ruby: "2.7" - gemfile: dev/gemfiles/rails-8.0.x.gemfile - - ruby: "2.7" - gemfile: Gemfile - - ruby: "3.0" - gemfile: dev/gemfiles/rails-8.0.x.gemfile - - ruby: "3.0" - gemfile: Gemfile + # Exclude rubies < 3.2 for ActiveModel < 8.0 - ruby: "3.1" gemfile: dev/gemfiles/rails-8.0.x.gemfile - ruby: "3.1" diff --git a/.rubocop.yml b/.rubocop.yml index c050fde..196aeeb 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,7 +4,7 @@ plugins: - rubocop-rspec AllCops: - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.1 NewCops: enable Naming/FileName: diff --git a/dev/gemfiles/rails-7.1.x.gemfile b/dev/gemfiles/rails-7.1.x.gemfile deleted file mode 100644 index 9a3990f..0000000 --- a/dev/gemfiles/rails-7.1.x.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -source 'https://rubygems.org' - -gemspec path: '../..' -gem 'activemodel', '~> 7.1.0' -gem 'bigdecimal' -gem 'logger' -gem 'mutex_m' diff --git a/postcode_validator.gemspec b/postcode_validator.gemspec index 91749e0..95cf1d1 100644 --- a/postcode_validator.gemspec +++ b/postcode_validator.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| f.match(excluded_dirs) || excluded_files.include?(f) end - spec.required_ruby_version = '>= 2.7' + spec.required_ruby_version = '>= 3.1' spec.add_dependency 'twitter_cldr', '> 4.4.0' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 406a090..5a713ab 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -37,4 +37,4 @@ end end -Dir[File.join(__dir__, 'support', '**', '*.rb')].sort.each { |f| require f } +Dir[File.join(__dir__, 'support', '**', '*.rb')].each { |f| require f }