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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Fix Store#current deprecation warning
Damian Legawiec82b7e76a6778
diff --git a/core/app/models/spree/store.rb b/core/app/models/spree/store.rbindex 7749a00e9b..1203118e24 100644--- a/core/app/models/spree/store.rb+++ b/core/app/models/spree/store.rb@@ -49,7 +49,7 @@ module Spreedef self.current(url = nil)ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)- `Spree::Store.default` is deprecated and will be removed in Spree 5+ `Spree::Store.current` is deprecated and will be removed in Spree 5Spree::Stores::FindCurrent.new(url: "http://example.com") insteadDEPRECATIONStores::FindCurrent.new(url: url).executediff --git a/frontend/spec/support/shared_contexts/checkout_address_book.rb b/frontend/spec/support/shared_contexts/checkout_address_book.rbindex 5a66deb3cc..6a925e8c00 100644--- a/frontend/spec/support/shared_contexts/checkout_address_book.rb+++ b/frontend/spec/support/shared_contexts/checkout_address_book.rb@@ -1,6 +1,6 @@shared_context 'checkout address book' dobefore do- @store = Spree::Store.current || create(:store)+ @store = Spree::Store.default || create(:store)@state = Spree::State.all.first || create(:state)@zone = Spree::Zone.global || create(:global_zone)@zone.countries << Spree::Country.all