From def3d76de11dadc1235a9dc604658f34d3f7422a Mon Sep 17 00:00:00 2001 From: Pere Joan Martorell Date: Thu, 23 Oct 2025 11:42:54 +0200 Subject: [PATCH] Add support for ActiveRecord 8.0 and 8.1 - Updated gemspec to support ActiveRecord versions up to 8.2 - Added test configurations for ActiveRecord 8.0 and 8.1 - Added test configurations with strong_migrations integration - Generated gemfiles for all new configurations - All tests passing (13 examples, 0 failures) for both 8.0.3 and 8.1.0 - Updated CHANGELOG.md to document new Rails support --- Appraisals | 18 ++++ CHANGELOG.md | 4 + Gemfile.lock | 2 +- gemfiles/activerecord_6_1.gemfile.lock | 2 +- ...rd_6_1_with_strong_migrations.gemfile.lock | 2 +- gemfiles/activerecord_7.gemfile.lock | 2 +- gemfiles/activerecord_7_1.gemfile.lock | 2 +- ...rd_7_1_with_strong_migrations.gemfile.lock | 2 +- ...cord_7_with_strong_migrations.gemfile.lock | 2 +- gemfiles/activerecord_8_0.gemfile | 15 +++ gemfiles/activerecord_8_0.gemfile.lock | 99 +++++++++++++++++++ ...erecord_8_0_with_strong_migrations.gemfile | 16 +++ ...rd_8_0_with_strong_migrations.gemfile.lock | 88 +++++++++++++++++ gemfiles/activerecord_8_1.gemfile | 15 +++ gemfiles/activerecord_8_1.gemfile.lock | 85 ++++++++++++++++ ...erecord_8_1_with_strong_migrations.gemfile | 16 +++ ...rd_8_1_with_strong_migrations.gemfile.lock | 88 +++++++++++++++++ migration-lock-timeout.gemspec | 2 +- 18 files changed, 452 insertions(+), 8 deletions(-) create mode 100644 gemfiles/activerecord_8_0.gemfile create mode 100644 gemfiles/activerecord_8_0.gemfile.lock create mode 100644 gemfiles/activerecord_8_0_with_strong_migrations.gemfile create mode 100644 gemfiles/activerecord_8_0_with_strong_migrations.gemfile.lock create mode 100644 gemfiles/activerecord_8_1.gemfile create mode 100644 gemfiles/activerecord_8_1.gemfile.lock create mode 100644 gemfiles/activerecord_8_1_with_strong_migrations.gemfile create mode 100644 gemfiles/activerecord_8_1_with_strong_migrations.gemfile.lock diff --git a/Appraisals b/Appraisals index b44f752..7cf46a0 100644 --- a/Appraisals +++ b/Appraisals @@ -24,3 +24,21 @@ appraise "activerecord_7_1_with_strong_migrations" do gem "activerecord", "~> 7.1.0" gem "strong_migrations" end + +appraise "activerecord_8_0" do + gem "activerecord", "~> 8.0.0" +end + +appraise "activerecord_8_0_with_strong_migrations" do + gem "activerecord", "~> 8.0.0" + gem "strong_migrations" +end + +appraise "activerecord_8_1" do + gem "activerecord", "~> 8.1.0" +end + +appraise "activerecord_8_1_with_strong_migrations" do + gem "activerecord", "~> 8.1.0" + gem "strong_migrations" +end diff --git a/CHANGELOG.md b/CHANGELOG.md index e68291f..8ac3c43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Added +- Support for Rails 8.0 and 8.1 + ## [1.5.0] ### Removed - Dropped support for Rails 6.0 and earlier diff --git a/Gemfile.lock b/Gemfile.lock index 6769808..09a2b96 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: migration-lock-timeout (1.5.0) - activerecord (>= 6.1, < 8.0) + activerecord (>= 6.1, < 8.2) GEM remote: https://rubygems.org/ diff --git a/gemfiles/activerecord_6_1.gemfile.lock b/gemfiles/activerecord_6_1.gemfile.lock index 6eab6b2..82b9964 100644 --- a/gemfiles/activerecord_6_1.gemfile.lock +++ b/gemfiles/activerecord_6_1.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: .. specs: migration-lock-timeout (1.5.0) - activerecord (>= 6.1, < 8.0) + activerecord (>= 6.1, < 8.2) GEM remote: https://rubygems.org/ diff --git a/gemfiles/activerecord_6_1_with_strong_migrations.gemfile.lock b/gemfiles/activerecord_6_1_with_strong_migrations.gemfile.lock index b83448f..cbab523 100644 --- a/gemfiles/activerecord_6_1_with_strong_migrations.gemfile.lock +++ b/gemfiles/activerecord_6_1_with_strong_migrations.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: .. specs: migration-lock-timeout (1.5.0) - activerecord (>= 6.1, < 8.0) + activerecord (>= 6.1, < 8.2) GEM remote: https://rubygems.org/ diff --git a/gemfiles/activerecord_7.gemfile.lock b/gemfiles/activerecord_7.gemfile.lock index a3e403b..3574ac7 100644 --- a/gemfiles/activerecord_7.gemfile.lock +++ b/gemfiles/activerecord_7.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: .. specs: migration-lock-timeout (1.5.0) - activerecord (>= 6.1, < 8.0) + activerecord (>= 6.1, < 8.2) GEM remote: https://rubygems.org/ diff --git a/gemfiles/activerecord_7_1.gemfile.lock b/gemfiles/activerecord_7_1.gemfile.lock index 401aed6..706f55a 100644 --- a/gemfiles/activerecord_7_1.gemfile.lock +++ b/gemfiles/activerecord_7_1.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: .. specs: migration-lock-timeout (1.5.0) - activerecord (>= 6.1, < 8.0) + activerecord (>= 6.1, < 8.2) GEM remote: https://rubygems.org/ diff --git a/gemfiles/activerecord_7_1_with_strong_migrations.gemfile.lock b/gemfiles/activerecord_7_1_with_strong_migrations.gemfile.lock index fba5d96..d288036 100644 --- a/gemfiles/activerecord_7_1_with_strong_migrations.gemfile.lock +++ b/gemfiles/activerecord_7_1_with_strong_migrations.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: .. specs: migration-lock-timeout (1.5.0) - activerecord (>= 6.1, < 8.0) + activerecord (>= 6.1, < 8.2) GEM remote: https://rubygems.org/ diff --git a/gemfiles/activerecord_7_with_strong_migrations.gemfile.lock b/gemfiles/activerecord_7_with_strong_migrations.gemfile.lock index 9fd5eaf..0e8598f 100644 --- a/gemfiles/activerecord_7_with_strong_migrations.gemfile.lock +++ b/gemfiles/activerecord_7_with_strong_migrations.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: .. specs: migration-lock-timeout (1.5.0) - activerecord (>= 6.1, < 8.0) + activerecord (>= 6.1, < 8.2) GEM remote: https://rubygems.org/ diff --git a/gemfiles/activerecord_8_0.gemfile b/gemfiles/activerecord_8_0.gemfile new file mode 100644 index 0000000..7192b77 --- /dev/null +++ b/gemfiles/activerecord_8_0.gemfile @@ -0,0 +1,15 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activerecord", "~> 8.0.0" + +group :development, :test do + gem "appraisal", require: false + gem "database_cleaner", require: false + gem "pg", "~> 1.1", require: false + gem "rake", "~> 13", require: false + gem "rspec", "~> 3.2", require: false +end + +gemspec path: "../" diff --git a/gemfiles/activerecord_8_0.gemfile.lock b/gemfiles/activerecord_8_0.gemfile.lock new file mode 100644 index 0000000..9341be6 --- /dev/null +++ b/gemfiles/activerecord_8_0.gemfile.lock @@ -0,0 +1,99 @@ +PATH + remote: .. + specs: + migration-lock-timeout (1.5.0) + activerecord (>= 6.1, < 8.2) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (8.0.3) + activesupport (= 8.0.3) + activerecord (8.0.3) + activemodel (= 8.0.3) + activesupport (= 8.0.3) + timeout (>= 0.4.0) + activesupport (8.0.3) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + base64 (0.3.0) + benchmark (0.5.0) + bigdecimal (3.3.1) + concurrent-ruby (1.3.5) + connection_pool (2.5.4) + database_cleaner (2.1.0) + database_cleaner-active_record (>= 2, < 3) + database_cleaner-active_record (2.2.2) + activerecord (>= 5.a) + database_cleaner-core (~> 2.0) + database_cleaner-core (2.0.1) + diff-lcs (1.6.2) + drb (2.2.3) + i18n (1.14.7) + concurrent-ruby (~> 1.0) + logger (1.7.0) + minitest (5.26.0) + pg (1.6.2) + pg (1.6.2-aarch64-linux) + pg (1.6.2-aarch64-linux-musl) + pg (1.6.2-aarch64-mingw-ucrt) + pg (1.6.2-arm64-darwin) + pg (1.6.2-x86_64-darwin) + pg (1.6.2-x86_64-linux) + pg (1.6.2-x86_64-linux-musl) + rake (13.3.0) + rspec (3.13.2) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.6) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.6) + securerandom (0.4.1) + thor (1.4.0) + timeout (0.4.3) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uri (1.0.4) + +PLATFORMS + aarch64-linux + aarch64-linux-musl + aarch64-mingw-ucrt + arm64-darwin + ruby + x86_64-darwin + x86_64-linux + x86_64-linux-musl + +DEPENDENCIES + activerecord (~> 8.0.0) + appraisal + database_cleaner + migration-lock-timeout! + pg (~> 1.1) + rake (~> 13) + rspec (~> 3.2) + +BUNDLED WITH + 2.5.10 diff --git a/gemfiles/activerecord_8_0_with_strong_migrations.gemfile b/gemfiles/activerecord_8_0_with_strong_migrations.gemfile new file mode 100644 index 0000000..b5c9901 --- /dev/null +++ b/gemfiles/activerecord_8_0_with_strong_migrations.gemfile @@ -0,0 +1,16 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activerecord", "~> 8.0.0" +gem "strong_migrations" + +group :development, :test do + gem "appraisal", require: false + gem "database_cleaner", require: false + gem "pg", "~> 1.1", require: false + gem "rake", "~> 13", require: false + gem "rspec", "~> 3.2", require: false +end + +gemspec path: "../" diff --git a/gemfiles/activerecord_8_0_with_strong_migrations.gemfile.lock b/gemfiles/activerecord_8_0_with_strong_migrations.gemfile.lock new file mode 100644 index 0000000..b8c992d --- /dev/null +++ b/gemfiles/activerecord_8_0_with_strong_migrations.gemfile.lock @@ -0,0 +1,88 @@ +PATH + remote: .. + specs: + migration-lock-timeout (1.5.0) + activerecord (>= 6.1, < 8.2) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (8.0.3) + activesupport (= 8.0.3) + activerecord (8.0.3) + activemodel (= 8.0.3) + activesupport (= 8.0.3) + timeout (>= 0.4.0) + activesupport (8.0.3) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + base64 (0.3.0) + benchmark (0.5.0) + bigdecimal (3.3.1) + concurrent-ruby (1.3.5) + connection_pool (2.5.4) + database_cleaner (2.1.0) + database_cleaner-active_record (>= 2, < 3) + database_cleaner-active_record (2.2.2) + activerecord (>= 5.a) + database_cleaner-core (~> 2.0) + database_cleaner-core (2.0.1) + diff-lcs (1.6.2) + drb (2.2.3) + i18n (1.14.7) + concurrent-ruby (~> 1.0) + logger (1.7.0) + minitest (5.26.0) + pg (1.6.2-arm64-darwin) + rake (13.3.0) + rspec (3.13.2) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.6) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.6) + securerandom (0.4.1) + strong_migrations (2.0.0) + activerecord (>= 6.1) + thor (1.4.0) + timeout (0.4.3) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uri (1.0.4) + +PLATFORMS + arm64-darwin + +DEPENDENCIES + activerecord (~> 8.0.0) + appraisal + database_cleaner + migration-lock-timeout! + pg (~> 1.1) + rake (~> 13) + rspec (~> 3.2) + strong_migrations + +BUNDLED WITH + 2.5.10 diff --git a/gemfiles/activerecord_8_1.gemfile b/gemfiles/activerecord_8_1.gemfile new file mode 100644 index 0000000..289768b --- /dev/null +++ b/gemfiles/activerecord_8_1.gemfile @@ -0,0 +1,15 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activerecord", "~> 8.1.0" + +group :development, :test do + gem "appraisal", require: false + gem "database_cleaner", require: false + gem "pg", "~> 1.1", require: false + gem "rake", "~> 13", require: false + gem "rspec", "~> 3.2", require: false +end + +gemspec path: "../" diff --git a/gemfiles/activerecord_8_1.gemfile.lock b/gemfiles/activerecord_8_1.gemfile.lock new file mode 100644 index 0000000..c436757 --- /dev/null +++ b/gemfiles/activerecord_8_1.gemfile.lock @@ -0,0 +1,85 @@ +PATH + remote: .. + specs: + migration-lock-timeout (1.5.0) + activerecord (>= 6.1, < 8.2) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (8.1.0) + activesupport (= 8.1.0) + activerecord (8.1.0) + activemodel (= 8.1.0) + activesupport (= 8.1.0) + timeout (>= 0.4.0) + activesupport (8.1.0) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + json + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + base64 (0.3.0) + bigdecimal (3.3.1) + concurrent-ruby (1.3.5) + connection_pool (2.5.4) + database_cleaner (2.1.0) + database_cleaner-active_record (>= 2, < 3) + database_cleaner-active_record (2.2.2) + activerecord (>= 5.a) + database_cleaner-core (~> 2.0) + database_cleaner-core (2.0.1) + diff-lcs (1.6.2) + drb (2.2.3) + i18n (1.14.7) + concurrent-ruby (~> 1.0) + json (2.15.1) + logger (1.7.0) + minitest (5.26.0) + pg (1.6.2-arm64-darwin) + rake (13.3.0) + rspec (3.13.2) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.6) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.6) + securerandom (0.4.1) + thor (1.4.0) + timeout (0.4.3) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uri (1.0.4) + +PLATFORMS + arm64-darwin + +DEPENDENCIES + activerecord (~> 8.1.0) + appraisal + database_cleaner + migration-lock-timeout! + pg (~> 1.1) + rake (~> 13) + rspec (~> 3.2) + +BUNDLED WITH + 2.5.10 diff --git a/gemfiles/activerecord_8_1_with_strong_migrations.gemfile b/gemfiles/activerecord_8_1_with_strong_migrations.gemfile new file mode 100644 index 0000000..65084da --- /dev/null +++ b/gemfiles/activerecord_8_1_with_strong_migrations.gemfile @@ -0,0 +1,16 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activerecord", "~> 8.1.0" +gem "strong_migrations" + +group :development, :test do + gem "appraisal", require: false + gem "database_cleaner", require: false + gem "pg", "~> 1.1", require: false + gem "rake", "~> 13", require: false + gem "rspec", "~> 3.2", require: false +end + +gemspec path: "../" diff --git a/gemfiles/activerecord_8_1_with_strong_migrations.gemfile.lock b/gemfiles/activerecord_8_1_with_strong_migrations.gemfile.lock new file mode 100644 index 0000000..b398369 --- /dev/null +++ b/gemfiles/activerecord_8_1_with_strong_migrations.gemfile.lock @@ -0,0 +1,88 @@ +PATH + remote: .. + specs: + migration-lock-timeout (1.5.0) + activerecord (>= 6.1, < 8.2) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (8.1.0) + activesupport (= 8.1.0) + activerecord (8.1.0) + activemodel (= 8.1.0) + activesupport (= 8.1.0) + timeout (>= 0.4.0) + activesupport (8.1.0) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + json + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + base64 (0.3.0) + bigdecimal (3.3.1) + concurrent-ruby (1.3.5) + connection_pool (2.5.4) + database_cleaner (2.1.0) + database_cleaner-active_record (>= 2, < 3) + database_cleaner-active_record (2.2.2) + activerecord (>= 5.a) + database_cleaner-core (~> 2.0) + database_cleaner-core (2.0.1) + diff-lcs (1.6.2) + drb (2.2.3) + i18n (1.14.7) + concurrent-ruby (~> 1.0) + json (2.15.1) + logger (1.7.0) + minitest (5.26.0) + pg (1.6.2-arm64-darwin) + rake (13.3.0) + rspec (3.13.2) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.6) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.6) + securerandom (0.4.1) + strong_migrations (2.0.0) + activerecord (>= 6.1) + thor (1.4.0) + timeout (0.4.3) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uri (1.0.4) + +PLATFORMS + arm64-darwin + +DEPENDENCIES + activerecord (~> 8.1.0) + appraisal + database_cleaner + migration-lock-timeout! + pg (~> 1.1) + rake (~> 13) + rspec (~> 3.2) + strong_migrations + +BUNDLED WITH + 2.5.10 diff --git a/migration-lock-timeout.gemspec b/migration-lock-timeout.gemspec index 389e1c5..f18d515 100644 --- a/migration-lock-timeout.gemspec +++ b/migration-lock-timeout.gemspec @@ -27,5 +27,5 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_runtime_dependency "activerecord", ">= 6.1", "< 8.0" + spec.add_runtime_dependency "activerecord", ">= 6.1", "< 8.2" end