From 5dca38842b1786385aec5debe3c0a14e7240a2b4 Mon Sep 17 00:00:00 2001 From: Adrianna Chang Date: Tue, 21 Oct 2025 08:48:08 -0400 Subject: [PATCH 1/3] Check whether base respond_to? callback methods; we may be in a module --- lib/ar_transaction_changes.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ar_transaction_changes.rb b/lib/ar_transaction_changes.rb index 8df800e..67ce0b8 100644 --- a/lib/ar_transaction_changes.rb +++ b/lib/ar_transaction_changes.rb @@ -5,8 +5,10 @@ module ArTransactionChanges def self.included(base) - if !base._commit_callbacks.empty? || !base._rollback_callbacks.empty? - raise "ArTransactionChanges must be included before defining any after_commit or after_rollback callbacks" + if base.respond_to?(:_commit_callbacks) && base.respond_to?(:_rollback_callbacks) + if !base._commit_callbacks.empty? || !base._rollback_callbacks.empty? + raise "ArTransactionChanges must be included before defining any after_commit or after_rollback callbacks" + end end end From ad4760be192a45e827ee1ce4963c5fa1b0acbfdc Mon Sep 17 00:00:00 2001 From: Adrianna Chang Date: Mon, 20 Oct 2025 15:19:38 -0400 Subject: [PATCH 2/3] Release v1.1.10 --- lib/ar_transaction_changes/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ar_transaction_changes/version.rb b/lib/ar_transaction_changes/version.rb index fff086f..1641e42 100644 --- a/lib/ar_transaction_changes/version.rb +++ b/lib/ar_transaction_changes/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ArTransactionChanges - VERSION = "1.1.9" + VERSION = "1.1.10" end From 0c9a9e86e9ac0d0564227f170c94d2af2e422828 Mon Sep 17 00:00:00 2001 From: Adrianna Chang Date: Mon, 20 Oct 2025 15:24:36 -0400 Subject: [PATCH 3/3] Add release workflow --- .github/workflows/release.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..34dc8bd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release Gem + +on: + release: + types: [published] + +jobs: + release: + permissions: + contents: write + id-token: write + + environment: release + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + with: + persist-credentials: false + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: ruby + - uses: rubygems/release-gem@v1