spree_frontend 4.0.4 → 4.0.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c7b631b35e35b65c7ea812837e71e3123bd2487d97144677012a91ac172b10c
|
4
|
+
data.tar.gz: '081cdcb4a96907dc3653d90541ba949e192ebaf8f128bd94f064129793ca3c5b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f626ab4760f5c18c969491e705c24ac7bc06f2ee0f6a06f66a0bd257742d343d4e02cae3339954071ce9f4a4fd8b7beb44f3b6fe0a9319a23da43c7f405a6ee6
|
7
|
+
data.tar.gz: 11456aa6fac7da947dfe58404a58f3d42a702eacff387341dadf81e0b16d915454a0e012e1de31b7ad5b7b3e8a31ff647fcae56f2139513e7d6b1c2ec7e1f48a
|
@@ -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
|
35
|
+
return unless params[:state] == 'address' && @order.bill_address_id
|
36
36
|
|
37
|
-
|
38
|
-
|
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)
|
data/spree_frontend.gemspec
CHANGED
@@ -5,16 +5,22 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.platform = Gem::Platform::RUBY
|
6
6
|
s.name = 'spree_frontend'
|
7
7
|
s.version = Spree.version
|
8
|
-
s.summary = 'Frontend e-commerce functionality for the Spree project.'
|
9
|
-
s.description = s.summary
|
10
|
-
|
11
|
-
s.required_ruby_version = '>= 2.5.0'
|
12
|
-
|
13
8
|
s.author = 'Sean Schofield'
|
14
9
|
s.email = 'sean@spreecommerce.com'
|
10
|
+
s.summary = 'Frontend e-commerce functionality for the Spree project.'
|
11
|
+
s.description = s.summary
|
15
12
|
s.homepage = 'http://spreecommerce.org'
|
16
13
|
s.license = 'BSD-3-Clause'
|
17
14
|
|
15
|
+
s.metadata = {
|
16
|
+
"bug_tracker_uri" => "https://github.com/spree/spree/issues",
|
17
|
+
"changelog_uri" => "https://github.com/spree/spree/releases/tag/v#{s.version}",
|
18
|
+
"documentation_uri" => "https://guides.spreecommerce.org/",
|
19
|
+
"source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",
|
20
|
+
}
|
21
|
+
|
22
|
+
s.required_ruby_version = '>= 2.5.0'
|
23
|
+
|
18
24
|
s.files = `git ls-files`.split("\n").reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
|
19
25
|
s.require_path = 'lib'
|
20
26
|
s.requirements << 'none'
|
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.0.
|
4
|
+
version: 4.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-31 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.0.
|
19
|
+
version: 4.0.8
|
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.0.
|
26
|
+
version: 4.0.8
|
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.0.
|
33
|
+
version: 4.0.8
|
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.0.
|
40
|
+
version: 4.0.8
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bootstrap
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -250,7 +250,11 @@ files:
|
|
250
250
|
homepage: http://spreecommerce.org
|
251
251
|
licenses:
|
252
252
|
- BSD-3-Clause
|
253
|
-
metadata:
|
253
|
+
metadata:
|
254
|
+
bug_tracker_uri: https://github.com/spree/spree/issues
|
255
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v4.0.8
|
256
|
+
documentation_uri: https://guides.spreecommerce.org/
|
257
|
+
source_code_uri: https://github.com/spree/spree/tree/v4.0.8
|
254
258
|
post_install_message:
|
255
259
|
rdoc_options: []
|
256
260
|
require_paths:
|
@@ -267,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
271
|
version: '0'
|
268
272
|
requirements:
|
269
273
|
- none
|
270
|
-
rubygems_version: 3.
|
274
|
+
rubygems_version: 3.2.3
|
271
275
|
signing_key:
|
272
276
|
specification_version: 4
|
273
277
|
summary: Frontend e-commerce functionality for the Spree project.
|