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 CHANGED
@@ -1,4 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
1
9
  coverage
2
- .bundle/
3
- vendor/
4
-
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ vendor
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
@@ -1,4 +1,4 @@
1
- require 'rake'
1
+ require "bundler/gem_tasks"
2
2
  require 'rake/testtask'
3
3
 
4
4
  desc 'Default: run unit tests.'
data/compactor.gemspec CHANGED
@@ -1,33 +1,34 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "compactor/version"
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 |gem|
6
- gem.name = "compactor"
7
- gem.version = Compactor::VERSION
8
- gem.authors = ["Julio Santos"]
9
- gem.email = ["julio@morgane.com"]
10
- gem.homepage = ""
11
- gem.summary = "Scrape Amazon Seller Central"
12
- gem.description = "Scrape Amazon Seller Central"
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
- gem.rubyforge_project = "compactor"
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
- gem.files = `git ls-files`.split("\n")
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
- gem.add_runtime_dependency "jruby-openssl", '0.7.3'
25
- gem.add_runtime_dependency "nokogiri", ">= 1.5.0", "< 1.5.3"
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
- gem.add_development_dependency "rake"
29
- gem.add_development_dependency "mocha", "0.12.1"
30
- gem.add_development_dependency "vcr", "~>2.0.0"
31
- gem.add_development_dependency "fakeweb"
32
- gem.add_development_dependency "rcov", "0.9.11"
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
@@ -2,18 +2,19 @@
2
2
 
3
3
  module Compactor
