peddler 0.12.5 → 0.12.7

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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -5
  3. data/lib/mws/fulfillment_inbound_shipment/client.rb +1 -0
  4. data/lib/mws/subscriptions/client.rb +1 -1
  5. data/lib/peddler/client.rb +2 -2
  6. data/lib/peddler/flat_file_response.rb +53 -0
  7. data/lib/peddler/operation.rb +4 -4
  8. data/lib/peddler/response.rb +24 -0
  9. data/lib/peddler/version.rb +1 -1
  10. data/lib/peddler/xml_response.rb +30 -0
  11. data/test/helper.rb +74 -0
  12. data/test/integration/test_cart_information.rb +1 -1
  13. data/test/integration/test_customer_information.rb +1 -1
  14. data/test/integration/test_feeds.rb +1 -1
  15. data/test/integration/test_fulfillment_inbound_shipment.rb +1 -1
  16. data/test/integration/test_fulfillment_inventory.rb +1 -1
  17. data/test/integration/test_fulfillment_outbound_shipment.rb +1 -1
  18. data/test/integration/test_off_amazon_payments.rb +1 -1
  19. data/test/integration/test_orders.rb +1 -1
  20. data/test/integration/test_products.rb +1 -1
  21. data/test/integration/test_recommendations.rb +1 -1
  22. data/test/integration/test_reports.rb +1 -1
  23. data/test/integration/test_sellers.rb +1 -1
  24. data/test/integration/test_subscriptions.rb +1 -1
  25. data/test/integration/test_webstore.rb +1 -1
  26. data/test/unit/mws/test_cart_information_client.rb +2 -2
  27. data/test/unit/mws/test_customer_information_client.rb +2 -2
  28. data/test/unit/mws/test_feeds_client.rb +2 -2
  29. data/test/unit/mws/test_fulfillment_inbound_shipment_client.rb +12 -4
  30. data/test/unit/mws/test_fulfillment_inventory_client.rb +2 -2
  31. data/test/unit/mws/test_fulfillment_outbound_shipment_client.rb +2 -2
  32. data/test/unit/mws/test_off_amazon_payments_client.rb +1 -1
  33. data/test/unit/mws/test_orders_client.rb +2 -2
  34. data/test/unit/mws/test_products_client.rb +156 -7
  35. data/test/unit/mws/test_recommendations_client.rb +2 -2
  36. data/test/unit/mws/test_reports_client.rb +187 -4
  37. data/test/unit/mws/test_sellers_client.rb +2 -2
  38. data/test/unit/mws/test_subscriptions_client.rb +291 -4
  39. data/test/unit/mws/test_webstore_client.rb +83 -4
  40. data/test/unit/peddler/test_client.rb +1 -1
  41. data/test/unit/peddler/test_flat_file_parser.rb +1 -1
  42. data/test/unit/peddler/test_marketplace.rb +1 -1
  43. data/test/unit/peddler/test_operation.rb +8 -1
  44. data/test/unit/peddler/test_parser.rb +1 -1
  45. data/test/unit/peddler/test_structured_list.rb +1 -1
  46. data/test/unit/peddler/test_xml_parser.rb +1 -1
  47. data/test/unit/test_mws.rb +2 -2
  48. metadata +7 -6
  49. data/test/integration_test_helper.rb +0 -48
  50. data/test/test_helper.rb +0 -7
@@ -1,7 +1,7 @@
1
- require 'test_helper'
1
+ require 'helper'
2
2
  require 'mws'
3
3
 
4
- class TestMWS < MiniTest::Test
4
+ class Test < MiniTest::Test
5
5
  def test_delegates_to_apis
6
6
  assert_equal MWS.methods(false).size, MWS.constants.size
7
7
  assert_kind_of MWS::Products::Client, MWS.products
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peddler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.5
4
+ version: 0.12.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-20 00:00:00.000000000 Z
11
+ date: 2015-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jeff
@@ -79,12 +79,16 @@ files:
79
79
  - lib/peddler.rb
80
80
  - lib/peddler/client.rb
81
81
  - lib/peddler/flat_file_parser.rb
