active_fulfillment 2.1.4 → 2.1.5

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: 3e78d96c3678277a63835eac59e71b8369c95800
4
- data.tar.gz: 09b877584715e7d8067a2ea60904dd7d25a77317
3
+ metadata.gz: 7036a3a77c5f7ec83a92fbf8768847ab9416febd
4
+ data.tar.gz: 8f0cd75f70e79221b07bfe3fed644708a24443cc
5
5
  SHA512:
6
- metadata.gz: a9bf642188a80be93b4f1acf0be09cde755686a169de396fa74bc76831bbe60ea416b1b08087e8bebd6ae0335d8b7e1d09eff4c5778edd2131339e513d2f72df
7
- data.tar.gz: f945e59319dd13bfb5d8a071f4a372b802d875de32c3011da016f1fd7c199188b6be9b4a56fad85d959f3c7eada5e2d4c461bcee3ddf265c36f1855014691cca
6
+ metadata.gz: e38504af8b5b1b943e282957298cb55f02876ce6fbd4cfcffe3b7fb8fb6b9f16181ec80256812108a47d4deffca1b996fd13ffc4f38da2dbc8787ccc58b71229
7
+ data.tar.gz: a8a228e30c53641539d85dfd50bb191bfa5d439a2a0a8d042955e4d34274c8faca1e47aaed5ffd5b1ff758c8c079a372b4f4af1503b8b2a69e5cb4a5a4a6dab4
@@ -139,6 +139,8 @@ module ActiveMerchant
139
139
  while token = response.params['next_token'] do
140
140
  next_page = commit :post, :inventory, :list_next, build_next_inventory_list_request(token)
141
141
 
142
+ # if we fail during the stock-level-via-token gathering, fail the whole request
143
+ return next_page if next_page.params['response_status'] != SUCCESS
142
144
  next_page.stock_levels.merge!(response.stock_levels)
143
145
  response = next_page
144
146
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module ActiveMerchant
3
3
  module Fulfillment
4
- VERSION = "2.1.4"
4
+ VERSION = "2.1.5"
5
5
  end
6
6
  end
@@ -237,6 +237,22 @@ class AmazonMarketplaceWebServiceTest < Test::Unit::TestCase
237
237
  assert_equal 5259, response.stock_levels['GN-01-02A']
238
238
  end
239
239
 
240
+ def test_get_inventory_multipage_missing_stock
241
+
242
+ @service.expects(:ssl_post).with() { |uri, query, headers|
243
+ query.include?('ListInventorySupply') && !query.include?('ListInventorySupplyByNextToken')
244
+ }.returns(xml_fixture('amazon_mws/inventory_list_inventory_supply_by_next_token'))
245
+
246
+ # force missing stock by returning token'd ssl_post with a 503 error
247
+ http_response = build_mock_response(response_from_503, "", 503)
248
+ @service.expects(:ssl_post).with() { |uri, query, headers|
249
+ query.include?('ListInventorySupplyByNextToken') && query.include?('NextToken')
250
+ }.raises(ActiveMerchant::ResponseError.new(http_response))
251
+
252
+ response = @service.fetch_stock_levels
253
+ assert !response.success?
254
+ end
255
+
240
256
  def test_get_next_page_builds_query_with_proper_params
241
257
  @service.expects(:build_basic_api_query).with(:NextToken => "abracadabra", :Action => 'ListInventorySupplyByNextToken')
242
258
  @service.send(:build_next_inventory_list_request, "abracadabra")
@@ -383,6 +399,10 @@ traffic.</Text>
383
399
  '<html><head><title>Apache Tomcat</title></head><body>That was not found</body></html>'
384
400
  end
385
401
 
402
+ def response_from_503
403
+ '<html><head><title>Apache</title></head><body>Service Unavailable</body></html>'
404
+ end
405
+
386
406
  def invalid_params_response
387
407
  <<-XML
