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: 4d00e959d012ed055eda454c043cf1b07575fe40acaf7c8f16610e9cad461597
4
- data.tar.gz: 8d7325220f9c1823846535512572f97c095dd6cfa8abd539e730cc257f43980b
3
+ metadata.gz: 9dcf7ebc113e86f091a42b7aa1ca599a7f7f823b260451d984b65d85da52a265
4
+ data.tar.gz: 55069a4fc009a16f7e8bae9c83da3d0cf7cb0571bd21aa475f7d995eddf0cd01
5
5
  SHA512:
6
- metadata.gz: a820cae8aabbb4ba0a875fbc1658fc89b1dfcd934f7f9597e76404be6703980d443913793b2789c8ad8cb854ea614be826b7161cde5c9b1dd7b6aef491231832
7
- data.tar.gz: d6e94eb60260aac40acd7fab52c94730d1b0fa411d582744e08f566fccac88af713925c3053099cd7c94a2f009f80f8d965851c88e3baf86dd0422cf99af6e83
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)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ShopifyTransporter
3
- VERSION = '2.5.1'
3
+ VERSION = '2.5.2'
4
4
  end
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.1
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-13 00:00:00.000000000 Z
11
+ date: 2018-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler