From d0d178a5924a95f18a1eb95cd0da71ec8038fb74 Mon Sep 17 00:00:00 2001 From: adi-herwana-nus Date: Fri, 30 Aug 2024 17:45:20 +0800 Subject: [PATCH] chore: upgrade to rails 7.2, ruby {3.2, 3.3} and add test config --- .github/workflows/ruby.yml | 16 ++++++++++++++-- Appraisals | 5 +++++ Gemfile | 2 +- gemfiles/rails_6.0.gemfile | 2 +- gemfiles/rails_6.1.gemfile | 2 +- gemfiles/rails_7.0.gemfile | 2 +- gemfiles/rails_7.1.gemfile | 2 +- gemfiles/rails_7.2.gemfile | 9 +++++++++ spec/actable_spec.rb | 6 +++++- 9 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 gemfiles/rails_7.2.gemfile diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 4d90c0a..e18b698 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -14,6 +14,7 @@ on: branches: ['master'] schedule: - cron: '0 0 * * 0' + workflow_dispatch: permissions: contents: read @@ -23,8 +24,19 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['3.0', '3.1', '3.2'] - activerecord: ['6.0', '6.1', '7.0', '7.1'] + ruby-version: ['3.0', '3.1', '3.2', '3.3'] + activerecord: ['6.0', '6.1', '7.0', '7.1', '7.2'] + exclude: + - ruby-version: '3.2' + activerecord: '6.0' + - ruby-version: '3.2' + activerecord: '6.1' + - ruby-version: '3.3' + activerecord: '6.0' + - ruby-version: '3.3' + activerecord: '6.1' + - ruby-version: '3.0' + activerecord: '7.2' env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.activerecord }}.gemfile steps: diff --git a/Appraisals b/Appraisals index a7c1e05..c803a32 100644 --- a/Appraisals +++ b/Appraisals @@ -13,3 +13,8 @@ end appraise "rails-7.1" do gem 'rails', '~> 7.1' end + +appraise "rails-7.2" do + gem 'rails', '~> 7.2' + gem "rspec-rails", '>= 6' +end diff --git a/Gemfile b/Gemfile index 94a3b15..129c4f8 100644 --- a/Gemfile +++ b/Gemfile @@ -3,4 +3,4 @@ source 'https://rubygems.org' # Specify your gem's dependencies in active_record-acts_as.gemspec gemspec -gem 'coveralls', require: false +gem 'coveralls_reborn', require: false diff --git a/gemfiles/rails_6.0.gemfile b/gemfiles/rails_6.0.gemfile index 3135523..c988734 100644 --- a/gemfiles/rails_6.0.gemfile +++ b/gemfiles/rails_6.0.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "coveralls", require: false +gem "coveralls_reborn", require: false gem "rails", "6.0.6.1" gemspec path: "../" diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_6.1.gemfile index c66e7a3..5cd7a95 100644 --- a/gemfiles/rails_6.1.gemfile +++ b/gemfiles/rails_6.1.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "coveralls", require: false +gem "coveralls_reborn", require: false gem "rails", "~> 6.1" gemspec path: "../" diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile index 06719d2..0a5bb37 100644 --- a/gemfiles/rails_7.0.gemfile +++ b/gemfiles/rails_7.0.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "coveralls", require: false +gem "coveralls_reborn", require: false gem "rails", "~> 7.0" gemspec path: "../" diff --git a/gemfiles/rails_7.1.gemfile b/gemfiles/rails_7.1.gemfile index d6b738d..558b853 100644 --- a/gemfiles/rails_7.1.gemfile +++ b/gemfiles/rails_7.1.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "coveralls", require: false +gem "coveralls_reborn", require: false gem "rails", "~> 7.1" gemspec path: "../" diff --git a/gemfiles/rails_7.2.gemfile b/gemfiles/rails_7.2.gemfile new file mode 100644 index 0000000..4ea6a21 --- /dev/null +++ b/gemfiles/rails_7.2.gemfile @@ -0,0 +1,9 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "coveralls_reborn", require: false +gem "rails", "~> 7.2" +gem "rspec-rails", ">= 6" + +gemspec path: "../" diff --git a/spec/actable_spec.rb b/spec/actable_spec.rb index 75515cc..9ccdc3e 100644 --- a/spec/actable_spec.rb +++ b/spec/actable_spec.rb @@ -49,7 +49,11 @@ it "raises NoMethodError for undefined methods on specific" do pen.save - expect{ pen.product.raise_error }.to raise_error(NoMethodError, /undefined method `non_existant_method' for #