388
408
  <ErrorResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">
metadata CHANGED
@@ -1,134 +1,112 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_fulfillment
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4
4
+ version: 2.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Fauser
8
8
  - James MacAulay
9
9
  autorequire:
10
10
  bindir: bin
11
- cert_chain:
12
- - |
13
- -----BEGIN CERTIFICATE-----
14
- MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQ8wDQYDVQQDDAZhZG1p
15
- bnMxFzAVBgoJkiaJk/IsZAEZFgdzaG9waWZ5MRMwEQYKCZImiZPyLGQBGRYDY29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R9PPs64heamfn0fp
32
- TConQSX2BnZdhIEYW+cKzEC/bLc=
33
- -----END CERTIFICATE-----
34
- date: 2014-05-27 00:00:00.000000000 Z
11
+ cert_chain: []
12
+ date: 2014-07-08 00:00:00.000000000 Z
35
13
  dependencies:
36
14
  - !ruby/object:Gem::Dependency
37
15
  name: activesupport
38
16
  requirement: !ruby/object:Gem::Requirement
39
17
  requirements:
40
- - - ">="
18
+ - - '>='
41
19
  - !ruby/object:Gem::Version
42
20
  version: 3.2.9
43
21
  type: :runtime
44
22
  prerelease: false
45
23
  version_requirements: !ruby/object:Gem::Requirement
46
24
  requirements:
47
- - - ">="
25
+ - - '>='
48
26
  - !ruby/object:Gem::Version
49
27
  version: 3.2.9
50
28
  - !ruby/object:Gem::Dependency
51
29
  name: builder
52
30
  requirement: !ruby/object:Gem::Requirement
53
31
  requirements:
54
- - - ">="
32
+ - - '>='
55
33
  - !ruby/object:Gem::Version
56
34
  version: 2.0.0
57
35
  type: :runtime
58
36
  prerelease: false
59
37
  version_requirements: !ruby/object:Gem::Requirement
60
38
  requirements:
61
- - - ">="
39
+ - - '>='
62
40
  - !ruby/object:Gem::Version
63
41
  version: 2.0.0
64
42
  - !ruby/object:Gem::Dependency
65
43
  name: active_utils
66
44
  requirement: !ruby/object:Gem::Requirement
67
45
  requirements:
68
- - - "~>"
46
+ - - ~>
69
47
  - !ruby/object:Gem::Version
70
48
  version: 2.2.0
71
49
  type: :runtime
72
50
  prerelease: false
73
51
  version_requirements: !ruby/object:Gem::Requirement
74
52
  requirements:
75
- - - "~>"
53
+ - - ~>
76
54
  - !ruby/object:Gem::Version
77
55
  version: 2.2.0
78
56
  - !ruby/object:Gem::Dependency
79
57
  name: rake
80
58
  requirement: !ruby/object:Gem::Requirement
81
59
  requirements:
82
- - - ">="
60
+ - - '>='
83
61
  - !ruby/object:Gem::Version
84
62
  version: '0'
85
63
  type: :development
86
64
  prerelease: false
87
65
  version_requirements: !ruby/object:Gem::Requirement
88
66
  requirements:
89
- - - ">="
67
+ - - '>='
90
68
  - !ruby/object:Gem::Version
91
69
  version: '0'
92
70
  - !ruby/object:Gem::Dependency
93
71
  name: mocha
94
72
  requirement: !ruby/object:Gem::Requirement
95
73
  requirements:
96
- - - ">="
74
+ - - '>='
97
75
  - !ruby/object:Gem::Version
98
76
  version: '0'
99
77
  type: :development
100
78
  prerelease: false
101
79
  version_requirements: !ruby/object:Gem::Requirement
102
80
  requirements:
103
- - - ">="
81
+ - - '>='
104
82
  - !ruby/object:Gem::Version
105
83
  version: '0'
106
84
  - !ruby/object:Gem::Dependency
