solidus_core 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of solidus_core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/models/spree/order.rb +1 -1
- data/app/models/spree/product.rb +0 -1
- data/app/models/spree/return_item.rb +2 -3
- data/app/models/spree/stock/simple_coordinator.rb +6 -1
- data/app/models/spree/variant.rb +1 -1
- data/lib/spree/core/validators/email.rb +1 -1
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/permitted_attributes.rb +7 -1
- data/lib/spree/testing_support/dummy_app.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca6d8d275b71868fa0cbcfd87ea5c540ed14c4db6908e90192012889adc936b9
|
4
|
+
data.tar.gz: b9333bbde0b2634d590a9021d2b4c4a2cb398a25099254947b870f94ff0d5992
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c56f0af4fbd26a4d486aaeb170d6554d256a7265a33a0a515150822dc8aefa1369e7e4ce8b3e3b60ea2a32318b9f03d9f214d18c6014ff248649d3867cc83a0b
|
7
|
+
data.tar.gz: acc8a07396946a959ebda8e0c7953eb7cb6ac656a7e91debd6e0159d0c7a6e896f0406d226fd3e28d6776999fc9797938010cdb952bea32ae819cdd64f435b4e
|
data/app/models/spree/order.rb
CHANGED
@@ -490,7 +490,7 @@ module Spree
|
|
490
490
|
raise CannotRebuildShipments.new(I18n.t('spree.cannot_rebuild_shipments_shipments_not_pending'))
|
491
491
|
else
|
492
492
|
shipments.destroy_all
|
493
|
-
|
493
|
+
shipments.push(*Spree::Config.stock.coordinator_class.new(self).shipments)
|
494
494
|
end
|
495
495
|
end
|
496
496
|
|
data/app/models/spree/product.rb
CHANGED
@@ -254,10 +254,9 @@ module Spree
|
|
254
254
|
}).where.not(id: id).first
|
255
255
|
|
256
256
|
if other_return_item && (new_record? || COMPLETED_RECEPTION_STATUSES.include?(reception_status.to_sym))
|
257
|
-
errors.add(:inventory_unit, :other_completed_return_item_exists,
|
257
|
+
errors.add(:inventory_unit, :other_completed_return_item_exists,
|
258
258
|
inventory_unit_id: inventory_unit_id,
|
259
|
-
return_item_id: other_return_item.id
|
260
|
-
})
|
259
|
+
return_item_id: other_return_item.id)
|
261
260
|
end
|
262
261
|
end
|
263
262
|
|
@@ -73,11 +73,16 @@ module Spree
|
|
73
73
|
packages = split_packages(packages)
|
74
74
|
|
75
75
|
# Turn the Stock::Packages into a Shipment with rates
|
76
|
-
packages.map do |package|
|
76
|
+
shipments = packages.map do |package|
|
77
77
|
shipment = package.shipment = package.to_shipment
|
78
78
|
shipment.shipping_rates = Spree::Config.stock.estimator_class.new.shipping_rates(package)
|
79
79
|
shipment
|
80
80
|
end
|
81
|
+
|
82
|
+
# Make sure we don't add the proposed shipments to the order
|
83
|
+
order.shipments = order.shipments - shipments
|
84
|
+
|
85
|
+
shipments
|
81
86
|
end
|
82
87
|
|
83
88
|
def split_packages(initial_packages)
|
data/app/models/spree/variant.rb
CHANGED
@@ -30,7 +30,7 @@ module Spree
|
|
30
30
|
attr_writer :rebuild_vat_prices
|
31
31
|
include Spree::DefaultPrice
|
32
32
|
|
33
|
-
belongs_to :product, -> { with_discarded }, touch: true, class_name: 'Spree::Product', inverse_of: :
|
33
|
+
belongs_to :product, -> { with_discarded }, touch: true, class_name: 'Spree::Product', inverse_of: :variants_including_master, optional: false
|
34
34
|
belongs_to :tax_category, class_name: 'Spree::TaxCategory', optional: true
|
35
35
|
|
36
36
|
delegate :name, :description, :slug, :available_on, :discontinue_on, :discontinued?,
|
@@ -16,7 +16,7 @@ module Spree
|
|
16
16
|
|
17
17
|
def validate_each(record, attribute, value)
|
18
18
|
unless EMAIL_REGEXP.match? value
|
19
|
-
record.errors.add(attribute, :invalid, { value: value }.merge!(options))
|
19
|
+
record.errors.add(attribute, :invalid, **{ value: value }.merge!(options))
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
data/lib/spree/core/version.rb
CHANGED
@@ -51,7 +51,13 @@ module Spree
|
|
51
51
|
:month, :year, :expiry, :first_name, :last_name, :name
|
52
52
|
]
|
53
53
|
|
54
|
-
@@customer_return_attributes = [
|
54
|
+
@@customer_return_attributes = [
|
55
|
+
:stock_location_id, return_items_attributes: [
|
56
|
+
:id, :inventory_unit_id, :return_authorization_id, :returned, :amount,
|
57
|
+
:reception_status_event, :acceptance_status, :exchange_variant_id,
|
58
|
+
:resellable, :return_reason_id
|
59
|
+
]
|
60
|
+
]
|
55
61
|
|
56
62
|
@@image_attributes = [:alt, :attachment, :position, :viewable_type, :viewable_id]
|
57
63
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -944,7 +944,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
944
944
|
- !ruby/object:Gem::Version
|
945
945
|
version: 1.8.23
|
946
946
|
requirements: []
|
947
|
-
rubygems_version: 3.
|
947
|
+
rubygems_version: 3.2.20
|
948
948
|
signing_key:
|
949
949
|
specification_version: 4
|
950
950
|
summary: Essential models, mailers, and classes for the Solidus e-commerce project.
|