compactor 0.3.12 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +1 -0
- data/README.md +1 -3
- data/compactor.gemspec +6 -0
- data/lib/compactor/scraper.rb +3 -2
- data/lib/compactor/version.rb +1 -1
- data/test/{date_extensions_test.rb → compactor/date_extensions_test.rb} +1 -1
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_bad_login/raise_error.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/multiple_pages.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports_to_request.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/reports_to_request.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/get_balance.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_big.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_logging.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_with_po_box.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/shipping_address_not_starting_with_number.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/find_reports/reports_to_request.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_good_login/with_single_marketplaces/get_marketplaces.yml +0 -0
- data/test/{fixtures → compactor/fixtures}/vcr_cassettes/AmazonReportScraper/with_locked_account/raise_error.yml +0 -0
- data/test/{mechanize_extensions_test.rb → compactor/mechanize_extensions_test.rb} +1 -1
- data/test/{scraped_row_test.rb → compactor/scraped_row_test.rb} +2 -2
- data/test/{scraper_test.rb → compactor/scraper_test.rb} +54 -12
- data/test/test_helper.rb +7 -1
- metadata +209 -226
checksums.yaml
ADDED
@@ -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
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
|
|
data/compactor.gemspec
CHANGED
@@ -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
|
data/lib/compactor/scraper.rb
CHANGED
@@ -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
|
data/lib/compactor/version.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require File.dirname(__FILE__) + '
|
2
|
-
require File.dirname(__FILE__) + '
|
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__) + '
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '
|
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
|
data/test/test_helper.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
6
|
+
authors:
|
7
|
+
- Julio Santos
|
13
8
|
autorequire:
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
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
|
-
|
140
|
+
email:
|
141
|
+
- julio@morgane.com
|
150
142
|
executables: []
|
151
|
-
|
152
143
|
extensions: []
|
153
|
-
|
154
144
|
extra_rdoc_files: []
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
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
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
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:
|
200
|
+
rubygems_version: 2.0.5
|
218
201
|
signing_key:
|
219
|
-
specification_version:
|
202
|
+
specification_version: 4
|
220
203
|
summary: Scrape Amazon Seller Central
|
221
|
-
test_files:
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
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
|