valken-shipping 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/workarea/addresses_helper.rb +6 -3
- data/lib/valken/shipping/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de87f21281f76ad4ff9f00e829c028e2e1ba1f4813c821d89664f11024725171
|
4
|
+
data.tar.gz: 98658fd8e5aef01ad8f763751cb577ee5ca2fd94818605926a49713dce77be23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c6dd426e9a1631da60b4c1acd121ac0ace51837c7e94c5bf06e18a8698c7a8b0cdbc113c7f28962cd8b65f9922e388fc5ff3db6a17f4e49fd31c325bf8ce0ed
|
7
|
+
data.tar.gz: 6c7fa9cd69747eb934f40231ebc829aea8a0c0d60705c5bb172f9d5296bc3ede35a2c2c490a3a88adf6853de0edb5957f537b968c7d12ede5c6f8ec0f9288c9b
|
@@ -19,13 +19,16 @@ module Workarea
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def is_usa_only?
|
22
|
-
|
22
|
+
|
23
23
|
orders = current_order rescue nil
|
24
24
|
return false if orders.blank? || orders.items.blank?
|
25
25
|
|
26
26
|
usa_only_attribute = Workarea.config.shipping_attributes[:usa_only]
|
27
|
-
|
28
|
-
|
27
|
+
return product_details(orders).map{ |item| item[:en][usa_only_attribute] }.flatten.include?("true")
|
28
|
+
end
|
29
|
+
|
30
|
+
def product_details(orders)
|
31
|
+
@product_details ||= Catalog::Product.in(id: orders.items.to_a.map(&:product_id)).pluck(:details)
|
29
32
|
end
|
30
33
|
|
31
34
|
def formatted_address(address)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: valken-shipping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sushmitha02
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|