Skip to content

Commit

Permalink
chore: upgrade to rails 7.2, ruby {3.2, 3.3} and add test config
Browse files Browse the repository at this point in the history
  • Loading branch information
adi-herwana-nus committed Sep 3, 2024
1 parent 39cdc27 commit d0d178a
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 8 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
branches: ['master']
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:

permissions:
contents: read
Expand All @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion gemfiles/rails_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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: "../"
2 changes: 1 addition & 1 deletion gemfiles/rails_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "coveralls", require: false
gem "coveralls_reborn", require: false
gem "rails", "~> 6.1"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/rails_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "coveralls", require: false
gem "coveralls_reborn", require: false
gem "rails", "~> 7.0"

gemspec path: "../"
2 changes: 1 addition & 1 deletion gemfiles/rails_7.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "coveralls", require: false
gem "coveralls_reborn", require: false
gem "rails", "~> 7.1"

gemspec path: "../"
9 changes: 9 additions & 0 deletions gemfiles/rails_7.2.gemfile
Original file line number Diff line number Diff line change
@@ -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: "../"
6 changes: 5 additions & 1 deletion spec/actable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 #<Pen/)
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.3.0')
expect{ pen.product.raise_error }.to raise_error(NoMethodError, /undefined method `non_existant_method' for #<Pen/)
else
expect{ pen.product.raise_error }.to raise_error(NoMethodError, /undefined method `non_existant_method' for an instance of Pen/)
end
end

it "deletes specific subclass on destroy" do
Expand Down

0 comments on commit d0d178a

Please sign in to comment.