diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a853387..74cbcf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,8 +37,11 @@ jobs: strategy: fail-fast: false matrix: - activerecord: [ '6.1', '7.0', '7.1' ] - ruby: [ '3.0', '3.1', '3.2' ] + activerecord: [ '6.1', '7.0', '7.1', '7.2' ] + ruby: [ '3.0', '3.1', '3.2', '3.3' ] + exclude: + - activerecord: '7.2' + ruby: '3.0' timeout-minutes: 10 needs: - lint diff --git a/Appraisals b/Appraisals index e910e18..eb969f0 100644 --- a/Appraisals +++ b/Appraisals @@ -11,3 +11,7 @@ end appraise "activerecord_7.1" do gem "activerecord", ">= 7.1.0", "< 7.2" end + +appraise "activerecord_7.2" do + gem "activerecord", ">= 7.2.0", "< 7.3" +end diff --git a/CHANGELOG.md b/CHANGELOG.md index 0da4b79..7024da6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # activerecord-postgres_pub_sub +## v3.1.0 +- Add support for ActiveRecord 7.2 +- Add support for Ruby 3.3 + ## v3.0.0 - Add support for multiple databases by allowing injection of the base Active Record class. - BREAKING: Drop support for ActiveRecord 5.2, 6.0 diff --git a/activerecord-postgres_pub_sub.gemspec b/activerecord-postgres_pub_sub.gemspec index 61aad8d..7afa489 100644 --- a/activerecord-postgres_pub_sub.gemspec +++ b/activerecord-postgres_pub_sub.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.required_ruby_version = ">= 3.0.0" - spec.add_runtime_dependency "activerecord", "> 6.0", "< 7.2" + spec.add_runtime_dependency "activerecord", "> 6.0", "< 7.3" spec.add_runtime_dependency "pg", "~> 1.1" spec.add_runtime_dependency "private_attr" spec.add_runtime_dependency "with_advisory_lock" diff --git a/gemfiles/activerecord_7.2.gemfile b/gemfiles/activerecord_7.2.gemfile new file mode 100644 index 0000000..a91e27d --- /dev/null +++ b/gemfiles/activerecord_7.2.gemfile @@ -0,0 +1,7 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activerecord", ">= 7.2.0", "< 7.3" + +gemspec path: "../" diff --git a/lib/activerecord/postgres_pub_sub/version.rb b/lib/activerecord/postgres_pub_sub/version.rb index 508dc17..649737d 100644 --- a/lib/activerecord/postgres_pub_sub/version.rb +++ b/lib/activerecord/postgres_pub_sub/version.rb @@ -2,6 +2,6 @@ module ActiveRecord module PostgresPubSub - VERSION = "3.0.0" + VERSION = "3.1.0" end end diff --git a/spec/active_record/postgres_pub_sub/listener_spec.rb b/spec/active_record/postgres_pub_sub/listener_spec.rb index f5a1ee0..f1f7657 100644 --- a/spec/active_record/postgres_pub_sub/listener_spec.rb +++ b/spec/active_record/postgres_pub_sub/listener_spec.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require "ostruct" + RSpec.describe ActiveRecord::PostgresPubSub::Listener, cleaner_strategy: :truncation do let(:channel) { "pub_sub_test" } let(:base_class) { ActiveRecord::Base } @@ -17,7 +19,7 @@ Thread.new do listener_loop(**listener_options) ensure - base_class.clear_active_connections! + base_class.connection_handler.clear_active_connections! end end @@ -48,7 +50,7 @@ end end ensure - ActiveRecord::Base.clear_active_connections! + ActiveRecord::Base.connection_handler.clear_active_connections! end end