Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Pin json < 3 until Rails stops passing it a positional hash

Damian Legawiecb7a373713f92
diff --git a/spree/core/spree_core.gemspec b/spree/core/spree_core.gemspec
index baa3a3c50c..528d408528 100644
--- a/spree/core/spree_core.gemspec
+++ b/spree/core/spree_core.gemspec
@@ -42,6 +42,12 @@ Gem::Specification.new do |s|
s.add_dependency 'friendly_id', '~> 5.2', '>= 5.2.1'
s.add_dependency 'geocoder'
s.add_dependency 'highline', '>= 2', '< 4' # Necessary for the install generator
+ # json 3 removed the positional options hash, which ActiveSupport::JSON.decode
+ # still passes (`::JSON.parse(json, options)`). Rolling a transaction back
+ # restores JSON attributes through that path, so on json 3 any rollback
+ # touching a JSON column raises ArgumentError. Rails' bug, not ours — unpin
+ # once activesupport passes those options as keywords.
+ s.add_dependency 'json', '< 3'
s.add_dependency 'jwt', '~> 3.1'
s.add_dependency 'money', '~> 6.13'
s.add_dependency 'monetize', '~> 1.9'