compactor 0.3.12 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +1 -0
  3. data/README.md +1 -3
  4. data/compactor.gemspec +6 -0
  5. data/lib/compactor/scraper.rb +3 -2
  6. data/lib/compactor/version.rb +1 -1
  7. data/test/{date_extensions_test.rb → compactor/date_extensions_test.rb} +1 -1
  8. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_bad_login/raise_error.yml +0 -0
  9. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/multiple_pages.yml +0 -0
  10. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports.yml +0 -0
  11. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports_to_request.yml +0 -0
  12. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/reports_to_request.yml +0 -0
  13. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/get_balance.yml +0 -0
  14. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders.yml +0 -0
  15. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_big.yml +0 -0
  16. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_logging.yml +0 -0
  17. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_with_po_box.yml +0 -0
  18. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/shipping_address_not_starting_with_number.yml +0 -0
  19. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/find_reports/reports_to_request.yml +0 -0
  20. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces.yml +0 -0
  21. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/with_single_marketplaces/get_marketplaces.yml +0 -0
  22. data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_locked_account/raise_error.yml +0 -0
  23. data/test/{mechanize_extensions_test.rb → compactor/mechanize_extensions_test.rb} +1 -1
  24. data/test/{scraped_row_test.rb → compactor/scraped_row_test.rb} +2 -2
  25. data/test/{scraper_test.rb → compactor/scraper_test.rb} +54 -12
  26. data/test/test_helper.rb +7 -1
  27. metadata +209 -226
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MWM4NjUzN2JmMDJjOTA4NmVlOTZiNmIyMTI3OGI0ZjRjNTgyMGRlMw==
5
+ data.tar.gz: !binary |-
6
+ NTAxZTE5MjM1Mjg5MDc3ZDIxNDVhZDlhMDcxOTA4NTMxOThmYWY2Nw==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ ZmExZWM4ZThiNjVmNzkwNWQyNmJmMzVmZTkxODgzNmYyNWEwNDk1YzVkY2Ew
10
+ N2IyM2RiMzI5ZDkxMjZkZGQ0YWY1NzZjODdlY2IxZGY3NmJlNGNlZTNmNGZj
11
+ YTExZjNmMjFiNDc4Y2U4NDRmNWZlZDZhZjI0OTRkZjNkNGE5YTA=
12
+ data.tar.gz: !binary |-
13
+ Y2QxMWMwMzgxZmFjNWZjZTE0NGVhNDEzZTQzZmM0YmYzZTEzOWY0MzZlNmYw
14
+ N2YwOTkwZTU0NTY0OTJjNzkwNmY3ZjRkMGYwYWJiYmFmODhmN2M5ZTI1YTg2
15
+ MGI2YTY5YmJmYzFmZjI3YTBiNjAzYzA0Yzc3MzMyYzg2ODM0MWI=
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  *.gem
2
2
  *.rbc
3
+ *.swp
3
4
  .bundle
4
5
  .config
5
6
  .yardoc
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Compactor
2
2
 
