From 68616030387b780feacf3f723d2992bfb38dfc88 Mon Sep 17 00:00:00 2001 From: adi-herwana-nus Date: Wed, 4 Sep 2024 15:37:11 +0800 Subject: [PATCH] chore: upgrade to rails 7.2, ruby {3.2, 3.3} and add test config - migrated pipeline from 'coveralls' to 'coveralls_reborn' - update test case for ruby 3.3 - bump version and update changelog --- .github/workflows/ruby.yml | 10 +++++++--- Appraisals | 12 ++++-------- CHANGELOG.md | 11 +++++++++++ Gemfile | 2 +- active_record-acts_as.gemspec | 6 +++--- gemfiles/rails_6.1.gemfile | 8 -------- gemfiles/rails_7.0.gemfile | 2 +- gemfiles/rails_7.1.gemfile | 2 +- gemfiles/{rails_6.0.gemfile => rails_7.2.gemfile} | 4 ++-- lib/active_record/acts_as/version.rb | 2 +- spec/actable_spec.rb | 6 +++++- 11 files changed, 36 insertions(+), 29 deletions(-) delete mode 100644 gemfiles/rails_6.1.gemfile rename gemfiles/{rails_6.0.gemfile => rails_7.2.gemfile} (60%) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 4d90c0a..2f823e1 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,12 +24,15 @@ 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: ['7.0', '7.1', '7.2'] + exclude: + - ruby-version: '3.0' + activerecord: '7.2' env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.activerecord }}.gemfile steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, # change this to (see https://github.com/ruby/setup-ruby#versioning): diff --git a/Appraisals b/Appraisals index a7c1e05..1a4b83f 100644 --- a/Appraisals +++ b/Appraisals @@ -1,11 +1,3 @@ -appraise "rails-6.0" do - gem 'rails', '6.0.6.1' -end - -appraise "rails-6.1" do - gem 'rails', '~> 6.1' -end - appraise "rails-7.0" do gem 'rails', '~> 7.0' end @@ -13,3 +5,7 @@ end appraise "rails-7.1" do gem 'rails', '~> 7.1' end + +appraise "rails-7.2" do + gem 'rails', '~> 7.2' +end diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f5d6e9..0b43b02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [4.0.1] - 2024-09-04 + +### Added + +- Add support for rails 7.2 +- Add support for ruby 3.2 and 3.3 + +### Removed + +- Remove support for rails 6.x + ## [4.0.0] - 2024-06-03 ### Added 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/active_record-acts_as.gemspec b/active_record-acts_as.gemspec index ff6b459..e5d9466 100644 --- a/active_record-acts_as.gemspec +++ b/active_record-acts_as.gemspec @@ -6,7 +6,7 @@ require 'active_record/acts_as/version' Gem::Specification.new do |spec| spec.name = "active_record-acts_as" spec.version = ActiveRecord::ActsAs::VERSION - spec.authors = ["Hassan Zamani", "Manuel Meurer"] + spec.authors = ["Hassan Zamani", "Manuel Meurer", "Bivan Alzacky Harmanto", "Adi Suryanata Herwana"] spec.email = ["hsn.zamani@gmail.com", "manuel@krautcomputing.com"] spec.summary = %q{Simulate multi-table inheritance for activerecord models} spec.description = %q{Simulate multi-table inheritance for activerecord models using a plymorphic association} @@ -28,6 +28,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency "appraisal", "~> 2.1" spec.add_development_dependency "guard-rspec", "~> 4.7" - spec.add_dependency "activesupport", ">= 6.0" - spec.add_dependency "activerecord", ">= 6.0" + spec.add_dependency "activesupport", ">= 7.0" + spec.add_dependency "activerecord", ">= 7.0" end diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_6.1.gemfile deleted file mode 100644 index c66e7a3..0000000 --- a/gemfiles/rails_6.1.gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "coveralls", 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_6.0.gemfile b/gemfiles/rails_7.2.gemfile similarity index 60% rename from gemfiles/rails_6.0.gemfile rename to gemfiles/rails_7.2.gemfile index 3135523..261dd6c 100644 --- a/gemfiles/rails_6.0.gemfile +++ b/gemfiles/rails_7.2.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "coveralls", require: false -gem "rails", "6.0.6.1" +gem "coveralls_reborn", require: false +gem "rails", "~> 7.2" gemspec path: "../" diff --git a/lib/active_record/acts_as/version.rb b/lib/active_record/acts_as/version.rb index a83adf2..62ef070 100644 --- a/lib/active_record/acts_as/version.rb +++ b/lib/active_record/acts_as/version.rb @@ -1,5 +1,5 @@ module ActiveRecord module ActsAs - VERSION = "4.0.0" + VERSION = "4.0.1" end end 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 #