spree_core 4.8.3 → 4.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +57 -0
- data/app/finders/spree/line_items/find_by_variant.rb +4 -2
- data/app/finders/spree/orders/find_complete.rb +3 -13
- data/app/finders/spree/orders/find_current.rb +3 -1
- data/app/finders/spree/orders/finder_helper.rb +17 -0
- data/app/finders/spree/products/find.rb +1 -1
- data/app/finders/spree/variants/find.rb +30 -0
- data/app/models/spree/address.rb +12 -2
- data/app/models/spree/adjustment.rb +5 -0
- data/app/models/spree/asset.rb +8 -0
- data/app/models/spree/calculator/flat_rate.rb +3 -0
- data/app/models/spree/calculator/flexi_rate.rb +3 -0
- data/app/models/spree/calculator/percent_on_line_item.rb +3 -0
- data/app/models/spree/calculator/shipping/flat_rate.rb +13 -1
- data/app/models/spree/cms_section_image.rb +0 -6
- data/app/models/spree/customer_return.rb +1 -0
- data/app/models/spree/fulfilment_changer.rb +1 -0
- data/app/models/spree/icon.rb +0 -6
- data/app/models/spree/image/configuration/active_storage.rb +0 -8
- data/app/models/spree/image.rb +17 -0
- data/app/models/spree/line_item.rb +26 -7
- data/app/models/spree/option_value_variant.rb +4 -0
- data/app/models/spree/order/currency_updater.rb +2 -2
- data/app/models/spree/order/webhooks.rb +19 -0
- data/app/models/spree/order.rb +17 -6
- data/app/models/spree/order_merger.rb +6 -0
- data/app/models/spree/payment/gateway_options.rb +4 -0
- data/app/models/spree/payment/webhooks.rb +15 -0
- data/app/models/spree/payment.rb +7 -7
- data/app/models/spree/price.rb +53 -1
- data/app/models/spree/product/webhooks.rb +17 -0
- data/app/models/spree/product.rb +7 -9
- data/app/models/spree/promotion/actions/free_shipping.rb +13 -0
- data/app/models/spree/promotion/rules/first_order.rb +6 -1
- data/app/models/spree/promotion.rb +2 -2
- data/app/models/spree/promotion_handler/coupon.rb +3 -2
- data/app/models/spree/refund.rb +14 -2
- data/app/models/spree/reimbursement/emails.rb +11 -0
- data/app/models/spree/reimbursement.rb +1 -6
- data/app/models/spree/role_user.rb +1 -1
- data/app/models/spree/shipment/emails.rb +11 -0
- data/app/models/spree/shipment/webhooks.rb +11 -0
- data/app/models/spree/shipment.rb +60 -7
- data/app/models/spree/shipment_handler.rb +2 -6
- data/app/models/spree/shipping_method.rb +24 -2
- data/app/models/spree/shipping_method_zone.rb +4 -2
- data/app/models/spree/shipping_rate.rb +1 -1
- data/app/models/spree/stock/package.rb +4 -0
- data/app/models/spree/stock/quantifier.rb +22 -4
- data/app/models/spree/stock_item/webhooks.rb +6 -0
- data/app/models/spree/stock_item.rb +1 -3
- data/app/models/spree/stock_location.rb +15 -0
- data/app/models/spree/stock_movement/webhooks.rb +6 -0
- data/app/models/spree/stock_movement.rb +1 -3
- data/app/models/spree/store.rb +2 -9
- data/app/models/spree/store_credit.rb +11 -12
- data/app/models/spree/store_favicon_image.rb +0 -6
- data/app/models/spree/store_logo.rb +0 -5
- data/app/models/spree/store_mailer_logo.rb +0 -6
- data/app/models/spree/tax_rate.rb +3 -1
- data/app/models/spree/taxon.rb +83 -17
- data/app/models/spree/taxon_image/configuration/active_storage.rb +0 -6
- data/app/models/spree/taxonomy.rb +1 -0
- data/app/models/spree/variant/webhooks.rb +6 -0
- data/app/models/spree/variant.rb +29 -6
- data/app/models/spree/wishlist.rb +9 -0
- data/app/presenters/spree/variants/options_presenter.rb +34 -2
- data/app/services/spree/cart/add_item.rb +2 -0
- data/app/services/spree/cart/destroy.rb +14 -4
- data/app/services/spree/seeds/all.rb +3 -0
- data/app/services/spree/seeds/payment_methods.rb +18 -0
- data/app/services/spree/seeds/stock_locations.rb +1 -1
- data/app/services/spree/seeds/zones.rb +19 -19
- data/app/services/spree/tracking_numbers/base_service.rb +19 -0
- data/config/locales/en.yml +2 -0
- data/db/migrate/20240623172111_add_deleted_at_to_spree_stock_locations.rb +6 -0
- data/db/migrate/20240725124530_add_refunder_to_spree_refunds.rb +6 -0
- data/db/migrate/20240822163534_add_pretty_name_to_spree_taxons.rb +9 -0
- data/lib/spree/core/components.rb +6 -0
- data/lib/spree/core/controller_helpers/order.rb +5 -5
- data/lib/spree/core/dependencies.rb +5 -1
- data/lib/spree/core/engine.rb +1 -1
- data/lib/spree/core/preferences/preferable.rb +4 -2
- data/lib/spree/core/preferences/preferable_class_methods.rb +3 -2
- data/lib/spree/core/runtime_configuration.rb +1 -0
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/core/webhooks.rb +15 -7
- data/lib/spree/core.rb +1 -0
- data/lib/spree/money.rb +1 -1
- data/lib/spree/permitted_attributes.rb +1 -0
- data/lib/spree/testing_support/authorization_helpers.rb +2 -2
- data/lib/spree/testing_support/capybara_config.rb +8 -4
- data/lib/spree/testing_support/common_rake.rb +1 -1
- data/spree_core.gemspec +5 -3
- metadata +54 -8
- data/LICENSE +0 -26
@@ -7,32 +7,32 @@ module Spree
|
|
7
7
|
eu_vat = Spree::Zone.where(name: 'EU_VAT', description: 'Countries that make up the EU VAT zone.', kind: 'country').first_or_create!
|
8
8
|
uk_vat = Spree::Zone.where(name: 'UK_VAT', kind: 'country').first_or_create!
|
9
9
|
north_america = Spree::Zone.where(name: 'North America', description: 'USA + Canada', kind: 'country').first_or_create!
|
10
|
-
|
10
|
+
Spree::Zone.where(name: 'South America', description: 'South America', kind: 'country').first_or_create!
|
11
11
|
middle_east = Spree::Zone.where(name: 'Middle East', description: 'Middle East', kind: 'country').first_or_create!
|
12
12
|
asia = Spree::Zone.where(name: 'Asia', description: 'Asia', kind: 'country').first_or_create!
|
13
13
|
|
14
|
-
%w(PL FI PT RO DE FR SK HU SI IE AT ES IT BE SE LV BG LT CY LU MT DK NL EE HR CZ GR)
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
create_zone_members(eu_vat, %w(PL FI PT RO DE FR SK HU SI IE AT ES IT BE SE LV BG LT CY LU MT DK NL EE HR CZ GR))
|
15
|
+
create_zone_members(north_america, %w(US CA))
|
16
|
+
create_zone_members(middle_east, %w(BH CY EG IR IQ IL JO KW LB OM QA SA SY TR AE YE))
|
17
|
+
create_zone_members(asia, %w(AF AM AZ BH BD BT BN KH CN CX CC GE HK IN ID IR IQ IL JP JO KZ KW KG LA LB MO MY MV MN MM NP
|
18
|
+
KP OM PK PS PH QA SA SG KR LK SY TW TJ TH TR TM AE UZ VN YE))
|
18
19
|
uk_vat.zone_members.where(zoneable: Spree::Country.find_by(iso: 'GB')).first_or_create!
|
20
|
+
end
|
19
21
|
|
20
|
-
|
21
|
-
north_america.zone_members.where(zoneable: Spree::Country.find_by!(iso: name)).first_or_create!
|
22
|
-
end
|
23
|
-
|
24
|
-
%w(BH CY EG IR IQ IL JO KW LB OM QA SA SY TR AE YE).each do |name|
|
25
|
-
middle_east.zone_members.where(zoneable: Spree::Country.find_by!(iso: name)).first_or_create!
|
26
|
-
end
|
27
|
-
|
28
|
-
%w(AF AM AZ BH BD BT BN KH CN CX CC GE HK IN ID IR IQ IL JP JO KZ KW KG LA LB MO MY MV MN MM NP
|
29
|
-
KP OM PK PS PH QA SA SG KR LK SY TW TJ TH TR TM AE UZ VN YE).each do |name|
|
30
|
-
asia.zone_members.where(zoneable: Spree::Country.find_by!(iso: name)).first_or_create!
|
31
|
-
end
|
22
|
+
protected
|
32
23
|
|
33
|
-
|
34
|
-
|
24
|
+
def create_zone_members(zone, country_codes)
|
25
|
+
countries_ids = Spree::Country.where(iso: country_codes).ids
|
26
|
+
zone_members = countries_ids.map do |country_id|
|
27
|
+
{
|
28
|
+
zoneable_id: country_id,
|
29
|
+
zoneable_type: 'Spree::Country',
|
30
|
+
zone_id: zone.id,
|
31
|
+
created_at: Time.current,
|
32
|
+
updated_at: Time.current
|
33
|
+
}
|
35
34
|
end
|
35
|
+
Spree::ZoneMember.insert_all(zone_members)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'tracking_number'
|
2
|
+
|
3
|
+
# This is a very basic service that can be used to track packages.
|
4
|
+
# It uses the tracking_number gem to validate and build tracking urls.
|
5
|
+
# https://github.com/jkeen/tracking_number
|
6
|
+
# You can create your own service by subclassing this one and using 3rd party services, eg. AfterShip or Shippo
|
7
|
+
module Spree
|
8
|
+
module TrackingNumbers
|
9
|
+
class BaseService
|
10
|
+
def initialize(tracking_number)
|
11
|
+
@tracking = TrackingNumber.new(tracking_number)
|
12
|
+
end
|
13
|
+
|
14
|
+
attr_reader :tracking
|
15
|
+
|
16
|
+
delegate :valid?, :tracking_url, to: :tracking
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/config/locales/en.yml
CHANGED
@@ -576,6 +576,7 @@ en:
|
|
576
576
|
alternative_phone: Alternative Phone
|
577
577
|
amount: Amount
|
578
578
|
and: and
|
579
|
+
apply_only_on_full_priced_items: Apply only on full priced items
|
579
580
|
approve: approve
|
580
581
|
approver: Approver
|
581
582
|
approved_at: Approved at
|
@@ -1580,6 +1581,7 @@ en:
|
|
1580
1581
|
states_required: States Required
|
1581
1582
|
status: Status
|
1582
1583
|
stock: Stock
|
1584
|
+
default_stock_location_name: Shop location
|
1583
1585
|
stock_location: Stock Location
|
1584
1586
|
stock_location_info: Stock location info
|
1585
1587
|
stock_locations: Stock Locations
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class AddPrettyNameToSpreeTaxons < ActiveRecord::Migration[6.1]
|
2
|
+
def change
|
3
|
+
add_column :spree_taxons, :pretty_name, :string, null: true, if_not_exists: true
|
4
|
+
add_index :spree_taxons, :pretty_name, if_not_exists: true
|
5
|
+
|
6
|
+
add_column :spree_taxon_translations, :pretty_name, :string, null: true, if_not_exists: true
|
7
|
+
add_index :spree_taxon_translations, :pretty_name, if_not_exists: true
|
8
|
+
end
|
9
|
+
end
|
@@ -5,10 +5,16 @@ module Spree
|
|
5
5
|
@@api_available ||= ::Rails::Engine.subclasses.map(&:instance).map { |e| e.class.to_s }.include?('Spree::Api::Engine')
|
6
6
|
end
|
7
7
|
|
8
|
+
# old, legacy admin
|
8
9
|
def self.backend_available?
|
9
10
|
@@backend_available ||= ::Rails::Engine.subclasses.map(&:instance).map { |e| e.class.to_s }.include?('Spree::Backend::Engine')
|
10
11
|
end
|
11
12
|
|
13
|
+
# new shiny admin
|
14
|
+
def self.admin_available?
|
15
|
+
@@admin_available ||= ::Rails::Engine.subclasses.map(&:instance).map { |e| e.class.to_s }.include?('Spree::Admin::Engine')
|
16
|
+
end
|
17
|
+
|
12
18
|
def self.frontend_available?
|
13
19
|
@@frontend_available ||= ::Rails::Engine.subclasses.map(&:instance).map { |e| e.class.to_s }.include?('Spree::Frontend::Engine')
|
14
20
|
end
|
@@ -83,11 +83,7 @@ module Spree
|
|
83
83
|
def find_order_by_token_or_user(options = {}, with_adjustments = false)
|
84
84
|
options[:lock] ||= false
|
85
85
|
|
86
|
-
includes =
|
87
|
-
{ line_items: [variant: [:images, :option_values, :product]] }
|
88
|
-
else
|
89
|
-
{}
|
90
|
-
end
|
86
|
+
includes = options[:includes] ? order_includes : {}
|
91
87
|
|
92
88
|
# Find any incomplete orders for the token
|
93
89
|
incomplete_orders = current_store.orders.incomplete.includes(includes)
|
@@ -104,6 +100,10 @@ module Spree
|
|
104
100
|
|
105
101
|
order
|
106
102
|
end
|
103
|
+
|
104
|
+
def order_includes
|
105
|
+
{ line_items: [variant: [:images, :option_values, :product]] }
|
106
|
+
end
|
107
107
|
end
|
108
108
|
end
|
109
109
|
end
|
@@ -43,6 +43,9 @@ module Spree
|
|
43
43
|
shipment_add_item_service: 'Spree::Shipments::AddItem',
|
44
44
|
shipment_remove_item_service: 'Spree::Shipments::RemoveItem',
|
45
45
|
|
46
|
+
# tracking numbers
|
47
|
+
tracking_number_service: 'Spree::TrackingNumbers::BaseService',
|
48
|
+
|
46
49
|
# sorter
|
47
50
|
collection_sorter: 'Spree::BaseSorter',
|
48
51
|
order_sorter: 'Spree::BaseSorter',
|
@@ -97,7 +100,8 @@ module Spree
|
|
97
100
|
credit_card_finder: 'Spree::CreditCards::Find',
|
98
101
|
products_finder: 'Spree::Products::Find',
|
99
102
|
taxon_finder: 'Spree::Taxons::Find',
|
100
|
-
line_item_by_variant_finder: 'Spree::LineItems::FindByVariant'
|
103
|
+
line_item_by_variant_finder: 'Spree::LineItems::FindByVariant',
|
104
|
+
variant_finder: 'Spree::Variants::Find'
|
101
105
|
}.freeze
|
102
106
|
|
103
107
|
include Spree::DependenciesHelper
|
data/lib/spree/core/engine.rb
CHANGED
@@ -26,7 +26,7 @@ module Spree
|
|
26
26
|
|
27
27
|
initializer 'spree.environment', before: :load_config_initializers do |app|
|
28
28
|
app.config.spree = Environment.new(SpreeCalculators.new, Spree::Core::Configuration.new, Spree::Core::RuntimeConfiguration.new, Spree::Core::Dependencies.new)
|
29
|
-
app.config.active_record.yaml_column_permitted_classes
|
29
|
+
app.config.active_record.yaml_column_permitted_classes << [Symbol, BigDecimal, ActiveSupport::HashWithIndifferentAccess]
|
30
30
|
Spree::Config = app.config.spree.preferences
|
31
31
|
Spree::RuntimeConfig = app.config.spree.runtime_preferences
|
32
32
|
Spree::Dependencies = app.config.spree.dependencies
|
@@ -101,14 +101,16 @@ module Spree::Preferences::Preferable
|
|
101
101
|
|
102
102
|
private
|
103
103
|
|
104
|
-
def convert_preference_value(value, type)
|
104
|
+
def convert_preference_value(value, type, nullable: false)
|
105
105
|
case type
|
106
106
|
when :string, :text
|
107
107
|
value.to_s
|
108
108
|
when :password
|
109
109
|
value.to_s
|
110
110
|
when :decimal
|
111
|
-
|
111
|
+
decimal_value = value.presence
|
112
|
+
decimal_value ||= 0 unless nullable
|
113
|
+
decimal_value.present? ? decimal_value.to_s.to_d : decimal_value
|
112
114
|
when :integer
|
113
115
|
value.to_i
|
114
116
|
when :boolean
|
@@ -2,10 +2,11 @@ module Spree::Preferences
|
|
2
2
|
module PreferableClassMethods
|
3
3
|
def preference(name, type, *args)
|
4
4
|
options = args.extract_options!
|
5
|
-
options.assert_valid_keys(:default, :deprecated)
|
5
|
+
options.assert_valid_keys(:default, :deprecated, :nullable)
|
6
6
|
default = options[:default]
|
7
7
|
default = -> { options[:default] } unless default.is_a?(Proc)
|
8
8
|
deprecated = options[:deprecated]
|
9
|
+
nullable = options[:nullable]
|
9
10
|
|
10
11
|
# cache_key will be nil for new objects, then if we check if there
|
11
12
|
# is a pending preference before going to default
|
@@ -16,7 +17,7 @@ module Spree::Preferences
|
|
16
17
|
end
|
17
18
|
|
18
19
|
define_method preference_setter_method(name) do |value|
|
19
|
-
value = convert_preference_value(value, type)
|
20
|
+
value = convert_preference_value(value, type, nullable: nullable)
|
20
21
|
preferences[name] = value
|
21
22
|
|
22
23
|
Spree::Deprecation.warn("`#{name}` is deprecated. #{deprecated}") if deprecated
|
data/lib/spree/core/version.rb
CHANGED
data/lib/spree/core/webhooks.rb
CHANGED
@@ -1,13 +1,21 @@
|
|
1
1
|
module Spree
|
2
2
|
module Webhooks
|
3
3
|
def self.disable_webhooks
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
prev_value = disabled?
|
5
|
+
RequestStore.store[:disable_spree_webhooks] = true
|
6
|
+
yield
|
7
|
+
ensure
|
8
|
+
RequestStore.store[:disable_spree_webhooks] = prev_value
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.disabled?
|
12
|
+
# rubocop:disable Style/RedundantFetchBlock
|
13
|
+
RequestStore.fetch(:disable_spree_webhooks) { false }
|
14
|
+
# rubocop:enable Style/RedundantFetchBlock
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.disabled=(value)
|
18
|
+
RequestStore.store[:disable_spree_webhooks] = value
|
11
19
|
end
|
12
20
|
end
|
13
21
|
end
|
data/lib/spree/core.rb
CHANGED
@@ -19,6 +19,7 @@ require 'ransack'
|
|
19
19
|
require 'state_machines-activerecord'
|
20
20
|
require 'active_storage_validations'
|
21
21
|
require 'activerecord-typedstore'
|
22
|
+
require 'request_store'
|
22
23
|
|
23
24
|
# This is required because ActiveModel::Validations#invalid? conflicts with the
|
24
25
|
# invalid state of a Payment. In the future this should be removed.
|
data/lib/spree/money.rb
CHANGED
@@ -28,7 +28,7 @@ module Spree
|
|
28
28
|
|
29
29
|
def initialize(amount, options = {})
|
30
30
|
::Money.default_currency ||= Spree::Store.default.default_currency || 'USD'
|
31
|
-
@money = Monetize.parse(
|
31
|
+
@money = Monetize.parse(amount, (options[:currency] || Spree::Store.default.default_currency))
|
32
32
|
@options = Spree::Money.default_formatting_rules.merge(options)
|
33
33
|
end
|
34
34
|
|
@@ -154,6 +154,7 @@ module Spree
|
|
154
154
|
:position, :track_inventory,
|
155
155
|
:product_id, :product, :option_values_attributes, :price, :compare_at_price,
|
156
156
|
:weight, :height, :width, :depth, :sku, :barcode, :cost_currency,
|
157
|
+
:weight_unit, :dimensions_unit,
|
157
158
|
{ options: [:name, :value], option_value_ids: [] }
|
158
159
|
]
|
159
160
|
|
@@ -37,12 +37,12 @@ module Spree
|
|
37
37
|
ability_class.register_ability(ability)
|
38
38
|
end
|
39
39
|
|
40
|
-
let(:user) { Spree.
|
40
|
+
let(:user) { Spree.admin_user_class.new }
|
41
41
|
let(:admin_app) { Spree::OauthApplication.create!(name: 'Admin Panel', scopes: 'admin') }
|
42
42
|
let(:admin_token) { Spree::OauthAccessToken.create!(application: admin_app, scopes: 'admin').token }
|
43
43
|
|
44
44
|
before do
|
45
|
-
allow(Spree.
|
45
|
+
allow(Spree.admin_user_class).to receive(:find_by).and_return(user)
|
46
46
|
if defined?(Spree::Admin)
|
47
47
|
allow_any_instance_of(Spree::Admin::BaseController).to receive(:try_spree_current_user).and_return(user)
|
48
48
|
allow_any_instance_of(Spree::Admin::BaseController).to receive(:admin_oauth_application).and_return(admin_app)
|
@@ -16,8 +16,12 @@ if ENV['WEBDRIVER'] == 'accessible'
|
|
16
16
|
Capybara.javascript_driver = :accessible
|
17
17
|
end
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
Capybara.register_driver :selenium_chrome_headless do |app|
|
20
|
+
options = ::Selenium::WebDriver::Chrome::Options.new
|
21
|
+
options.add_argument '--headless'
|
22
|
+
options.add_argument '--disable-gpu'
|
23
|
+
options.add_argument '--window-size=1400,900'
|
24
|
+
options.add_argument '--disable-search-engine-choice-screen'
|
25
|
+
|
26
|
+
Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
|
23
27
|
end
|
@@ -17,7 +17,7 @@ namespace :common do
|
|
17
17
|
Spree::DummyGenerator.start ["--lib_name=#{ENV['LIB_NAME']}"]
|
18
18
|
|
19
19
|
# install frontend libraries
|
20
|
-
unless ['spree/api', 'spree/core', 'spree/sample'].include?(ENV['LIB_NAME'])
|
20
|
+
unless ['spree/api', 'spree/core', 'spree/sample', 'spree/emails'].include?(ENV['LIB_NAME'])
|
21
21
|
system('bin/rails importmap:install')
|
22
22
|
system('bin/rails turbo:install')
|
23
23
|
system('bin/rails stimulus:install')
|
data/spree_core.gemspec
CHANGED
@@ -6,12 +6,12 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.platform = Gem::Platform::RUBY
|
7
7
|
s.name = 'spree_core'
|
8
8
|
s.version = Spree.version
|
9
|
-
s.authors = ['Sean Schofield', 'Spark Solutions']
|
9
|
+
s.authors = ['Sean Schofield', 'Spark Solutions Sp. z o.o.', 'Vendo Connect Inc.']
|
10
10
|
s.email = 'hello@spreecommerce.org'
|
11
11
|
s.summary = 'The bare bones necessary for Spree'
|
12
12
|
s.description = 'Spree Models, Helpers, Services and core libraries'
|
13
13
|
s.homepage = 'https://spreecommerce.org'
|
14
|
-
s.
|
14
|
+
s.licenses = ['AGPL-3.0-or-later', 'BSD-3-Clause']
|
15
15
|
|
16
16
|
s.metadata = {
|
17
17
|
"bug_tracker_uri" => "https://github.com/spree/spree/issues",
|
@@ -44,12 +44,13 @@ Gem::Specification.new do |s|
|
|
44
44
|
s.add_dependency 'kaminari', '~> 1.2'
|
45
45
|
s.add_dependency 'money', '~> 6.13'
|
46
46
|
s.add_dependency 'monetize', '~> 1.9'
|
47
|
-
s.add_dependency 'paranoia', '
|
47
|
+
s.add_dependency 'paranoia', '>= 2.4'
|
48
48
|
s.add_dependency 'ransack', '>= 4.1'
|
49
49
|
s.add_dependency 'rexml'
|
50
50
|
s.add_dependency 'state_machines-activerecord', '~> 0.6'
|
51
51
|
s.add_dependency 'state_machines-activemodel', '~> 0.7'
|
52
52
|
s.add_dependency 'stringex'
|
53
|
+
s.add_dependency 'tracking_number'
|
53
54
|
s.add_dependency 'validates_zipcode'
|
54
55
|
s.add_dependency 'image_processing', '~> 1.2'
|
55
56
|
s.add_dependency 'active_storage_validations', '~> 1.1'
|
@@ -57,4 +58,5 @@ Gem::Specification.new do |s|
|
|
57
58
|
s.add_dependency 'mobility', '~> 1.2'
|
58
59
|
s.add_dependency 'mobility-ransack', '~> 1.2'
|
59
60
|
s.add_dependency 'friendly_id-mobility', '~> 1.0'
|
61
|
+
s.add_dependency 'request_store', '~> 1.7'
|
60
62
|
end
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
|
-
- Spark Solutions
|
8
|
+
- Spark Solutions Sp. z o.o.
|
9
|
+
- Vendo Connect Inc.
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2024-06
|
13
|
+
date: 2024-09-06 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: actionpack
|
@@ -347,14 +348,14 @@ dependencies:
|
|
347
348
|
name: paranoia
|
348
349
|
requirement: !ruby/object:Gem::Requirement
|
349
350
|
requirements:
|
350
|
-
- - "
|
351
|
+
- - ">="
|
351
352
|
- !ruby/object:Gem::Version
|
352
353
|
version: '2.4'
|
353
354
|
type: :runtime
|
354
355
|
prerelease: false
|
355
356
|
version_requirements: !ruby/object:Gem::Requirement
|
356
357
|
requirements:
|
357
|
-
- - "
|
358
|
+
- - ">="
|
358
359
|
- !ruby/object:Gem::Version
|
359
360
|
version: '2.4'
|
360
361
|
- !ruby/object:Gem::Dependency
|
@@ -427,6 +428,20 @@ dependencies:
|
|
427
428
|
- - ">="
|
428
429
|
- !ruby/object:Gem::Version
|
429
430
|
version: '0'
|
431
|
+
- !ruby/object:Gem::Dependency
|
432
|
+
name: tracking_number
|
433
|
+
requirement: !ruby/object:Gem::Requirement
|
434
|
+
requirements:
|
435
|
+
- - ">="
|
436
|
+
- !ruby/object:Gem::Version
|
437
|
+
version: '0'
|
438
|
+
type: :runtime
|
439
|
+
prerelease: false
|
440
|
+
version_requirements: !ruby/object:Gem::Requirement
|
441
|
+
requirements:
|
442
|
+
- - ">="
|
443
|
+
- !ruby/object:Gem::Version
|
444
|
+
version: '0'
|
430
445
|
- !ruby/object:Gem::Dependency
|
431
446
|
name: validates_zipcode
|
432
447
|
requirement: !ruby/object:Gem::Requirement
|
@@ -525,6 +540,20 @@ dependencies:
|
|
525
540
|
- - "~>"
|
526
541
|
- !ruby/object:Gem::Version
|
527
542
|
version: '1.0'
|
543
|
+
- !ruby/object:Gem::Dependency
|
544
|
+
name: request_store
|
545
|
+
requirement: !ruby/object:Gem::Requirement
|
546
|
+
requirements:
|
547
|
+
- - "~>"
|
548
|
+
- !ruby/object:Gem::Version
|
549
|
+
version: '1.7'
|
550
|
+
type: :runtime
|
551
|
+
prerelease: false
|
552
|
+
version_requirements: !ruby/object:Gem::Requirement
|
553
|
+
requirements:
|
554
|
+
- - "~>"
|
555
|
+
- !ruby/object:Gem::Version
|
556
|
+
version: '1.7'
|
528
557
|
description: Spree Models, Helpers, Services and core libraries
|
529
558
|
email: hello@spreecommerce.org
|
530
559
|
executables: []
|
@@ -532,7 +561,7 @@ extensions: []
|
|
532
561
|
extra_rdoc_files: []
|
533
562
|
files:
|
534
563
|
- Gemfile
|
535
|
-
- LICENSE
|
564
|
+
- LICENSE.md
|
536
565
|
- Rakefile
|
537
566
|
- app/controllers/spree/base_controller.rb
|
538
567
|
- app/finders/concerns/spree/product_filterable.rb
|
@@ -546,10 +575,12 @@ files:
|
|
546
575
|
- app/finders/spree/option_values/find_available.rb
|
547
576
|
- app/finders/spree/orders/find_complete.rb
|
548
577
|
- app/finders/spree/orders/find_current.rb
|
578
|
+
- app/finders/spree/orders/finder_helper.rb
|
549
579
|
- app/finders/spree/product_properties/find_available.rb
|
550
580
|
- app/finders/spree/products/find.rb
|
551
581
|
- app/finders/spree/stores/find_current.rb
|
552
582
|
- app/finders/spree/taxons/find.rb
|
583
|
+
- app/finders/spree/variants/find.rb
|
553
584
|
- app/finders/spree/variants/option_types_finder.rb
|
554
585
|
- app/finders/spree/variants/visible_finder.rb
|
555
586
|
- app/helpers/spree/base_helper.rb
|
@@ -664,6 +695,7 @@ files:
|
|
664
695
|
- app/models/spree/order/emails.rb
|
665
696
|
- app/models/spree/order/payments.rb
|
666
697
|
- app/models/spree/order/store_credit.rb
|
698
|
+
- app/models/spree/order/webhooks.rb
|
667
699
|
- app/models/spree/order_contents.rb
|
668
700
|
- app/models/spree/order_inventory.rb
|
669
701
|
- app/models/spree/order_merger.rb
|
@@ -672,6 +704,7 @@ files:
|
|
672
704
|
- app/models/spree/payment.rb
|
673
705
|
- app/models/spree/payment/gateway_options.rb
|
674
706
|
- app/models/spree/payment/processing.rb
|
707
|
+
- app/models/spree/payment/webhooks.rb
|
675
708
|
- app/models/spree/payment_capture_event.rb
|
676
709
|
- app/models/spree/payment_method.rb
|
677
710
|
- app/models/spree/payment_method/check.rb
|
@@ -680,6 +713,7 @@ files:
|
|
680
713
|
- app/models/spree/preference.rb
|
681
714
|
- app/models/spree/price.rb
|
682
715
|
- app/models/spree/product.rb
|
716
|
+
- app/models/spree/product/webhooks.rb
|
683
717
|
- app/models/spree/product_option_type.rb
|
684
718
|
- app/models/spree/product_promotion_rule.rb
|
685
719
|
- app/models/spree/product_property.rb
|
@@ -716,6 +750,7 @@ files:
|
|
716
750
|
- app/models/spree/refund_reason.rb
|
717
751
|
- app/models/spree/reimbursement.rb
|
718
752
|
- app/models/spree/reimbursement/credit.rb
|
753
|
+
- app/models/spree/reimbursement/emails.rb
|
719
754
|
- app/models/spree/reimbursement/reimbursement_type_engine.rb
|
720
755
|
- app/models/spree/reimbursement/reimbursement_type_validator.rb
|
721
756
|
- app/models/spree/reimbursement_performer.rb
|
@@ -742,6 +777,8 @@ files:
|
|
742
777
|
- app/models/spree/role.rb
|
743
778
|
- app/models/spree/role_user.rb
|
744
779
|
- app/models/spree/shipment.rb
|
780
|
+
- app/models/spree/shipment/emails.rb
|
781
|
+
- app/models/spree/shipment/webhooks.rb
|
745
782
|
- app/models/spree/shipment_handler.rb
|
746
783
|
- app/models/spree/shipping_calculator.rb
|
747
784
|
- app/models/spree/shipping_category.rb
|
@@ -768,8 +805,10 @@ files:
|
|
768
805
|
- app/models/spree/stock/splitter/shipping_category.rb
|
769
806
|
- app/models/spree/stock/splitter/weight.rb
|
770
807
|
- app/models/spree/stock_item.rb
|
808
|
+
- app/models/spree/stock_item/webhooks.rb
|
771
809
|
- app/models/spree/stock_location.rb
|
772
810
|
- app/models/spree/stock_movement.rb
|
811
|
+
- app/models/spree/stock_movement/webhooks.rb
|
773
812
|
- app/models/spree/stock_transfer.rb
|
774
813
|
- app/models/spree/store.rb
|
775
814
|
- app/models/spree/store_credit.rb
|
@@ -789,6 +828,7 @@ files:
|
|
789
828
|
- app/models/spree/taxon_image/configuration/active_storage.rb
|
790
829
|
- app/models/spree/taxonomy.rb
|
791
830
|
- app/models/spree/variant.rb
|
831
|
+
- app/models/spree/variant/webhooks.rb
|
792
832
|
- app/models/spree/wished_item.rb
|
793
833
|
- app/models/spree/wishlist.rb
|
794
834
|
- app/models/spree/zone.rb
|
@@ -851,6 +891,7 @@ files:
|
|
851
891
|
- app/services/spree/seeds/all.rb
|
852
892
|
- app/services/spree/seeds/countries.rb
|
853
893
|
- app/services/spree/seeds/default_reimbursement_types.rb
|
894
|
+
- app/services/spree/seeds/payment_methods.rb
|
854
895
|
- app/services/spree/seeds/roles.rb
|
855
896
|
- app/services/spree/seeds/shipping_categories.rb
|
856
897
|
- app/services/spree/seeds/states.rb
|
@@ -865,6 +906,7 @@ files:
|
|
865
906
|
- app/services/spree/shipments/remove_item.rb
|
866
907
|
- app/services/spree/shipments/update.rb
|
867
908
|
- app/services/spree/stock_locations/stock_items/create.rb
|
909
|
+
- app/services/spree/tracking_numbers/base_service.rb
|
868
910
|
- app/services/spree/variants/remove_line_items.rb
|
869
911
|
- app/services/spree/wallet/create_payment_source.rb
|
870
912
|
- app/sorters/spree/base_sorter.rb
|
@@ -939,6 +981,9 @@ files:
|
|
939
981
|
- db/migrate/20230512094803_rename_data_feeds_column_provider_to_type.rb
|
940
982
|
- db/migrate/20240303174340_fix_spree_stock_item_unique_index.rb
|
941
983
|
- db/migrate/20240514105216_add_weight_and_dimension_units_to_spree_variants.rb
|
984
|
+
- db/migrate/20240623172111_add_deleted_at_to_spree_stock_locations.rb
|
985
|
+
- db/migrate/20240725124530_add_refunder_to_spree_refunds.rb
|
986
|
+
- db/migrate/20240822163534_add_pretty_name_to_spree_taxons.rb
|
942
987
|
- db/seeds.rb
|
943
988
|
- lib/friendly_id/paranoia.rb
|
944
989
|
- lib/generators/spree/custom_authentication/custom_authentication_generator.rb
|
@@ -1116,12 +1161,13 @@ files:
|
|
1116
1161
|
- spree_core.gemspec
|
1117
1162
|
homepage: https://spreecommerce.org
|
1118
1163
|
licenses:
|
1164
|
+
- AGPL-3.0-or-later
|
1119
1165
|
- BSD-3-Clause
|
1120
1166
|
metadata:
|
1121
1167
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
1122
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v4.
|
1168
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v4.10.0
|
1123
1169
|
documentation_uri: https://docs.spreecommerce.org/
|
1124
|
-
source_code_uri: https://github.com/spree/spree/tree/v4.
|
1170
|
+
source_code_uri: https://github.com/spree/spree/tree/v4.10.0
|
1125
1171
|
post_install_message:
|
1126
1172
|
rdoc_options: []
|
1127
1173
|
require_paths:
|
data/LICENSE
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
Copyright (c) 2007-2024, Spree Commerce, Inc., Spark Solutuons Sp. z o.o. and other contributors
|
2
|
-
All rights reserved.
|
3
|
-
|
4
|
-
Redistribution and use in source and binary forms, with or without modification,
|
5
|
-
are permitted provided that the following conditions are met:
|
6
|
-
|
7
|
-
* Redistributions of source code must retain the above copyright notice,
|
8
|
-
this list of conditions and the following disclaimer.
|
9
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
10
|
-
this list of conditions and the following disclaimer in the documentation
|
11
|
-
and/or other materials provided with the distribution.
|
12
|
-
* Neither the name Spree nor the names of its contributors may be used to
|
13
|
-
endorse or promote products derived from this software without specific
|
14
|
-
prior written permission.
|
15
|
-
|
16
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
20
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
21
|
-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
22
|
-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
23
|
-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
24
|
-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
25
|
-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
26
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|