spree_frontend 3.7.0.rc2 → 3.7.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 766ed21537e5bd1d8185893ed1349c5e42f443a1ae4035b3289195c9034c904e
4
- data.tar.gz: b5b9cef789b61f1a3f78fb0a47f005d0a258b6c5672d09929ce0ae1c60c5af08
3
+ metadata.gz: f9f950734c977bf42efc514688cb40b5744fdff035064115547c42df152a2486
4
+ data.tar.gz: d1b6d78a9f1c32e193ec8dbfb54793671adfa471c813f93ba8836adebe221afa
5
5
  SHA512:
6
- metadata.gz: 18a4ab2ccad483b8e6d5c654e3415732fe5a78eb7a760ad9fa12a1e6a9b78fd81aa5f53a52ce127dbeae4bc06abe20281db01082d719fc3439f0bcdf2ddfcba2
7
- data.tar.gz: 55f47cb6376353347d1bd78db800d77a63bc4528dad8cc276a26c28a24da2eac2ed9713b7efde7aaef8269119259397d5c92d89c1b686f58bd34ed2cbb5f677d
6
+ metadata.gz: 16afbc1b2c395fe74dcc4b8aac31f657554aa849902f914b1c983eac29dd236173d8384219837d8782d46e68217ef91f0e726497e03cd84626ab25382cdc6a10
7
+ data.tar.gz: b229364691b0ee062143150283389444707ada91a0f260b507b80cf32625a88e9e97b4931d14a71e2290a86dc76d9662d7dcdc278b443b669e9ff45914cbf95a
@@ -153,7 +153,7 @@ module Spree
153
153
  packages = @order.shipments.map(&:to_package)
154
154
  @differentiator = Spree::Stock::Differentiator.new(@order, packages)
155
155
  @differentiator.missing.each do |variant, quantity|
156
- Spree::Cart::RemoveItem.call(order: @order, variant: variant, quantity: quantity)
156
+ Spree::Dependencies.cart_remove_item_service.constantize.call(order: @order, variant: variant, quantity: quantity)
157
157
  end
158
158
  end
159
159
 
@@ -162,7 +162,7 @@ module Spree
162
162
 
163
163
  def add_store_credit_payments
164
164
  if params.key?(:apply_store_credit)
165
- Spree::Checkout::AddStoreCredit.call(order: @order)
165
+ add_store_credit_service.call(order: @order)
166
166
 
167
167
  # Remove other payment method parameters.
168
168
  params[:order].delete(:payments_attributes)
@@ -176,7 +176,7 @@ module Spree
176
176
 
177
177
  def remove_store_credit_payments
178
178
  if params.key?(:remove_store_credit)
179
- Spree::Checkout::RemoveStoreCredit.call(order: @order)
179
+ remove_store_credit_service.call(order: @order)
180
180
  redirect_to checkout_state_path(@order.state) and return
181
181
  end
182
182
  end
@@ -194,5 +194,13 @@ module Spree
194
194
  def set_cache_header
195
195
  response.headers['Cache-Control'] = 'no-store'
196
196
  end
197
+
198
+ def add_store_credit_service
199
+ Spree::Dependencies.checkout_add_store_credit_service.constantize
200
+ end
201
+
202
+ def remove_store_credit_service
203
+ Spree::Dependencies.checkout_remove_store_credit_service.constantize
204
+ end
197
205
  end
198
206
  end
@@ -54,7 +54,10 @@ module Spree
54
54
  # 2,147,483,647 is crazy. See issue #2695.
55
55
  if quantity.between?(1, 2_147_483_647)
56
56
  begin
57
- result = Spree::Cart::AddItem.call(order: order, variant: variant, quantity: quantity, options: options)
57
+ result = cart_add_item_service.call(order: order,
58
+ variant: variant,
59
+ quantity: quantity,
60
+ options: options)
58
61
  if result.failure?
59
62
  error = result.value.errors.full_messages.join(', ')
60
63
  else
@@ -133,5 +136,9 @@ module Spree
133
136
  redirect_to root_path and return
134
137
  end
135
138
  end
139
+
140
+ def cart_add_item_service
141
+ Spree::Dependencies.cart_add_item_service.constantize
142
+ end
136
143
  end
137
144
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0.rc2
4
+ version: 3.7.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-22 00:00:00.000000000 Z
11
+ date: 2019-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.7.0.rc2
19
+ version: 3.7.0.rc3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.7.0.rc2
26
+ version: 3.7.0.rc3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: spree_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.7.0.rc2
33
+ version: 3.7.0.rc3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.7.0.rc2
40
+ version: 3.7.0.rc3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bootstrap-sass
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -242,8 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
242
242
  version: 1.3.1
243
243
  requirements:
244
244
  - none
245
- rubyforge_project:
246
- rubygems_version: 2.7.8
245
+ rubygems_version: 3.0.2
247
246
  signing_key:
248
247
  specification_version: 4
249
248
  summary: Frontend e-commerce functionality for the Spree project.