3
- [![Build Status](https://secure.travis-ci.org/julio/compactor.png)](http://travis-ci.org/julio/compactor)
4
-
5
- [![Gem Version](https://badge.fury.io/rb/compactor.png)](http://badge.fury.io/rb/compactor)
3
+ [![Build Status](https://secure.travis-ci.org/julio/compactor.png)](http://travis-ci.org/julio/compactor) [![Gem Version](https://badge.fury.io/rb/compactor.png)](http://badge.fury.io/rb/compactor) [![Coverage Status](https://coveralls.io/repos/julio/compactor/badge.png?branch=master)](https://coveralls.io/r/julio/compactor)
6
4
 
7
5
  Scrape Amazon Seller Central
8
6
 
@@ -22,6 +22,11 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  if RUBY_PLATFORM == "java"
24
24
  spec.add_dependency "jruby-openssl", '0.7.3'
25
+ else
26
+ spec.add_development_dependency "coveralls"
27
+ end
28
+
29
+ if RUBY_PLATFORM == "java" || RUBY_VERSION == "1.8.7"
25
30
  spec.add_dependency "nokogiri", ">= 1.5.0", "< 1.5.3"
26
31
  end
27
32
 
@@ -31,4 +36,5 @@ Gem::Specification.new do |spec|
31
36
  spec.add_development_dependency "fakeweb"
32
37
  spec.add_development_dependency "rcov", "0.9.11"
33
38
  spec.add_development_dependency "bundler", "~> 1.3"
39
+ spec.add_development_dependency "awesome_print"
34
40
  end
@@ -51,7 +51,7 @@ module Compactor
51
51
  def get_marketplaces
52
52
  @mechanize.get MARKETPLACE_HOMEPAGE
53
53
 
54
- marketplace_selector = @mechanize.page.search("#marketplaceSelect").first
54
+ marketplace_selector = @mechanize.page.search("#marketplaceSelect, #sc-mkt-switcher-select").first
55
55
  if marketplace_selector
56
56
  result = []
57
57
  marketplace_selector.search("option").each do |ele|
@@ -62,7 +62,7 @@ module Compactor
62
62
  return result
63
63
  end
64
64
 
65
- marketplace_name = @mechanize.page.search("#market_switch .merch-site-span")
65
+ marketplace_name = @mechanize.page.search("#market_switch .merch-site-span, #sc-mkt-switcher-form .sc-mkt-switcher-txt")
66
66
  if marketplace_name
67
67
  return [ [ marketplace_name.text.strip, nil ] ]
68
68
  end
@@ -348,6 +348,7 @@ module Compactor
348
348
  end
349
349
 
350
350
  def bad_login?
351
+ !@mechanize.page.parser.css("#message_error").blank? ||
351
352
  !@mechanize.page.parser.css(".messageboxerror").blank? ||
352
353
  @mechanize.page.parser.css('.tiny').text.include?('Sorry, you are not an authorized Seller Central user')
353
354
  end
@@ -1,3 +1,3 @@
1
1
  module Compactor
2
- VERSION = "0.3.12"
2
+ VERSION = "0.4.5"
3
3
  end
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/test_helper'
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
2
 
3
3
  class DateExtensionsTest < Test::Unit::TestCase
4
4
  def test_parse_strings_separated_by_dashes
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/test_helper'
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
2
 
3
3
  class MechanizeExtensionsTest < Test::Unit::TestCase
4
4
  def test_should_raise_exception_if_selector_cannot_be_found
@@ -1,5 +1,5 @@
1
- require File.dirname(__FILE__) + '/test_helper'
2
- require File.dirname(__FILE__) + '/../lib/compactor'
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+ require File.dirname(__FILE__) + '/../../lib/compactor'
3
3
 
4
4
  class ScrapedRowTest < Test::Unit::TestCase
5
5
  def test_should_be_nil_on_reload_if_no_more_table_rows_present
@@ -1,5 +1,5 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/test_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../lib/compactor')
1
+ require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../../lib/compactor')
3
3
 
4
4
  class ScraperTest < Test::Unit::TestCase
5
5
  def setup
@@ -39,7 +39,24 @@ class ScraperTest < Test::Unit::TestCase
39
39
  end
40
40
 
41
41
  def test_should_raise_error_with_bad_login
42
+ ["#message_error", ".messageboxerror"].each do |selector|
43
+ VCR.use_cassette("AmazonReportScraper/with_bad_login/raise_error") do
44
+ message_box = mock
45
+ Nokogiri::HTML::Document.any_instance.stubs(:css).with(selector).returns(message_box)
46
+ assert_raises Compactor::Amazon::AuthenticationError do
47
+ Compactor::Amazon::ReportScraper.new(:email => "bad@email.here", :password => "invalid")
48
+ end
49
+ end
50
+ end
51
+ end
52
+
53
+ def test_should_raise_error_for_unauthorized_seller
42
54
  VCR.use_cassette("AmazonReportScraper/with_bad_login/raise_error") do
55
+ message_box = mock
56
+ message_box.stubs(:text).returns('Sorry, you are not an authorized Seller Central user')
57
+ Nokogiri::HTML::Document.any_instance.stubs(:css).with('.tiny').returns(message_box)
58
+ Nokogiri::HTML::Document.any_instance.stubs(:css).with('#message_error').returns(nil)
59
+ Nokogiri::HTML::Document.any_instance.stubs(:css).with('.messageboxerror').returns(nil)
43
60
  assert_raises Compactor::Amazon::AuthenticationError do
44
61
  Compactor::Amazon::ReportScraper.new(:email => "bad@email.here", :password => "invalid")
45
62
  end
@@ -169,8 +186,8 @@ class ScraperTest < Test::Unit::TestCase
169
186
  def test_should_raise_error_if_no_market_places_found
170
187
  VCR.use_cassette("AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces") do
171
188
  scraper = Compactor::Amazon::ReportScraper.new(:email => "far@far.away", :password => "test")
172
- Mechanize::Page.any_instance.stubs(:search).with("#marketplaceSelect").returns([])
173
- Mechanize::Page.any_instance.stubs(:search).with("#market_switch .merch-site-span").returns(nil)
189
+ Mechanize::Page.any_instance.stubs(:search).with("#marketplaceSelect, #sc-mkt-switcher-select").returns([])
190
+ Mechanize::Page.any_instance.stubs(:search).with("#market_switch .merch-site-span, #sc-mkt-switcher-form .sc-mkt-switcher-txt").returns(nil)
174
191
  Compactor::Amazon::ReportScraper.any_instance.stubs(:default_number_of_attempts).returns(1)
175
192
 
176
193
  assert_raises Compactor::Amazon::MissingMarketplaceError do
@@ -198,6 +215,18 @@ class ScraperTest < Test::Unit::TestCase
198
215
  end
199
216
  end
200
217
 
218
+ def test_should_list_marketplaces_if_single_and_new_site_layout
219
+ VCR.use_cassette("AmazonReportScraper/with_good_login/with_single_marketplaces/get_marketplaces") do
220
+ mkt_switcher = mock
221
+ mkt_switcher.stubs(:text).returns("www.amazon.com")
222
+ scraper = Compactor::Amazon::ReportScraper.new(:email => "far@far.away", :password => "test")
223
+ Mechanize::Page.any_instance.stubs(:search).with("#market_switch .merch-site-span, #sc-mkt-switcher-form .sc-mkt-switcher-txt").returns(mkt_switcher)
224
+ Mechanize::Page.any_instance.stubs(:search).with("#marketplaceSelect, #sc-mkt-switcher-select").returns([])
225
+ expected_marketplaces = [["www.amazon.com", nil]]
226
+ assert_equal expected_marketplaces, scraper.get_marketplaces.sort
227
+ end
228
+ end
229
+
201
230
  def test_should_list_marketplaces_if_several
202
231
  VCR.use_cassette("AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces") do
203
232
  scraper = Compactor::Amazon::ReportScraper.new(:email => "far@far.away", :password => "test")
@@ -206,6 +235,27 @@ class ScraperTest < Test::Unit::TestCase
206
235
  end
207
236
  end
208
237
 
238
+ def test_should_list_marketplaces_if_several_and_new_site_layout
239
+ VCR.use_cassette("AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces") do
240
+ scraper = Compactor::Amazon::ReportScraper.new(:email => "far@far.away", :password => "test")
241
+ mock_selector = mock
242
+ mock_first_selector = mock
243
+ mock_selector.stubs(:first).returns(mock_first_selector)
244
+
245
+ expected_marketplaces = [["Your Checkout Website", "AZ4B0ZS3LGLX"], ["Your Checkout Website (Sandbox)", "A2SMC08ZTYKXKX"], ["www.amazon.com", "ATVPDKIKX0DER"]]
246
+ mock_options = expected_marketplaces.map do |text, value|
247
+ mock_option = mock
248
+ mock_option.stubs(:text).returns(text)
249
+ mock_option.stubs(:[]).with('value').returns(value)
250
+ mock_option
251
+ end
252
+
253
+ mock_first_selector.stubs(:search).with('option').returns(mock_options)
254
+ Mechanize::Page.any_instance.stubs(:search).with("#marketplaceSelect, #sc-mkt-switcher-select").returns(mock_selector)
255
+ assert_equal expected_marketplaces, scraper.get_marketplaces.sort
256
+ end
257
+ end
258
+
209
259
  def test_should_find_reports_for_current_marketplace
210
260
  VCR.use_cassette("AmazonReportScraper/with_good_login/with_multiple_marketplaces/find_reports/reports_to_request") do
211
261
  scraper = Compactor::Amazon::ReportScraper.new(:email => "far@far.away", :password => "test")
@@ -220,14 +270,6 @@ class ScraperTest < Test::Unit::TestCase
220
270
  end
221
271
  end
222
272
 
223
- def test_should_raise_error_with_bad_login
224
- VCR.use_cassette("AmazonReportScraper/with_bad_login/raise_error") do
225
- assert_raises Compactor::Amazon::AuthenticationError do
226
- scraper = Compactor::Amazon::ReportScraper.new(:email => "far@far.away", :password => "test")
227
- end
228
- end
229
- end
230
-
231
273
  def test_should_raise_error_with_no_email_or_password
232
274
  VCR.use_cassette("AmazonReportScraper/with_bad_login/raise_error") do
233
275
  assert_raises Compactor::Amazon::AuthenticationError do
@@ -1,3 +1,8 @@
1
+ unless RUBY_PLATFORM == "java"
2
+ require 'coveralls'
3
+ Coveralls.wear!
4
+ end
5
+
1
6
  require "bundler/setup"
2
7
 
3
8
  require "test/unit"
@@ -5,9 +10,10 @@ require "vcr"
5
10
  require "mechanize"
6
11
  require "compactor"
7
12
  require "mocha"
13
+ require "awesome_print"
8
14
 
9
15
  VCR.configure do |vcr|
10
- vcr.cassette_library_dir = 'test/fixtures/vcr_cassettes'
16
+ vcr.cassette_library_dir = 'test/compactor/fixtures/vcr_cassettes'
11
17
  vcr.hook_into :fakeweb
12
18
  end
13
19
  FakeWeb.allow_net_connect = false
metadata CHANGED
@@ -1,241 +1,224 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: compactor
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 3
8
- - 12
9
- version: 0.3.12
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.5
10
5
  platform: ruby
11
- authors:
12
- - Julio Santos
6
+ authors:
7
+ - Julio Santos
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2013-04-23 00:00:00 -07:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: mechanize
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "="
25
- - !ruby/object:Gem::Version
26
- segments:
27
- - 2
28
- - 4
29
- version: "2.4"
30
- requirement: *id001
31
- prerelease: false
32
- type: :runtime
33
- - !ruby/object:Gem::Dependency
34
- name: jruby-openssl
35
- version_requirements: &id002 !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "="
38
- - !ruby/object:Gem::Version
39
- segments:
40
- - 0
41
- - 7
42
- - 3
43
- version: 0.7.3
44
- requirement: *id002
45
- prerelease: false
46
- type: :runtime
47
- - !ruby/object:Gem::Dependency
48
- name: nokogiri
49
- version_requirements: &id003 !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- segments:
54
- - 1
55
- - 5
56
- - 0
57
- version: 1.5.0
58
- - - <
59
- - !ruby/object:Gem::Version
60
- segments:
61
- - 1
62
- - 5
63
- - 3
64
- version: 1.5.3
65
- requirement: *id003
66
- prerelease: false
67
- type: :runtime
68
- - !ruby/object:Gem::Dependency
69
- name: rake
70
- version_requirements: &id004 !ruby/object:Gem::Requirement
71
- requirements:
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- segments:
75
- - 0
76
- version: "0"
77
- requirement: *id004
78
- prerelease: false
79
- type: :development
80
- - !ruby/object:Gem::Dependency
81
- name: mocha
82
- version_requirements: &id005 !ruby/object:Gem::Requirement
83
- requirements:
84
- - - "="
85
- - !ruby/object:Gem::Version
86
- segments:
87
- - 0
88
- - 12
89
- - 1
90
- version: 0.12.1
91
- requirement: *id005
92
- prerelease: false
93
- type: :development
94
- - !ruby/object:Gem::Dependency
95
- name: vcr
96
- version_requirements: &id006 !ruby/object:Gem::Requirement
97
- requirements:
98
- - - ~>
99
- - !ruby/object:Gem::Version
100
- segments:
101
- - 2
102
- - 0
103
- - 0
104
- version: 2.0.0
105
- requirement: *id006
106
- prerelease: false
107
- type: :development
108
- - !ruby/object:Gem::Dependency
109
- name: fakeweb
110
- version_requirements: &id007 !ruby/object:Gem::Requirement
111
- requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- segments:
115
- - 0
116
- version: "0"
117
- requirement: *id007
118
- prerelease: false
119
- type: :development
120
- - !ruby/object:Gem::Dependency
121
- name: rcov
122
- version_requirements: &id008 !ruby/object:Gem::Requirement
123
- requirements:
124
- - - "="
125
- - !ruby/object:Gem::Version
126
- segments:
127
- - 0
128
- - 9
129
- - 11
130
- version: 0.9.11
131
- requirement: *id008
132
- prerelease: false
133
- type: :development
134
- - !ruby/object:Gem::Dependency
135
- name: bundler
136
- version_requirements: &id009 !ruby/object:Gem::Requirement
137
- requirements:
138
- - - ~>
139
- - !ruby/object:Gem::Version
140
- segments:
141
- - 1
142
- - 3
143
- version: "1.3"
144
- requirement: *id009
145
- prerelease: false
146
- type: :development
11
+ date: 2013-07-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: mechanize
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: '2.4'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: '2.4'
27
+ - !ruby/object:Gem::Dependency
28
+ name: coveralls
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: mocha
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.12.1
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 0.12.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: vcr
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: 2.0.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: 2.0.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: fakeweb
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rcov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '='
102
+ - !ruby/object:Gem::Version
103
+ version: 0.9.11
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 0.9.11
111
+ - !ruby/object:Gem::Dependency
112
+ name: bundler
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: '1.3'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ~>
123
+ - !ruby/object:Gem::Version
124
+ version: '1.3'
125
+ - !ruby/object:Gem::Dependency
126
+ name: awesome_print
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ! '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
147
139
  description: Scrape Amazon Seller Central
148
- email:
149
- - julio@morgane.com
140
+ email:
141
+ - julio@morgane.com
150
142
  executables: []
151
-
152
143
  extensions: []
153
-
154
144
  extra_rdoc_files: []
155
-
156
- files:
157
- - .gitignore
158
- - .travis.yml
159
- - Gemfile
160
- - LICENSE
161
- - LICENSE.txt
162
- - README.md
163
- - Rakefile
164
- - compactor.gemspec
165
- - lib/compactor.rb
166
- - lib/compactor/extensions.rb
167
- - lib/compactor/scraped_row.rb
168
- - lib/compactor/scraper.rb
169
- - lib/compactor/version.rb
170
- - lib/compactor/xml_parser.rb
171
- - test/date_extensions_test.rb
172
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_bad_login/raise_error.yml
173
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/multiple_pages.yml
174
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports.yml
175
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports_to_request.yml
176
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/reports_to_request.yml
177
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_balance.yml
178
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders.yml
179
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_big.yml
180
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_logging.yml
181
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_with_po_box.yml
182
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/shipping_address_not_starting_with_number.yml
183
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/find_reports/reports_to_request.yml
184
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces.yml
185
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_single_marketplaces/get_marketplaces.yml
186
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_locked_account/raise_error.yml
187
- - test/mechanize_extensions_test.rb
188
- - test/scraped_row_test.rb
189
- - test/scraper_test.rb
190
- - test/test_helper.rb
191
- has_rdoc: true
192
- homepage: ""
193
- licenses:
194
- - MIT
145
+ files:
146
+ - .gitignore
147
+ - .travis.yml
148
+ - Gemfile
149
+ - LICENSE
150
+ - LICENSE.txt
151
+ - README.md
152
+ - Rakefile
153
+ - compactor.gemspec
154
+ - lib/compactor.rb
155
+ - lib/compactor/extensions.rb
156
+ - lib/compactor/scraped_row.rb
157
+ - lib/compactor/scraper.rb
158
+ - lib/compactor/version.rb
159
+ - lib/compactor/xml_parser.rb
160
+ - test/compactor/date_extensions_test.rb
161
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_bad_login/raise_error.yml
162
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/multiple_pages.yml
163
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports.yml
164
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports_to_request.yml
165
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/reports_to_request.yml
166
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_balance.yml
167
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders.yml
168
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_big.yml
169
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_logging.yml
170
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_with_po_box.yml
171
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/shipping_address_not_starting_with_number.yml
172
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/find_reports/reports_to_request.yml
173
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces.yml
174
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_single_marketplaces/get_marketplaces.yml
175
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_locked_account/raise_error.yml
176
+ - test/compactor/mechanize_extensions_test.rb
177
+ - test/compactor/scraped_row_test.rb
178
+ - test/compactor/scraper_test.rb
179
+ - test/test_helper.rb
180
+ homepage: ''
181
+ licenses:
182
+ - MIT
183
+ metadata: {}
195
184
  post_install_message:
196
185
  rdoc_options: []
197
-
198
- require_paths:
199
- - lib
200
- required_ruby_version: !ruby/object:Gem::Requirement
201
- requirements:
202
- - - ">="
203
- - !ruby/object:Gem::Version
204
- segments:
205
- - 0
206
- version: "0"
207
- required_rubygems_version: !ruby/object:Gem::Requirement
208
- requirements:
209
- - - ">="
210
- - !ruby/object:Gem::Version
211
- segments:
212
- - 0
213
- version: "0"
186
+ require_paths:
187
+ - lib
188
+ required_ruby_version: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - ! '>='
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
193
+ required_rubygems_version: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
214
198
  requirements: []
215
-
216
199
  rubyforge_project:
217
- rubygems_version: 1.3.6
200
+ rubygems_version: 2.0.5
218
201
  signing_key:
219
- specification_version: 3
202
+ specification_version: 4
220
203
  summary: Scrape Amazon Seller Central
221
- test_files:
222
- - test/date_extensions_test.rb
223
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_bad_login/raise_error.yml
224
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/multiple_pages.yml
225
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports.yml
226
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports_to_request.yml
227
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/reports_to_request.yml
228
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_balance.yml
229
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders.yml
230
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_big.yml
231
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_logging.yml
232
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_with_po_box.yml
233
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/shipping_address_not_starting_with_number.yml
234
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/find_reports/reports_to_request.yml
235
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces.yml
236
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_single_marketplaces/get_marketplaces.yml
237
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_locked_account/raise_error.yml
238
- - test/mechanize_extensions_test.rb
239
- - test/scraped_row_test.rb
240
- - test/scraper_test.rb
241
- - test/test_helper.rb
204
+ test_files:
205
+ - test/compactor/date_extensions_test.rb
206
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_bad_login/raise_error.yml
207
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/multiple_pages.yml
208
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports.yml
209
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports_to_request.yml
210
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/reports_to_request.yml
211
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_balance.yml
212
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders.yml
213
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_big.yml
214
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_logging.yml
215
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_with_po_box.yml
216
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/shipping_address_not_starting_with_number.yml
217
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/find_reports/reports_to_request.yml
218
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces.yml
219
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_single_marketplaces/get_marketplaces.yml
220
+ - test/compactor/fixtures/vcr_cassettes/AmazonReportScraper/with_locked_account/raise_error.yml
221
+ - test/compactor/mechanize_extensions_test.rb
222
+ - test/compactor/scraped_row_test.rb
223
+ - test/compactor/scraper_test.rb
224
+ - test/test_helper.rb