From f0daafb0251c48f1c7badfbd91043e8d59b48f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Prod=27homme?= Date: Wed, 19 Apr 2023 10:21:06 +0200 Subject: [PATCH 1/5] Update README.md (#413) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 44a11928..487f769c 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ When using PostgreSQL, it is also possible to leave this migration up to the dat ROW_NUMBER() OVER ( PARTITION BY todo_list_id ORDER BY updated_at - ) as new_position + ) AS new_position FROM todo_items ) AS mapping WHERE todo_items.id = mapping.id; From 63172d1e369b471134edcbfd134311cb08305d75 Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Mon, 4 Sep 2023 20:40:52 +0200 Subject: [PATCH 2/5] http -> https (#421) --- acts_as_list.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acts_as_list.gemspec b/acts_as_list.gemspec index 802a7d26..31d1c799 100644 --- a/acts_as_list.gemspec +++ b/acts_as_list.gemspec @@ -9,7 +9,7 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.authors = ["Swanand Pagnis", "Brendon Muir"] s.email = %w(swanand.pagnis@gmail.com brendon@spikeatschool.co.nz) - s.homepage = "http://github.com/brendon/acts_as_list" + s.homepage = "https://github.com/brendon/acts_as_list" s.summary = "A gem adding sorting, reordering capabilities to an active_record model, allowing it to act as a list" s.description = 'This "acts_as" extension provides the capabilities for sorting and reordering a number of objects in a list. The class that has this specified needs to have a "position" column defined as an integer on the mapped database table.' s.license = "MIT" From 0a59c92733b5ef3d6457738bc036d20c39b1e7d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 17:37:39 +1200 Subject: [PATCH 3/5] Bump actions/checkout from 3 to 4 (#422) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c905b079..e9389a3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,7 +105,7 @@ jobs: BUNDLE_GEMFILE: ${{ matrix.gemfile }} DB: ${{ matrix.db }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: From b955dc88f5d880a572a5b6c4e80c294358a0797c Mon Sep 17 00:00:00 2001 From: CJ Howard Date: Mon, 4 Dec 2023 19:46:30 -0600 Subject: [PATCH 4/5] Update README (#424) Fix incorrect association reference in code example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 487f769c..4403d105 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ class TodoItem < ActiveRecord::Base end class TodoAttachment < ActiveRecord::Base - belongs_to :todo_list + belongs_to :todo_item acts_as_list scope: :todo_item end From eef7603c06be14635b44237aa41df435324c8c8e Mon Sep 17 00:00:00 2001 From: Petrik de Heus Date: Wed, 13 Dec 2023 21:59:54 +0100 Subject: [PATCH 5/5] Add ActiveRecord 7.1 to appraisal and fix deprecation warning (#425) Set the deprecation behavior on ActiveRecord.deprecator, instead of ActiveSupport::Deprecation, as that is deprecated. Fixes the following warnings: ActiveSupport::DeprecationException: DEPRECATION WARNING: Calling behavior= on ActiveSupport::Deprecation is deprecated and will be removed from Rails (use Rails.application.deprecators.behavior= instead) --- Appraisals | 4 ++++ test/helper.rb | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Appraisals b/Appraisals index 4b48737b..6b415c7f 100644 --- a/Appraisals +++ b/Appraisals @@ -42,3 +42,7 @@ end appraise "rails-7-0" do gem "activerecord", "~> 7.0.0" end + +appraise "rails-7-1" do + gem "activerecord", "~> 7.1.0" +end diff --git a/test/helper.rb b/test/helper.rb index f0e19827..589a7690 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -53,8 +53,8 @@ def assert_equal_or_nil(a, b) end def assert_no_deprecation_warning_raised_by(failure_message = 'ActiveRecord deprecation warning raised when we didn\'t expect it', pass_message = 'No ActiveRecord deprecation raised') - original_behavior = ActiveSupport::Deprecation.behavior - ActiveSupport::Deprecation.behavior = :raise + original_behavior = active_record_deprecator.behavior + active_record_deprecator.behavior = :raise begin yield rescue ActiveSupport::DeprecationException => e @@ -65,5 +65,13 @@ def assert_no_deprecation_warning_raised_by(failure_message = 'ActiveRecord depr pass pass_message end ensure - ActiveSupport::Deprecation.behavior = original_behavior + active_record_deprecator.behavior = original_behavior +end + +def active_record_deprecator + if ActiveRecord::VERSION::MAJOR == 7 && ActiveRecord::VERSION::MINOR >= 1 || ActiveRecord::VERSION::MAJOR > 7 + ActiveRecord.deprecator + else + ActiveSupport::Deprecation + end end