From 3c2167abbbcc3ef7b0e479257aa488da8b0ecce5 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Wed, 12 Feb 2025 17:08:50 +0100 Subject: [PATCH 1/3] CI: Test with Ruby 3.4 --- .circleci/config.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d6777670c0f..0d486e233a8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -394,3 +394,15 @@ workflows: paperclip: [false], }, } + - test_solidus: + name: *name + matrix: + { + parameters: + { + rails: ["7.2", "8.0"], + ruby: ["3.4.1"], + database: ["postgres"], + paperclip: [false], + }, + } From 169a012f88af042e4ac3b8581832902a0471477b Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Wed, 12 Feb 2025 17:11:04 +0100 Subject: [PATCH 2/3] Add csv as dependency to promotions gems Since Ruby 3.4 the csv library is it's own gem --- legacy_promotions/solidus_legacy_promotions.gemspec | 1 + promotions/solidus_promotions.gemspec | 1 + 2 files changed, 2 insertions(+) diff --git a/legacy_promotions/solidus_legacy_promotions.gemspec b/legacy_promotions/solidus_legacy_promotions.gemspec index 847a100ff0b..b6dedfa7a7b 100644 --- a/legacy_promotions/solidus_legacy_promotions.gemspec +++ b/legacy_promotions/solidus_legacy_promotions.gemspec @@ -23,6 +23,7 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 3.1.0' s.required_rubygems_version = '>= 1.8.23' + s.add_dependency 'csv', '~> 3.0' s.add_dependency 'solidus_api', s.version s.add_dependency 'solidus_core', s.version s.add_dependency 'solidus_support', '>= 0.12.0' diff --git a/promotions/solidus_promotions.gemspec b/promotions/solidus_promotions.gemspec index 1838e94dfaa..4d2240352c2 100644 --- a/promotions/solidus_promotions.gemspec +++ b/promotions/solidus_promotions.gemspec @@ -24,6 +24,7 @@ Gem::Specification.new do |spec| files = Dir.chdir(__dir__) { `git ls-files -z`.split("\x0") } spec.files = files.grep_v(%r{^(spec|bin)/}) + spec.add_dependency "csv", "~> 3.0" spec.add_dependency "importmap-rails", "~> 1.2" spec.add_dependency "ransack-enum", "~> 1.0" spec.add_dependency "solidus_core", [">= 4.0.0", "< 5"] From cc025c34c5836dbdb6212c6ef429c51fc349125b Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Thu, 13 Feb 2025 17:18:43 +0100 Subject: [PATCH 3/3] Fix log entry spec for Ruby 3.4 Ruby 3.4 finally adds the new has key syntax into inspect. Since we still support older Ruby versions we just remove the expectation of the hash key. --- core/spec/models/spree/log_entry_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/spec/models/spree/log_entry_spec.rb b/core/spec/models/spree/log_entry_spec.rb index 60d6ddec826..287e390c0b5 100644 --- a/core/spec/models/spree/log_entry_spec.rb +++ b/core/spec/models/spree/log_entry_spec.rb @@ -128,7 +128,7 @@ expect(details.success?).to eq(true) expect(details.message).to eq("[WARNING: An error occurred while trying to serialize the payment response] FooBar") - expect(details.params['data']).to include(':bar=>"Symbol keys are not allowed"') + expect(details.params['data']).to include('"Symbol keys are not allowed"') expect(details.params['error']).to include('Tried to dump unspecified class: Symbol') end end