4
4
  module Amazon
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 MissingXmlReport < StandardError; end
12
- class NoMarketplacesError < StandardError; end
13
- class NotProAccountError < StandardError; end
14
- class ReportLoadingTimeout < StandardError; end
15
- class ReportTotalsMismatch < StandardError; end
16
- class UnknownReportType < StandardError; end
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 = filter_marketplaces(get_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
- form = wait_for_element do
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 if form.blank?
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
@@ -1,3 +1,3 @@
1
1
  module Compactor
2
- VERSION = "0.3.8"
2
+ VERSION = "0.3.11"
3
3
  end
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::Page.any_instance.stubs(:forms).returns([])
33
- Compactor::Amazon::ReportScraper.any_instance.stubs(:wait_for_element).returns(nil)
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
@@ -16,4 +16,4 @@ class Compactor::Amazon::ReportScraper
16
16
  def slowdown_like_a_human(count)
17
17
  # do not slowdown
18
18
  end
19
- end
19
+ end
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
- prerelease: false
5
- segments:
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
- - Julio Santos
7
+ authors:
8
+ - Julio Santos
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2013-04-15 00:00:00 -07:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: mechanize
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 2
29
- - 4
30
- version: "2.4"
31
- type: :runtime
32
- version_requirements: *id001
33
- - !ruby/object:Gem::Dependency
34
- name: jruby-openssl
35
- prerelease: false
36
- requirement: &id002 !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "="
39
- - !ruby/object:Gem::Version
40
- segments:
41
- - 0
42
- - 7
43
- - 3
44
- version: 0.7.3
45
- type: :runtime
46
- version_requirements: *id002
47
- - !ruby/object:Gem::Dependency
48
- name: nokogiri
49
- prerelease: false
50
- requirement: &id003 !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- segments:
55
- - 1
56
- - 5
57
- - 0
58
- version: 1.5.0
59
- - - <
60
- - !ruby/object:Gem::Version
61
- segments:
62
- - 1
63
- - 5
64
- - 3
65
- version: 1.5.3
66
- type: :runtime
67
- version_requirements: *id003
68
- - !ruby/object:Gem::Dependency
69
- name: rake
70
- prerelease: false
71
- requirement: &id004 !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- segments:
76
- - 0
77
- version: "0"
78
- type: :development
79
- version_requirements: *id004
80
- - !ruby/object:Gem::Dependency
81
- name: mocha
82
- prerelease: false
83
- requirement: &id005 !ruby/object:Gem::Requirement
84
- requirements:
85
- - - "="
86
- - !ruby/object:Gem::Version
87
- segments:
88
- - 0
89
- - 12
90
- - 1
91
- version: 0.12.1
92
- type: :development
93
- version_requirements: *id005
94
- - !ruby/object:Gem::Dependency
95
- name: vcr
96
- prerelease: false
97
- requirement: &id006 !ruby/object:Gem::Requirement
98
- requirements:
99
- - - ~>
100
- - !ruby/object:Gem::Version
101
- segments:
102
- - 2
103
- - 0
104
- - 0
105
- version: 2.0.0
106
- type: :development
107
- version_requirements: *id006
108
- - !ruby/object:Gem::Dependency
109
- name: fakeweb
110
- prerelease: false
111
- requirement: &id007 !ruby/object:Gem::Requirement
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- segments:
116
- - 0
117
- version: "0"
118
- type: :development
119
- version_requirements: *id007
120
- - !ruby/object:Gem::Dependency
121
- name: rcov
122
- prerelease: false
123
- requirement: &id008 !ruby/object:Gem::Requirement
124
- requirements:
125
- - - "="
126
- - !ruby/object:Gem::Version
127
- segments:
128
- - 0
129
- - 9
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
- - julio@morgane.com
127
+ email:
128
+ - julio@morgane.com
137
129
  executables: []
138
-
139
130
  extensions: []
140
-
141
131
  extra_rdoc_files: []
142
-
143
- files:
144
- - .gitignore
145
- - .travis.yml
146
- - Gemfile
147
- - Gemfile.lock
148
- - LICENSE
149
- - README.md
150
- - Rakefile
151
- - compactor.gemspec
152
- - lib/compactor.rb
153
- - lib/compactor/extensions.rb
154
- - lib/compactor/scraped_row.rb
155
- - lib/compactor/scraper.rb
156
- - lib/compactor/version.rb
157
- - lib/compactor/xml_parser.rb
158
- - test/date_extensions_test.rb
159
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_bad_login/raise_error.yml
160
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/multiple_pages.yml
161
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports.yml
162
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports_to_request.yml
163
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/reports_to_request.yml
164
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_balance.yml
165
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders.yml
166
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_big.yml
167
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_logging.yml
168
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_with_po_box.yml
169
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/shipping_address_not_starting_with_number.yml
170
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/find_reports/reports_to_request.yml
171
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces.yml
172
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_single_marketplaces/get_marketplaces.yml
173
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_locked_account/raise_error.yml
174
- - test/mechanize_extensions_test.rb
175
- - test/scraped_row_test.rb
176
- - test/scraper_test.rb
177
- - test/test_helper.rb
178
- has_rdoc: true
179
- homepage: ""
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
- require_paths:
186
- - lib
187
- required_ruby_version: !ruby/object:Gem::Requirement
188
- requirements:
189
- - - ">="
190
- - !ruby/object:Gem::Version
191
- segments:
192
- - 0
193
- version: "0"
194
- required_rubygems_version: !ruby/object:Gem::Requirement
195
- requirements:
196
- - - ">="
197
- - !ruby/object:Gem::Version
198
- segments:
199
- - 0
200
- version: "0"
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
- rubyforge_project: compactor
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
- - test/date_extensions_test.rb
210
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_bad_login/raise_error.yml
211
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/multiple_pages.yml
212
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports.yml
213
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/no_reports_to_request.yml
214
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/find_reports/reports_to_request.yml
215
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_balance.yml
216
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders.yml
217
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_big.yml
218
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_logging.yml
219
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/get_orders_with_po_box.yml
220
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/shipping_address_not_starting_with_number.yml
221
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/find_reports/reports_to_request.yml
222
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_multiple_marketplaces/get_marketplaces.yml
223
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_good_login/with_single_marketplaces/get_marketplaces.yml
224
- - test/fixtures/vcr_cassettes/AmazonReportScraper/with_locked_account/raise_error.yml
225
- - test/mechanize_extensions_test.rb
226
- - test/scraped_row_test.rb
227
- - test/scraper_test.rb
228
- - test/test_helper.rb
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)