82
+ - lib/peddler/flat_file_response.rb
82
83
  - lib/peddler/marketplace.rb
83
84
  - lib/peddler/operation.rb
84
85
  - lib/peddler/parser.rb
86
+ - lib/peddler/response.rb
85
87
  - lib/peddler/structured_list.rb
86
88
  - lib/peddler/version.rb
87
89
  - lib/peddler/xml_parser.rb
90
+ - lib/peddler/xml_response.rb
91
+ - test/helper.rb
88
92
  - test/integration/test_cart_information.rb
89
93
  - test/integration/test_customer_information.rb
90
94
  - test/integration/test_feeds.rb
@@ -99,9 +103,7 @@ files:
99
103
  - test/integration/test_sellers.rb
100
104
  - test/integration/test_subscriptions.rb
101
105
  - test/integration/test_webstore.rb
102
- - test/integration_test_helper.rb
103
106
  - test/mws.yml
104
- - test/test_helper.rb
105
107
  - test/unit/mws/test_cart_information_client.rb
106
108
  - test/unit/mws/test_customer_information_client.rb
107
109
  - test/unit/mws/test_feeds_client.rb
@@ -163,6 +165,7 @@ signing_key:
163
165
  specification_version: 4
164
166
  summary: Wraps the Amazon MWS APIs
165
167
  test_files:
168
+ - test/helper.rb
166
169
  - test/integration/test_cart_information.rb
167
170
  - test/integration/test_customer_information.rb
168
171
  - test/integration/test_feeds.rb
@@ -177,9 +180,7 @@ test_files:
177
180
  - test/integration/test_sellers.rb
178
181
  - test/integration/test_subscriptions.rb
179
182
  - test/integration/test_webstore.rb
180
- - test/integration_test_helper.rb
181
183
  - test/mws.yml
182
- - test/test_helper.rb
183
184
  - test/unit/mws/test_cart_information_client.rb
184
185
  - test/unit/mws/test_customer_information_client.rb
185
186
  - test/unit/mws/test_feeds_client.rb
@@ -1,48 +0,0 @@
1
- require 'yaml'
2
- require 'vcr'
3
- require 'test_helper'
4
-
5
- class IntegrationTest < MiniTest::Test
6
- ACCOUNTS = YAML.load_file(File.expand_path('../mws.yml', __FILE__))
7
-
8
- def api_name
9
- self.class.name.match(/Test(.*)/)[1]
10
- end
11
-
12
- def clients
13
- ACCOUNTS.map do |account|
14
- MWS.const_get(api_name).const_get(:Client).new(account)
15
- end
16
- end
17
-
18
- def setup
19
- ENV['LIVE'] ? VCR.turn_off! : VCR.insert_cassette(api_name)
20
- end
21
-
22
- def teardown
23
- VCR.eject_cassette if VCR.turned_on?
24
- end
25
- end
26
-
27
- VCR.configure do |c|
28
- c.hook_into :excon
29
- c.cassette_library_dir = 'test/vcr_cassettes'
30
-
31
- c.before_record do |interaction|
32
- interaction.ignore! if interaction.response.status.code >= 400
33
- end
34
-
35
- matcher = VCR.request_matchers.uri_without_param(
36
- 'AWSAccessKeyId', 'SellerId', 'Signature', 'Timestamp', 'StartDate',
37
- 'CreatedAfter', 'QueryStartDateTime'
38
- )
39
- c.default_cassette_options = {
40
- match_requests_on: [:host, :path, matcher],
41
- record: :none
42
- }
43
-
44
- IntegrationTest::ACCOUNTS.each do |account|
45
- c.filter_sensitive_data('MERCHANT_ID') { account.fetch('merchant_id') }
46
- c.filter_sensitive_data('AWS_ACCESS_KEY_ID') { account.fetch('aws_access_key_id') }
47
- end
48
- end
data/test/test_helper.rb DELETED
@@ -1,7 +0,0 @@
1
- require 'coveralls'
2
- Coveralls.wear!
3
- require 'minitest/autorun'
4
- begin
5
- require 'pry'
6
- rescue LoadError
7
- end