solidus_frontend 2.11.10 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_frontend might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a7413b3947329692aa470cb16152a64e4ecc9899a6788db009ee8bd00cba8f7
4
- data.tar.gz: e36958bb68c6999ddf45a5e9318dca27d06d1e620e557f0ec6c8eb9410885237
3
+ metadata.gz: 18d412fff110d97ee160aa8f7bc83418eb585f10c4a8e1ed8a4b3d1abdb4dd2f
4
+ data.tar.gz: 2b50f48fea6d6b4bd8bd7b5c7eb4068704a08fc089b41d596a4d53475d69ea57
5
5
  SHA512:
6
- metadata.gz: 8ecb335053d8def2f9c48d6eb740eaaff40d7e48f5be3bd5d665674e6d378c5f9b8e8047a26f8199646a8169a74894a9e6d13ad8786dab7e27cd1b34f677c201
7
- data.tar.gz: e43537c7b8f82a8a21dfcc76d1561bb42b9ccc689893d99db1c8ad2690862a016e41b992af8101f001e2e65d2a6ac51832ebc8a3210127df783cbd55d766f65e
6
+ metadata.gz: b9f0588e0fef4ae348febcb40dbe1a7486976fa82f3b1b0b83d8ed87ac5525a84e147e0f2aa9c00ce286139aed65b9dfec9464b9734d328c9ee67a3cce13fdb0
7
+ data.tar.gz: 0d41c9a0131aa52669f147f1e216653a09db4d73770ef90136b97980f46c6f609299e231b1a642af69b3ce1817776db5b302f5f33d90b9ff902c40250eef41ea
@@ -17,7 +17,6 @@ module Spree
17
17
 
18
18
  before_action :associate_user
19
19
  before_action :check_authorization
20
- before_action :apply_coupon_code, only: [:update]
21
20
 
22
21
  before_action :setup_for_current_state, only: [:edit, :update]
23
22
 
@@ -111,10 +110,6 @@ module Spree
111
110
  massaged_params = params.deep_dup
112
111
 
113
112
  move_payment_source_into_payments_attributes(massaged_params)
114
- if massaged_params[:order] && massaged_params[:order][:existing_card].present?
115
- Spree::Deprecation.warn("Passing order[:existing_card] is deprecated. Send order[:wallet_payment_source_id] instead.", caller)
116
- move_existing_card_into_payments_attributes(massaged_params) # deprecated
117
- end
118
113
  move_wallet_payment_source_id_into_payments_attributes(massaged_params)
119
114
  set_payment_parameters_amount(massaged_params, @order)
120
115
 
@@ -160,11 +155,6 @@ module Spree
160
155
  end
161
156
  end
162
157
 
163
- def set_state_if_present
164
- ensure_order_is_not_skipping_states
165
- end
166
- deprecate set_state_if_present: :prevent_order_from_skipping_states, deprecator: Spree::Deprecation
167
-
168
158
  def ensure_checkout_allowed
169
159
  unless @order.checkout_allowed?
170
160
  redirect_to spree.cart_path
@@ -188,24 +178,6 @@ module Spree
188
178
  spree.order_path(@order)
189
179
  end
190
180
 
191
- def apply_coupon_code
192
- if update_params[:coupon_code].present?
193
- Spree::Deprecation.warn('This endpoint is deprecated. Please use `Spree::CouponCodesController#create` endpoint instead.')
194
- @order.coupon_code = update_params[:coupon_code]
195
-
196
- handler = PromotionHandler::Coupon.new(@order).apply
197
-
198
- if handler.error.present?
199
- flash.now[:error] = handler.error
200
- elsif handler.success
201
- flash[:success] = handler.success
202
- end
203
-
204
- setup_for_current_state
205
- respond_with(@order) { |format| format.html { render :edit } } && return
206
- end
207
- end
208
-
209
181
  def setup_for_current_state
210
182
  method_name = :"before_#{@order.state}"
211
183
  send(method_name) if respond_to?(method_name, true)
@@ -239,14 +211,6 @@ module Spree
239
211
  @wallet_payment_sources = try_spree_current_user.wallet.wallet_payment_sources
240
212
  @default_wallet_payment_source = @wallet_payment_sources.detect(&:default) ||
241
213
  @wallet_payment_sources.first
242
-
243
- @payment_sources = Spree::DeprecatedInstanceVariableProxy.new(
244
- self,
245
- :deprecated_payment_sources,
246
- :@payment_sources,
247
- Spree::Deprecation,
248
- "Please, do not use @payment_sources anymore, use @wallet_payment_sources instead."
249
- )
250
214
  end
251
215
  end
252
216
 
@@ -276,22 +240,5 @@ module Spree
276
240
  end
277
241
  end
278
242
  end
279
-
280
- # This method returns payment sources of the current user. It is no more
281
- # used into our frontend. We used to assign the content of this method
282
- # into an ivar (@payment_sources) into the checkout payment step. This
283
- # method is here only to be able to deprecate this ivar and will be removed.
284
- #
285
- # DO NOT USE THIS METHOD!
286
- #
287
- # @return [Array<Spree::PaymentSource>] Payment sources connected to
288
- # current user wallet.
289
- # @deprecated This method has been added to deprecate @payment_sources
290
- # ivar and will be removed. Use @wallet_payment_sources instead.
291
- def deprecated_payment_sources
292
- try_spree_current_user.wallet.wallet_payment_sources
293
- .map(&:payment_source)
294
- .select { |ps| ps.is_a?(Spree::CreditCard) }
295
- end
296
243
  end
297
244
  end
@@ -10,7 +10,6 @@ module Spree
10
10
  before_action :assign_order, only: :update
11
11
  # note: do not lock the #edit action because that's where we redirect when we fail to acquire a lock
12
12
  around_action :lock_order, only: :update
13
- before_action :apply_coupon_code, only: :update
14
13
  skip_before_action :verify_authenticity_token, only: [:populate]
15
14
 
16
15
  def show
@@ -123,21 +122,5 @@ module Spree
123
122
  redirect_to(root_path) && return
124
123
  end
125
124
  end
126
-
127
- def apply_coupon_code
128
- if order_params[:coupon_code].present?
129
- Spree::Deprecation.warn('This endpoint is deprecated. Please use `Spree::CouponCodesController#create` endpoint instead.')
130
- @order.coupon_code = order_params[:coupon_code]
131
-
132
- handler = PromotionHandler::Coupon.new(@order).apply
133
-
134
- if handler.error.present?
135
- flash.now[:error] = handler.error
136
- respond_with(@order) { |format| format.html { render :edit } } && return
137
- elsif handler.success
138
- flash[:success] = handler.success
139
- end
140
- end
141
- end
142
125
  end
143
126
  end
@@ -1,21 +1,9 @@
1
1
  <% address_id = address_type.chars.first %>
2
2
  <div class="inner" data-hook=<%="#{address_type}_inner" %>>
3
- <% if Spree::Config.use_combined_first_and_last_name_in_address %>
4
- <div class="field field-required" id="<%= "#{address_id}name" %>">
5
- <%= form.label :name, t('spree.name') %>
6
- <%= form.text_field :name, class: 'required', autocomplete: address_type + ' name', required: true, autofocus: true %>
7
- </div>
8
- <% else %>
9
- <div class="field field-required" id="<%= "#{address_id}firstname" %>">
10
- <%= form.label :firstname, t('spree.first_name') %>
11
- <%= form.text_field :firstname, class: 'required', autocomplete: address_type + ' given-name', required: true, autofocus: true %>
12
- </div>
13
-
14
- <div class="field" id="<%= "#{address_id}lastname" %>">
15
- <%= form.label :lastname, t('spree.last_name') %>
16
- <%= form.text_field :lastname, autocomplete: address_type + ' family-name' %>
17
- </div>
18
- <% end %>
3
+ <div class="field field-required" id="<%= "#{address_id}name" %>">
4
+ <%= form.label :name, t('spree.name') %>
5
+ <%= form.text_field :name, class: 'required', autocomplete: address_type + ' name', required: true, autofocus: true %>
6
+ </div>
19
7
 
20
8
  <% if Spree::Config[:company] %>
21
9
  <div class="field" id=<%="#{address_id}company" %>>
@@ -1,9 +1,4 @@
1
- <% if Spree::Config.use_combined_first_and_last_name_in_address %>
2
- <%= form.hidden_field :name %>
3
- <% else %>
4
- <%= form.hidden_field :firstname %>
5
- <%= form.hidden_field :lastname %>
6
- <% end %>
1
+ <%= form.hidden_field :name %>
7
2
  <%= form.hidden_field :company %>
8
3
  <%= form.hidden_field :address1 %>
9
4
  <%= form.hidden_field :address2 %>
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rails/all'
3
+ require 'solidus_core'
4
+ require 'solidus_api'
5
+
4
6
  require 'jquery-rails'
5
7
  require 'canonical-rails'
6
8
  require 'sassc-rails'
@@ -8,8 +10,5 @@ require 'font-awesome-rails'
8
10
  require 'responders'
9
11
  require 'kaminari'
10
12
 
11
- require 'solidus_core'
12
- require 'solidus_api'
13
-
14
13
  require 'spree/frontend/middleware/seo_assist'
15
14
  require 'spree/frontend/engine'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.10
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-05-10 00:00:00.000000000 Z
11
+ date: 2021-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.11.10
19
+ version: 3.0.2
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: 2.11.10
26
+ version: 3.0.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: solidus_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 2.11.10
33
+ version: 3.0.2
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: 2.11.10
40
+ version: 3.0.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: canonical-rails
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -304,7 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
304
304
  - !ruby/object:Gem::Version
305
305
  version: 1.8.23
306
306
  requirements: []
307
- rubygems_version: 3.1.4
307
+ rubygems_version: 3.2.20
308
308
  signing_key:
309
309
  specification_version: 4
310
310
  summary: Cart and storefront for the Solidus e-commerce project.