compactor 0.3.8 → 0.3.11
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -3
- data/LICENSE.txt +22 -0
- data/Rakefile +1 -1
- data/compactor.gemspec +26 -25
- data/lib/compactor/scraper.rb +22 -16
- data/lib/compactor/version.rb +1 -1
- data/test/scraper_test.rb +28 -41
- data/test/test_helper.rb +1 -1
- metadata +203 -213
- data/Gemfile.lock +0 -51
data/.gitignore
CHANGED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Andrew Katz
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
data/compactor.gemspec
CHANGED
@@ -1,33 +1,34 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'compactor/version'
|
4
5
|
|
5
|
-
Gem::Specification.new do |
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "compactor"
|
8
|
+
spec.version = Compactor::VERSION
|
9
|
+
spec.authors = ["Julio Santos"]
|
10
|
+
spec.email = ["julio@morgane.com"]
|
11
|
+
spec.homepage = ""
|
12
|
+
spec.license = "MIT"
|
13
|
+
spec.summary = "Scrape Amazon Seller Central"
|
14
|
+
spec.description = "Scrape Amazon Seller Central"
|
13
15
|
|
14
|
-
|
16
|
+
spec.files = `git ls-files`.split("\n")
|
17
|
+
spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
spec.require_paths = ["lib"]
|
15
20
|
|
16
|
-
|
17
|
-
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
-
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
-
gem.require_paths = ["lib"]
|
20
|
-
|
21
|
-
gem.add_runtime_dependency "mechanize", "2.4"
|
21
|
+
spec.add_runtime_dependency "mechanize", "2.4"
|
22
22
|
|
23
23
|
if RUBY_PLATFORM == "java"
|
24
|
-
|
25
|
-
|
24
|
+
spec.add_runtime_dependency "jruby-openssl", '0.7.3'
|
25
|
+
spec.add_runtime_dependency "nokogiri", ">= 1.5.0", "< 1.5.3"
|
26
26
|
end
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
spec.add_development_dependency "rake"
|
29
|
+
spec.add_development_dependency "mocha", "0.12.1"
|
30
|
+
spec.add_development_dependency "vcr", "~>2.0.0"
|
31
|
+
spec.add_development_dependency "fakeweb"
|
32
|
+
spec.add_development_dependency "rcov", "0.9.11"
|
33
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
33
34
|
end
|
data/lib/compactor/scraper.rb
CHANGED
@@ -2,18 +2,19 @@
|
|
2
2
|
|
3
3
|
module Compactor
|
4
4
|
module Amazon
|
5
|
-
class AddressParseFailure
|
6
|
-
class AuthenticationError
|
7
|
-
class LockedAccountError
|
8
|
-
class LoginFormNotFoundError
|
9
|
-
class MissingReportButtons
|
10
|
-
class MissingRow
|
11
|
-
class
|
12
|
-
class
|
13
|
-
class
|
14
|
-
class
|
15
|
-
class
|
16
|
-
class
|
5
|
+
class AddressParseFailure < StandardError; end
|
6
|
+
class AuthenticationError < StandardError; end
|
7
|
+
class LockedAccountError < StandardError; end
|
8
|
+
class LoginFormNotFoundError < StandardError; end
|
9
|
+
class MissingReportButtons < StandardError; end
|
10
|
+
class MissingRow < StandardError; end
|
11
|
+
class MissingMarketplaceError < StandardError; end
|
12
|
+
class MissingXmlReport < StandardError; end
|
13
|
+
class NoMarketplacesError < StandardError; end
|
14
|
+
class NotProAccountError < StandardError; end
|
15
|
+
class ReportLoadingTimeout < StandardError; end
|
16
|
+
class ReportTotalsMismatch < StandardError; end
|
17
|
+
class UnknownReportType < StandardError; end
|
17
18
|
|
18
19
|
ATTEMPTS_BEFORE_GIVING_UP = 15 # give up after 20 minutes
|
19
20
|
MARKETPLACE_HOMEPAGE = "https://sellercentral.amazon.com/gp/homepage.html"
|
@@ -33,7 +34,10 @@ module Compactor
|
|
33
34
|
end
|
34
35
|
|
35
36
|
def marketplaces
|
36
|
-
marketplaces =
|
37
|
+
marketplaces = wait_for_element { get_marketplaces }
|
38
|
+
raise MissingMarketplaceError if marketplaces.blank?
|
39
|
+
|
40
|
+
marketplaces = filter_marketplaces(marketplaces)
|
37
41
|
raise NoMarketplacesError if marketplaces.empty?
|
38
42
|
|
39
43
|
marketplaces.map do |account_name, marketplace_id|
|
@@ -327,12 +331,14 @@ module Compactor
|
|
327
331
|
end
|
328
332
|
|
329
333
|
def login_to_seller_central(email, password)
|
330
|
-
|
334
|
+
email_field_exists = wait_for_element do
|
331
335
|
@mechanize.get MARKETPLACE_HOMEPAGE
|
332
|
-
@mechanize.page.forms.first
|
336
|
+
first_form = @mechanize.page.forms.first
|
337
|
+
!first_form["email"].nil?
|
333
338
|
end
|
334
|
-
raise Compactor::Amazon::LoginFormNotFoundError
|
339
|
+
raise Compactor::Amazon::LoginFormNotFoundError unless email_field_exists
|
335
340
|
|
341
|
+
form = @mechanize.page.forms.first
|
336
342
|
form.email = email
|
337
343
|
form.password = password
|
338
344
|
form.submit
|
data/lib/compactor/version.rb
CHANGED
data/test/scraper_test.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/test_helper'
|
2
|
-
require 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
|
@@ -29,8 +29,8 @@ class ScraperTest < Test::Unit::TestCase
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def test_should_raise_error_if_cannot_find_login_form
|
32
|
-
Mechanize::
|
33
|
-
Compactor::Amazon::ReportScraper.any_instance.stubs(:
|
32
|
+
Mechanize::Form.any_instance.expects(:[]).with("email").returns(nil)
|
33
|
+
Compactor::Amazon::ReportScraper.any_instance.stubs(:default_number_of_attempts).returns(1)
|
34
34
|
VCR.use_cassette("AmazonReportScraper/with_good_login/find_reports/reports_to_request") do
|
35
35
|
assert_raises Compactor::Amazon::LoginFormNotFoundError do
|
36
36
|
Compactor::Amazon::ReportScraper.new(:email => "far@far.away", :password => "test")
|
@@ -38,18 +38,6 @@ class ScraperTest < Test::Unit::TestCase
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
def test_should_still_get_forms_if_first_time_fails
|
42
|
-
Compactor::Amazon::ReportScraper.any_instance.stubs(:agent).returns(MockMechanize.new)
|
43
|
-
Compactor::Amazon::ReportScraper.any_instance.stubs(:default_number_of_attempts).returns(2)
|
44
|
-
Compactor::Amazon::ReportScraper.any_instance.stubs(:bad_login?).returns(false)
|
45
|
-
Compactor::Amazon::ReportScraper.any_instance.stubs(:locked_account?).returns(false)
|
46
|
-
VCR.use_cassette("AmazonReportScraper/with_good_login/find_reports/reports_to_request") do
|
47
|
-
assert_nothing_raised do
|
48
|
-
Compactor::Amazon::ReportScraper.new(:email => "far@far.away", :password => "test")
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
41
|
def test_should_raise_error_with_bad_login
|
54
42
|
VCR.use_cassette("AmazonReportScraper/with_bad_login/raise_error") do
|
55
43
|
assert_raises Compactor::Amazon::AuthenticationError do
|
@@ -178,6 +166,30 @@ class ScraperTest < Test::Unit::TestCase
|
|
178
166
|
end
|
179
167
|
end
|
180
168
|
|
169
|
+
def test_should_raise_error_if_no_market_places_found
|
170
|
+
VCR.use_cassette("AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces") do
|
171
|
+
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)
|
174
|
+
Compactor::Amazon::ReportScraper.any_instance.stubs(:default_number_of_attempts).returns(1)
|
175
|
+
|
176
|
+
assert_raises Compactor::Amazon::MissingMarketplaceError do
|
177
|
+
scraper.marketplaces
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
def test_should_raise_an_error_if_correct_marketplaces_not_found
|
183
|
+
VCR.use_cassette("AmazonReportScraper/with_good_login/with_single_marketplaces/get_marketplaces") do
|
184
|
+
scraper = Compactor::Amazon::ReportScraper.new(:email => "far@far.away", :password => "test")
|
185
|
+
scraper.stubs(:get_marketplaces).returns([["www.ballertron.com", nil]])
|
186
|
+
|
187
|
+
assert_raises Compactor::Amazon::NoMarketplacesError do
|
188
|
+
scraper.marketplaces
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
181
193
|
def test_should_list_marketplaces_if_single
|
182
194
|
VCR.use_cassette("AmazonReportScraper/with_good_login/with_single_marketplaces/get_marketplaces") do
|
183
195
|
scraper = Compactor::Amazon::ReportScraper.new(:email => "far@far.away", :password => "test")
|
@@ -231,29 +243,4 @@ class ScraperTest < Test::Unit::TestCase
|
|
231
243
|
end
|
232
244
|
end
|
233
245
|
end
|
234
|
-
|
235
|
-
class MockMechanize < Mechanize
|
236
|
-
def get(url)
|
237
|
-
def get(url)
|
238
|
-
@page = MockMechanizePageWithForms.new # other times
|
239
|
-
end
|
240
|
-
@page = MockMechanizePageWithNoForms.new # first time
|
241
|
-
end
|
242
|
-
|
243
|
-
def page
|
244
|
-
@page
|
245
|
-
end
|
246
|
-
|
247
|
-
class MockMechanizePageWithForms
|
248
|
-
def forms
|
249
|
-
[OpenStruct.new(:email => nil, :password => nil, :submit => nil), OpenStruct.new(:email => nil, :password => nil, :submit => nil)]
|
250
|
-
end
|
251
|
-
end
|
252
|
-
|
253
|
-
class MockMechanizePageWithNoForms
|
254
|
-
def forms
|
255
|
-
[]
|
256
|
-
end
|
257
|
-
end
|
258
|
-
end
|
259
246
|
end
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,228 +1,218 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: compactor
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 3
|
8
|
-
- 8
|
9
|
-
version: 0.3.8
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.11
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
12
|
-
|
7
|
+
authors:
|
8
|
+
- Julio Santos
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
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
|
-
- 11
|
131
|
-
version: 0.9.11
|
132
|
-
type: :development
|
133
|
-
version_requirements: *id008
|
12
|
+
date: 2013-04-23 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: mechanize
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - '='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.4'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - '='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.4'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: mocha
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - '='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.12.1
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.12.1
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: vcr
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 2.0.0
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 2.0.0
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: fakeweb
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rcov
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - '='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 0.9.11
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - '='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 0.9.11
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: bundler
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
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
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '1.3'
|
134
126
|
description: Scrape Amazon Seller Central
|
135
|
-
email:
|
136
|
-
|
127
|
+
email:
|
128
|
+
- julio@morgane.com
|
137
129
|
executables: []
|
138
|
-
|
139
130
|
extensions: []
|
140
|
-
|
141
131
|
extra_rdoc_files: []
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
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
|
-
licenses: []
|
181
|
-
|
132
|
+
files:
|
133
|
+
- .gitignore
|
134
|
+
- .travis.yml
|
135
|
+
- Gemfile
|
136
|
+
- LICENSE
|
137
|
+
- LICENSE.txt
|
138
|
+
- README.md
|
139
|
+
- Rakefile
|
140
|
+
- compactor.gemspec
|
141
|
+
- lib/compactor.rb
|
142
|
+
- lib/compactor/extensions.rb
|
143
|
+
- lib/compactor/scraped_row.rb
|
144
|
+
- lib/compactor/scraper.rb
|
145
|
+
- lib/compactor/version.rb
|
146
|
+
- lib/compactor/xml_parser.rb
|
147
|
+
- test/date_extensions_test.rb
|
148
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_bad_login/raise_error.yml
|
149
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/multiple_pages.yml
|
150
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports.yml
|
151
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports_to_request.yml
|
152
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/reports_to_request.yml
|
153
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_balance.yml
|
154
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders.yml
|
155
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_big.yml
|
156
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_logging.yml
|
157
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_with_po_box.yml
|
158
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/shipping_address_not_starting_with_number.yml
|
159
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/find_reports/reports_to_request.yml
|
160
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces.yml
|
161
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_single_marketplaces/get_marketplaces.yml
|
162
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_locked_account/raise_error.yml
|
163
|
+
- test/mechanize_extensions_test.rb
|
164
|
+
- test/scraped_row_test.rb
|
165
|
+
- test/scraper_test.rb
|
166
|
+
- test/test_helper.rb
|
167
|
+
homepage: ''
|
168
|
+
licenses:
|
169
|
+
- MIT
|
182
170
|
post_install_message:
|
183
171
|
rdoc_options: []
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
requirements:
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
172
|
+
require_paths:
|
173
|
+
- lib
|
174
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
175
|
+
none: false
|
176
|
+
requirements:
|
177
|
+
- - ! '>='
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
segments:
|
181
|
+
- 0
|
182
|
+
hash: -4194534273650347791
|
183
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
|
+
none: false
|
185
|
+
requirements:
|
186
|
+
- - ! '>='
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
segments:
|
190
|
+
- 0
|
191
|
+
hash: -4194534273650347791
|
201
192
|
requirements: []
|
202
|
-
|
203
|
-
|
204
|
-
rubygems_version: 1.3.6
|
193
|
+
rubyforge_project:
|
194
|
+
rubygems_version: 1.8.23
|
205
195
|
signing_key:
|
206
196
|
specification_version: 3
|
207
197
|
summary: Scrape Amazon Seller Central
|
208
|
-
test_files:
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
198
|
+
test_files:
|
199
|
+
- test/date_extensions_test.rb
|
200
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_bad_login/raise_error.yml
|
201
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/multiple_pages.yml
|
202
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports.yml
|
203
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports_to_request.yml
|
204
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/reports_to_request.yml
|
205
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_balance.yml
|
206
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders.yml
|
207
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_big.yml
|
208
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_logging.yml
|
209
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_with_po_box.yml
|
210
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/shipping_address_not_starting_with_number.yml
|
211
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/find_reports/reports_to_request.yml
|
212
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces.yml
|
213
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_single_marketplaces/get_marketplaces.yml
|
214
|
+
- test/fixtures/vcr_cassettes/AmazonReportScraper/with_locked_account/raise_error.yml
|
215
|
+
- test/mechanize_extensions_test.rb
|
216
|
+
- test/scraped_row_test.rb
|
217
|
+
- test/scraper_test.rb
|
218
|
+
- test/test_helper.rb
|
data/Gemfile.lock
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
compactor (0.3.8)
|
5
|
-
jruby-openssl (= 0.7.3)
|
6
|
-
mechanize (= 2.4)
|
7
|
-
nokogiri (>= 1.5.0, < 1.5.3)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: http://rubygems.org/
|
11
|
-
specs:
|
12
|
-
bouncy-castle-java (1.5.0146.1)
|
13
|
-
domain_name (0.5.7)
|
14
|
-
unf (~> 0.0.3)
|
15
|
-
fakeweb (1.3.0)
|
16
|
-
jruby-openssl (0.7.3)
|
17
|
-
bouncy-castle-java
|
18
|
-
mechanize (2.4)
|
19
|
-
domain_name (~> 0.5, >= 0.5.1)
|
20
|
-
mime-types (~> 1.17, >= 1.17.2)
|
21
|
-
net-http-digest_auth (~> 1.1, >= 1.1.1)
|
22
|
-
net-http-persistent (~> 2.5, >= 2.5.2)
|
23
|
-
nokogiri (~> 1.4)
|
24
|
-
ntlm-http (~> 0.1, >= 0.1.1)
|
25
|
-
webrobots (~> 0.0, >= 0.0.9)
|
26
|
-
metaclass (0.0.1)
|
27
|
-
mime-types (1.19)
|
28
|
-
mocha (0.12.1)
|
29
|
-
metaclass (~> 0.0.1)
|
30
|
-
net-http-digest_auth (1.2.1)
|
31
|
-
net-http-persistent (2.8)
|
32
|
-
nokogiri (1.5.2-java)
|
33
|
-
ntlm-http (0.1.1)
|
34
|
-
rake (10.0.2)
|
35
|
-
rcov (0.9.11)
|
36
|
-
rcov (0.9.11-java)
|
37
|
-
unf (0.0.5-java)
|
38
|
-
vcr (2.0.1)
|
39
|
-
webrobots (0.0.13)
|
40
|
-
|
41
|
-
PLATFORMS
|
42
|
-
java
|
43
|
-
ruby
|
44
|
-
|
45
|
-
DEPENDENCIES
|
46
|
-
compactor!
|
47
|
-
fakeweb
|
48
|
-
mocha (= 0.12.1)
|
49
|
-
rake
|
50
|
-
rcov (= 0.9.11)
|
51
|
-
vcr (~> 2.0.0)
|