107
85
  name: minitest
108
86
  requirement: !ruby/object:Gem::Requirement
109
87
  requirements:
110
- - - ">="
88
+ - - '>='
111
89
  - !ruby/object:Gem::Version
112
90
  version: '0'
113
91
  type: :development
114
92
  prerelease: false
115
93
  version_requirements: !ruby/object:Gem::Requirement
116
94
  requirements:
117
- - - ">="
95
+ - - '>='
118
96
  - !ruby/object:Gem::Version
119
97
  version: '0'
120
98
  - !ruby/object:Gem::Dependency
121
99
  name: rdoc
122
100
  requirement: !ruby/object:Gem::Requirement
123
101
  requirements:
124
- - - ">="
102
+ - - '>='
125
103
  - !ruby/object:Gem::Version
126
104
  version: 2.4.2
127
105
  type: :development
128
106
  prerelease: false
129
107
  version_requirements: !ruby/object:Gem::Requirement
130
108
  requirements:
131
- - - ">="
109
+ - - '>='
132
110
  - !ruby/object:Gem::Version
133
111
  version: 2.4.2
134
112
  description:
@@ -194,56 +172,56 @@ require_paths:
194
172
  - lib
195
173
  required_ruby_version: !ruby/object:Gem::Requirement
196
174
  requirements:
197
- - - ">="
175
+ - - '>='
198
176
  - !ruby/object:Gem::Version
199
177
  version: '0'
200
178
  required_rubygems_version: !ruby/object:Gem::Requirement
201
179
  requirements:
202
- - - ">="
180
+ - - '>='
203
181
  - !ruby/object:Gem::Version
204
182
  version: '0'
205
183
  requirements: []
206
184
  rubyforge_project:
207
- rubygems_version: 2.2.0
185
+ rubygems_version: 2.2.2
208
186
  signing_key:
209
187
  specification_version: 4
210
188
  summary: Framework and tools for dealing with shipping, tracking and order fulfillment
211
189
  services.
212
190
  test_files:
213
- - test/test_helper.rb
214
- - test/remote/amazon_test.rb
215
- - test/remote/webgistix_test.rb
216
- - test/remote/shipwire_test.rb
217
- - test/remote/amazon_mws_test.rb
218
- - test/unit/services/amazon_test.rb
219
- - test/unit/services/webgistix_test.rb
220
- - test/unit/services/shipwire_test.rb
221
- - test/unit/services/amazon_mws_test.rb
222
- - test/unit/base_test.rb
223
- - test/fixtures/xml/webgistix/multiple_tracking_response.xml
224
- - test/fixtures/xml/webgistix/tracking_response.xml
191
+ - test/fixtures/xml/amazon/inventory_get_response.xml
192
+ - test/fixtures/xml/amazon/inventory_list_response.xml
193
+ - test/fixtures/xml/amazon/inventory_list_response_with_next_1.xml
194
+ - test/fixtures/xml/amazon/inventory_list_response_with_next_2.xml
195
+ - test/fixtures/xml/amazon/tracking_response_1.xml
196
+ - test/fixtures/xml/amazon/tracking_response_2.xml
197
+ - test/fixtures/xml/amazon/tracking_response_error.xml
198
+ - test/fixtures/xml/amazon/tracking_response_not_found.xml
199
+ - test/fixtures/xml/amazon_mws/fulfillment_get_fulfillment_order.xml
225
200
  - test/fixtures/xml/amazon_mws/fulfillment_get_fulfillment_order_2.xml
226
- - test/fixtures/xml/amazon_mws/tracking_response_error.xml
227
- - test/fixtures/xml/amazon_mws/inventory_list_inventory_supply_by_next_token.xml
228
- - test/fixtures/xml/amazon_mws/inventory_list_inventory_supply.xml
201
+ - test/fixtures/xml/amazon_mws/fulfillment_get_fullfillment_order_with_multiple_tracking_numbers.xml
229
202
  - test/fixtures/xml/amazon_mws/fulfillment_list_all_fulfillment_orders.xml
