From 8fd60c77f3bfd952f6d9d7bea4642b0193b3f509 Mon Sep 17 00:00:00 2001 From: Martin Meyerhoff Date: Thu, 1 Feb 2024 09:35:27 +0100 Subject: [PATCH 1/2] Allow jsonapi.rb 2.x In 2022, they released a new version of jsonapi.rb. The functionality almost did not change at all, so no changes on our side are necessary. --- alchemy-json_api.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alchemy-json_api.gemspec b/alchemy-json_api.gemspec index a82e903..ce1950a 100644 --- a/alchemy-json_api.gemspec +++ b/alchemy-json_api.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |spec| spec.files = Dir["{app,config,db,lib}/**/*", "LICENSE", "Rakefile", "README.md"] spec.add_dependency "alchemy_cms", [">= 7.0.0.a", "< 8"] - spec.add_dependency "jsonapi.rb", "~> 1.6" + spec.add_dependency "jsonapi.rb", [">= 1.6.0", "< 2.1"] spec.add_development_dependency "factory_bot" spec.add_development_dependency "github_changelog_generator" From 57bb91c9d2ac579b17054c0df0d6cadfc3b3f63d Mon Sep 17 00:00:00 2001 From: Martin Meyerhoff Date: Thu, 1 Feb 2024 09:44:40 +0100 Subject: [PATCH 2/2] Require activesupport in Rakefile The guide says this is needed for cherry-picking just the string extensions, and without it our specs fail. Cf: https://guides.rubyonrails.org/active_support_core_extensions.html#loading-grouped-core-extensions --- Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Rakefile b/Rakefile index 4c99106..df1689c 100644 --- a/Rakefile +++ b/Rakefile @@ -12,6 +12,7 @@ RSpec::Core::RakeTask.new(:spec) task default: [:test_setup, :spec] +require "active_support" require "active_support/core_ext/string" desc "Setup test app"