shopify_transporter 2.5.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dcf7ebc113e86f091a42b7aa1ca599a7f7f823b260451d984b65d85da52a265
|
4
|
+
data.tar.gz: 55069a4fc009a16f7e8bae9c83da3d0cf7cb0571bd21aa475f7d995eddf0cd01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85c6e59209bc28b9b90c9f86f5bed75399eb2b24ed202b3b4c78e161ba1f8bdfe0b74a2e18e8babdf0f8c868af78dc0cfe87457876be3d504eaeaa15507fc717
|
7
|
+
data.tar.gz: 5865d79a305b0fca3449f96459f25beeae677390835176bdf9b9f86c70092afcd8e618d690b5eb38f45f21a11927cc1e54f60aca6d5750ec5403b439efe76123
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
require 'shopify_transporter/pipeline/stage'
|
3
3
|
require 'shopify_transporter/shopify'
|
4
|
+
|
4
5
|
module ShopifyTransporter
|
5
6
|
module Pipeline
|
6
7
|
module Magento
|
@@ -21,7 +22,22 @@ module ShopifyTransporter
|
|
21
22
|
items = input['items']
|
22
23
|
result = items && items['result']
|
23
24
|
address = result && result["#{prefix}address"]
|
24
|
-
address
|
25
|
+
address ||= []
|
26
|
+
clean_address(input, address, prefix)
|
27
|
+
end
|
28
|
+
|
29
|
+
def clean_address(input, address, prefix)
|
30
|
+
address.each_with_object({}) do |(key, val), purged_address|
|
31
|
+
if val.is_a?(String)
|
32
|
+
purged_address[key] = val
|
33
|
+
else
|
34
|
+
address_type = prefix.chomp('_')
|
35
|
+
warning = "Warning: Order #{input['increment_id']} - "\
|
36
|
+
"#{key} of the #{address_type} address is in an unexpected format. "\
|
37
|
+
"Transporter CLI expects it to be a string. Skipping #{key}."
|
38
|
+
$stderr.puts warning
|
39
|
+
end
|
40
|
+
end
|
25
41
|
end
|
26
42
|
|
27
43
|
def address_attributes(input, prefix)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_transporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|