230
- - test/fixtures/xml/amazon_mws/tracking_response_not_found.xml
231
- - test/fixtures/xml/amazon_mws/fulfillment_get_fulfillment_order.xml
232
203
  - test/fixtures/xml/amazon_mws/inventory_list_inventory_item_supply.xml
233
- - test/fixtures/xml/amazon_mws/fulfillment_get_fullfillment_order_with_multiple_tracking_numbers.xml
204
+ - test/fixtures/xml/amazon_mws/inventory_list_inventory_supply.xml
205
+ - test/fixtures/xml/amazon_mws/inventory_list_inventory_supply_by_next_token.xml
206
+ - test/fixtures/xml/amazon_mws/tracking_response_error.xml
207
+ - test/fixtures/xml/amazon_mws/tracking_response_not_found.xml
208
+ - test/fixtures/xml/shipwire/fulfillment_failure_response.xml
209
+ - test/fixtures/xml/shipwire/invalid_login_response.xml
234
210
  - test/fixtures/xml/shipwire/inventory_get_response.xml
235
- - test/fixtures/xml/shipwire/successful_tracking_response.xml
236
211
  - test/fixtures/xml/shipwire/successful_empty_tracking_response.xml
237
- - test/fixtures/xml/shipwire/successful_tracking_response_with_tracking_urls.xml
238
212
  - test/fixtures/xml/shipwire/successful_live_tracking_response.xml
239
- - test/fixtures/xml/shipwire/invalid_login_response.xml
240
- - test/fixtures/xml/shipwire/fulfillment_failure_response.xml
241
- - test/fixtures/xml/amazon/inventory_get_response.xml
242
- - test/fixtures/xml/amazon/inventory_list_response_with_next_1.xml
243
- - test/fixtures/xml/amazon/tracking_response_2.xml
244
- - test/fixtures/xml/amazon/tracking_response_error.xml
245
- - test/fixtures/xml/amazon/inventory_list_response.xml
246
- - test/fixtures/xml/amazon/tracking_response_1.xml
247
- - test/fixtures/xml/amazon/inventory_list_response_with_next_2.xml
248
- - test/fixtures/xml/amazon/tracking_response_not_found.xml
213
+ - test/fixtures/xml/shipwire/successful_tracking_response.xml
214
+ - test/fixtures/xml/shipwire/successful_tracking_response_with_tracking_urls.xml
215
+ - test/fixtures/xml/webgistix/multiple_tracking_response.xml
216
+ - test/fixtures/xml/webgistix/tracking_response.xml
249
217
  - test/fixtures.yml
218
+ - test/remote/amazon_mws_test.rb
219
+ - test/remote/amazon_test.rb
220
+ - test/remote/shipwire_test.rb
221
+ - test/remote/webgistix_test.rb
222
+ - test/test_helper.rb
223
+ - test/unit/base_test.rb
224
+ - test/unit/services/amazon_mws_test.rb
225
+ - test/unit/services/amazon_test.rb
226
+ - test/unit/services/shipwire_test.rb
227
+ - test/unit/services/webgistix_test.rb
checksums.yaml.gz.sig DELETED
Binary file
data.tar.gz.sig DELETED
@@ -1,3 +0,0 @@
1
- W.HICq���LrK.E���[
2
- �8ZF�E�m����+;84�:��G�o��k��ި�訛g�Bi��"�f]�m
3
- VP����I�T�^�Y5U �F��J<��?�N>��Ѝz.p95�mh���|V�y���炋�x��{#��a�©կ㋔?��/��4�x�#g��8�V���&���.&��Q>�9�%y�'ͅ��y�z!Frѽջ{��o�j)��7��<���\�����$Ć��!�
metadata.gz.sig DELETED
Binary file