active_fulfillment 3.0.0.pre2 → 3.0.0.pre3

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
  SHA1:
3
- metadata.gz: 7731ece9da5575406a9426a3224c057a7ad8d5bc
4
- data.tar.gz: d9ae056d89696bf9329b99e20ba75aadcba1ff88
3
+ metadata.gz: 6d45dc280f777d4353c5ac75310d2d797e418430
4
+ data.tar.gz: ffb69cd6def6034c48906a9cc7621be44e788185
5
5
  SHA512:
6
- metadata.gz: d430e8b4b8572c5f9c223b322ea7dff5234572a4769ea192fc1d6615c265a54913e5c2a451ab4e190bc377fcd0b9ba767d6accaf772d010328d269359e2f5dd0
7
- data.tar.gz: 3af6f439439687ce84f596108fe1cbe79d71f4d23a32ff26f523a854d7af0f0e943871610f8e4a41412a8d3a52ac54944d033e9a05228bbe9020797df346d3a5
6
+ metadata.gz: 9bf1e4dd980b394918d515bbe8ca11e142b544cda990e0f8c89501bb81d8a6b6a736c1dca95921da98a2eb0d86fe3be322b2d26e43ff23c67aefcf1bac8efe85
7
+ data.tar.gz: 81ba7cee54bd6844018dcd5ce5313bf52a572d6cbce202fcfc5f19067a95534e75c5551a8ceff1f9e1b40265f472f4cbd05c8b96a1d3bb7fae1ac5fecfe0557f
@@ -421,7 +421,7 @@ module ActiveFulfillment
421
421
  def build_address(address)
422
422
  requires!(address, :name, :address1, :city, :country, :zip)
423
423
  address[:state] ||= "N/A"
424
- address[:zip].upcase!
424
+ address[:zip].upcase! if address[:zip]
425
425
  address[:name] = "#{address[:company]} - #{address[:name]}" if address[:company].present?
426
426
  address[:name] = address[:name][0...50] if address[:name].present?
427
427
  ary = address.map{ |key, value| [LOOKUPS[:destination_address][key], value] if LOOKUPS[:destination_address].include?(key) && value.present? }
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module ActiveFulfillment
3
- VERSION = "3.0.0.pre2"
3
+ VERSION = "3.0.0.pre3"
4
4
  end
@@ -154,6 +154,20 @@ class AmazonMarketplaceWebServiceTest < Minitest::Test
154
154
  assert_equal expected_items, @service.build_address(@address)
155
155
  end
156
156
 
157
+ def test_build_address_without_zip
158
+ expected_items = {
159
+ "DestinationAddress.Name" => @address[:name],
160
+ "DestinationAddress.Line1" => @address[:address1],
161
+ "DestinationAddress.Line2" => @address[:address2],
162
+ "DestinationAddress.City" => @address[:city],
163
+ "DestinationAddress.StateOrProvinceCode" => @address[:state],
164
+ "DestinationAddress.CountryCode" => @address[:country],
165
+ "DestinationAddress.PhoneNumber" => @address[:phone]
166
+ }
167
+ @address[:zip] = nil
168
+ assert_equal expected_items, @service.build_address(@address)
169
+ end
170
+
157
171
  def test_build_address_attaches_company_name_to_name
158
172
  expected_items = {
159
173
  "DestinationAddress.Name" => "#{@commercial_address[:company]} - #{@commercial_address[:name]}",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_fulfillment
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.pre2
4
+ version: 3.0.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Fauser
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-04 00:00:00.000000000 Z
12
+ date: 2015-08-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport