spree_frontend 4.1.12 → 4.1.13

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: 927d3464e4cd36a3828602f101f911b0fea3968b5be7e0d30f0c15ca1ebf5d58
4
- data.tar.gz: c6421c452a2aae0b0bd355aaf5f9aec8d31f2a3bc21f6a5ae653437a64dc0c99
3
+ metadata.gz: 78c25c5b833141110ec9f1d61389ce18ffd64d7c84016eb2634f0059542f1d9f
4
+ data.tar.gz: b930dc7a6d9bb4f38b42be4be538615329f27fe1585c9ceee06b2d14d9f42bcf
5
5
  SHA512:
6
- metadata.gz: 8ceb40b8da84332689b48a32a1d5030285e3e12d052882732abd1fef105ee95345c100e0999d2c6dfb7c4d93e28125ba236990faf7f759a991a19b449888935e
7
- data.tar.gz: 184036e1a7e5669bbe3e0012c1413b311ea39dffad4b4f795dd8381bc7e596958006594da5c0a17b9338bea8bf4343ce5ae5c26dd6c74cea966439bfb52239f6
6
+ metadata.gz: 777636195b350fa750af9f8b26d493d7c159f5cdae60da792471d7fca49638c3cc8e2007373b218bdf7bebc14b846cf18fe0b5f411dea9a685a3bea942dcc733
7
+ data.tar.gz: 3b10879e8acbe55a3064ff7104c4385952e42d02c4fb76694e88743dde0ce3ddc924ffd2dd8db8c2c5443c58e7bcc5dca524d48461c2c3d3ee8422bffd64dd4c
@@ -32,21 +32,23 @@ module Spree
32
32
  end
33
33
 
34
34
  def normalize_addresses
35
- return unless params[:state] == 'address' && @order.bill_address_id && @order.ship_address_id
35
+ return unless params[:state] == 'address' && @order.bill_address_id
36
36
 
37
- # ensure that there is no validation errors and addresses were saved
38
- return unless @order.bill_address && @order.ship_address
37
+ if @order.checkout_steps.include?('delivery')
38
+ return unless @order.ship_address_id
39
+ end
39
40
 
40
41
  bill_address = @order.bill_address
41
42
  ship_address = @order.ship_address
43
+
44
+ if params[:save_user_address].present? && try_spree_current_user.present?
45
+ [bill_address, ship_address].each { |address| address&.update_attribute(:user_id, try_spree_current_user&.id) }
46
+ end
47
+
42
48
  if @order.bill_address_id != @order.ship_address_id && bill_address == ship_address
43
49
  @order.update_column(:bill_address_id, ship_address.id)
44
50
  bill_address.destroy
45
- elsif params[:save_user_address]
46
- bill_address.update_attribute(:user_id, try_spree_current_user&.id)
47
51
  end
48
-
49
- ship_address.update_attribute(:user_id, try_spree_current_user&.id) if params[:save_user_address]
50
52
  end
51
53
  end
52
54
  end
@@ -37,6 +37,7 @@ module Spree
37
37
  else
38
38
  new_address = @address.clone
39
39
  new_address.attributes = address_params
40
+ new_address.user_id = @address.user_id
40
41
  @address.update_attribute(:deleted_at, Time.current)
41
42
  if new_address.save
42
43
  flash[:notice] = Spree.t(:successfully_updated, scope: :address_book)
@@ -10,5 +10,5 @@ CanonicalRails.setup do |config|
10
10
  # Parameter spamming can cause index dilution by creating seemingly different URLs with identical or near-identical content.
11
11
  # Unless whitelisted, these parameters will be omitted
12
12
 
13
- config.whitelisted_parameters = [:keywords, :page, :search, :taxon]
13
+ config.allowed_parameters = [:keywords, :page, :search, :taxon]
14
14
  end
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
30
30
 
31
31
  s.add_dependency 'bootstrap', '~> 4.3.1'
32
32
  s.add_dependency 'glyphicons', '~> 1.0.2'
33
- s.add_dependency 'canonical-rails', '~> 0.2.5'
33
+ s.add_dependency 'canonical-rails', '~> 0.2.10'
34
34
  s.add_dependency 'inline_svg', '~> 1.5'
35
35
  s.add_dependency 'jquery-rails', '~> 4.3'
36
36
  s.add_dependency 'turbolinks', '~> 5.2.0'
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: 4.1.12
4
+ version: 4.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-10 00:00:00.000000000 Z
11
+ date: 2020-12-15 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: 4.1.12
19
+ version: 4.1.13
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: 4.1.12
26
+ version: 4.1.13
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: 4.1.12
33
+ version: 4.1.13
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: 4.1.12
40
+ version: 4.1.13
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bootstrap
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.2.5
75
+ version: 0.2.10
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.2.5
82
+ version: 0.2.10
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: inline_svg
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -501,9 +501,9 @@ licenses:
501
501
  - BSD-3-Clause
502
502
  metadata:
503
503
  bug_tracker_uri: https://github.com/spree/spree/issues
504
- changelog_uri: https://github.com/spree/spree/releases/tag/v4.1.12
504
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.1.13
505
505
  documentation_uri: https://guides.spreecommerce.org/
506
- source_code_uri: https://github.com/spree/spree/tree/v4.1.12
506
+ source_code_uri: https://github.com/spree/spree/tree/v4.1.13
507
507
  post_install_message:
508
508
  rdoc_options: []
509
509
  require_paths: