From 9790ee12e169801820e0ec1cc013202396454f1e Mon Sep 17 00:00:00 2001 From: Andrew Hampton Date: Mon, 12 Aug 2024 22:38:48 -0400 Subject: [PATCH 1/4] Add support for Rails 7.2 (#563) * Add support for Rails 7.2 * Remove Rails 7.2 changelog entry v2.6.4 doesn't actually support Rails 7.2, so drop this item from the changelog. --- .github/workflows/build.yml | 8 +++++++- CHANGELOG.md | 2 -- Gemfile | 2 +- paranoia.gemspec | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a603c725..b5504116 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - rails: ["~> 7.1.0", "~> 7.0.0", "~> 6.1.0", "~> 6.0.0"] + rails: ["~> 7.2.0", "~> 7.1.0", "~> 7.0.0", "~> 6.1.0", "~> 6.0.0"] ruby: ["3.2.2", "3.1.4", "3.0.6", "2.7.8"] include: - ruby: 3.2 @@ -39,6 +39,12 @@ jobs: rails: '~> 5.2.0' - ruby: 2.5 rails: '~> 5.1.0' + exclude: + # Rails 7.2.0 requires Ruby 3.1.0 or later + - ruby: "3.0.6" + rails: "~> 7.2.0" + - ruby: "2.7.8" + rails: "~> 7.2.0" #os: ubuntu-latest #arch: x64 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dbe020d..5e25af2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,6 @@ ## 2.6.4 - July 20, 2024 -Add support for [Rails 7.2](https://github.com/rails/rails/releases/tag/v7.2.0) - * [#554](https://github.com/rubysherpas/paranoia/pull/554) Support prebuilt counter cache association list (#554) [JoƩ Dupuis](https://github.com/JoeDupuis) * [#551](https://github.com/rubysherpas/paranoia/pull/551) Fix: restore has_one with scope (#551) diff --git a/Gemfile b/Gemfile index fe5f736b..66ecd287 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ sqlite = ENV['SQLITE_VERSION'] if sqlite gem 'sqlite3', sqlite, platforms: [:ruby] else - gem 'sqlite3', platforms: [:ruby] + gem 'sqlite3', '~> 1.4', platforms: [:ruby] end platforms :jruby do diff --git a/paranoia.gemspec b/paranoia.gemspec index 8e89bb40..c87485f6 100644 --- a/paranoia.gemspec +++ b/paranoia.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 2.5' - s.add_dependency 'activerecord', '>= 5.1', '< 7.2' + s.add_dependency 'activerecord', '>= 5.1', '< 8.0' s.add_development_dependency "bundler", ">= 1.0.0" s.add_development_dependency "rake" From 4d7b87d6628864b919a65a407d6a8fc19507bb33 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Tue, 13 Aug 2024 12:54:17 +1000 Subject: [PATCH 2/4] See what happens on Rails edge (#564) * See what happens on Rails edge * Tweak support for Ruby 2.7 * Add Ruby exclusions * Correct exclusion syntax --- .github/workflows/build.yml | 43 +++++++++++-------------------------- CHANGELOG.md | 6 +++++- paranoia.gemspec | 4 ++-- 3 files changed, 19 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b5504116..66c036d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,38 +15,19 @@ jobs: strategy: fail-fast: false matrix: - rails: ["~> 7.2.0", "~> 7.1.0", "~> 7.0.0", "~> 6.1.0", "~> 6.0.0"] - ruby: ["3.2.2", "3.1.4", "3.0.6", "2.7.8"] - include: - - ruby: 3.2 - rails: 'edge' - - ruby: 3.2 - rails: '~> 7.1.0' - # single test failure with jruby - #- ruby: jruby-9.4 - # rails: '~> 7.0.0' - - ruby: 2.6 - rails: '~> 6.1.0' - - ruby: 2.6 - rails: '~> 6.0.0' - - ruby: 2.6 - rails: '~> 5.2.0' - - ruby: 2.6 - rails: '~> 5.1.0' - - ruby: 2.5 - rails: '~> 6.0.0' - - ruby: 2.5 - rails: '~> 5.2.0' - - ruby: 2.5 - rails: '~> 5.1.0' + rails: ["edge", "~> 7.2.0", "~> 7.1.0", "~> 7.0.0", "~> 6.1.0"] + ruby: ["3.3","3.2", "3.1", "3.0", "2.7"] exclude: - # Rails 7.2.0 requires Ruby 3.1.0 or later - - ruby: "3.0.6" - rails: "~> 7.2.0" - - ruby: "2.7.8" - rails: "~> 7.2.0" - #os: ubuntu-latest - #arch: x64 + - rails: "~> 7.2.0" + ruby: "3.0" + - rails: "~> 7.2.0" + ruby: "2.7" + - rails: "edge" + ruby: "3.0" + - rails: "edge" + ruby: "2.7" + + env: RAILS: ${{ matrix.rails }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e25af2f..071d160d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # paranoia Changelog +## 3.0.0 - August 13, 2024 + +- [#563](https://github.com/rubysherpas/paranoia/pull/563) Support Rails 7.2 & Rails 8.0 + ## 2.6.4 - July 20, 2024 * [#554](https://github.com/rubysherpas/paranoia/pull/554) Support prebuilt counter cache association list (#554) @@ -16,7 +20,7 @@ ## 2.6.2 - Jun 6, 2023 -* [#441](https://github.com/rubysherpas/paranoia/pull/441) Recursive restore with has_many/one through assocs (#441) +* [#441](https://github.com/rubysherpas/paranoia/pull/441) Recursive restore with has_many/one through assocs (#441) [Emil Ong](https://github.com/emilong) ## 2.6.1 - Nov 16, 2022 diff --git a/paranoia.gemspec b/paranoia.gemspec index c87485f6..9baf38e6 100644 --- a/paranoia.gemspec +++ b/paranoia.gemspec @@ -22,9 +22,9 @@ Gem::Specification.new do |s| s.required_rubygems_version = ">= 1.3.6" - s.required_ruby_version = '>= 2.5' + s.required_ruby_version = '>= 2.7' - s.add_dependency 'activerecord', '>= 5.1', '< 8.0' + s.add_dependency 'activerecord', '>= 6', '< 8.1' s.add_development_dependency "bundler", ">= 1.0.0" s.add_development_dependency "rake" From 3faf7d372ebe30b67cf49e89f6f71e72464388d5 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Tue, 13 Aug 2024 12:54:46 +1000 Subject: [PATCH 3/4] Document support for Rails edge + 7.2 --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 071d160d..ffb76447 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,10 @@ ## 3.0.0 - August 13, 2024 -- [#563](https://github.com/rubysherpas/paranoia/pull/563) Support Rails 7.2 & Rails 8.0 +_Tagged as 3.0 as Ruby + Rails version constraints have been modernised._ + +- [#564](https://github.com/rubysherpas/paranoia/pull/564) Support Rails edge +- [#563](https://github.com/rubysherpas/paranoia/pull/563) Support Rails 7.2 ## 2.6.4 - July 20, 2024 From f441c378c3fb4a3c8beb482db376ac14717f81a7 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Tue, 13 Aug 2024 12:56:17 +1000 Subject: [PATCH 4/4] Bump to 3.0.0 --- lib/paranoia/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/paranoia/version.rb b/lib/paranoia/version.rb index 626ba581..16735463 100644 --- a/lib/paranoia/version.rb +++ b/lib/paranoia/version.rb @@ -1,3 +1,3 @@ module Paranoia - VERSION = '2.6.4'.freeze + VERSION = '3.0.0'.freeze end