amazon_seller_central 0.2.11 → 0.2.12
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +7 -3
- data/VERSION +1 -1
- data/amazon_seller_central.gemspec +6 -6
- data/lib/amazon_seller_central/feedback_page.rb +1 -1
- data/lib/amazon_seller_central/mechanizer.rb +11 -4
- metadata +34 -104
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -14,20 +14,24 @@ GEM
|
|
14
14
|
guard-rspec (0.4.0)
|
15
15
|
guard (>= 0.4.0)
|
16
16
|
i18n (0.6.0)
|
17
|
-
jeweler (1.
|
17
|
+
jeweler (1.8.4)
|
18
18
|
bundler (~> 1.0)
|
19
19
|
git (>= 1.2.5)
|
20
20
|
rake
|
21
|
+
rdoc
|
22
|
+
json (1.7.7)
|
21
23
|
libnotify (0.5.6)
|
22
24
|
linecache19 (0.5.12)
|
23
25
|
ruby_core_source (>= 0.1.4)
|
24
26
|
mechanize (1.0.0)
|
25
27
|
nokogiri (>= 1.2.1)
|
26
28
|
nokogiri (1.4.4)
|
27
|
-
rake (0.
|
29
|
+
rake (10.0.4)
|
28
30
|
rb-inotify (0.8.5)
|
29
31
|
ffi (>= 0.5.0)
|
30
32
|
rcov (0.9.9)
|
33
|
+
rdoc (4.0.1)
|
34
|
+
json (~> 1.4)
|
31
35
|
rspec (2.3.0)
|
32
36
|
rspec-core (~> 2.3.0)
|
33
37
|
rspec-expectations (~> 2.3.0)
|
@@ -59,7 +63,7 @@ DEPENDENCIES
|
|
59
63
|
ffi
|
60
64
|
guard
|
61
65
|
guard-rspec
|
62
|
-
jeweler
|
66
|
+
jeweler
|
63
67
|
libnotify
|
64
68
|
mechanize (>= 1.0.0)
|
65
69
|
rb-inotify (>= 0.8.5)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.12
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "amazon_seller_central"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.12"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["optoro"]
|
12
|
-
s.date = "
|
12
|
+
s.date = "2013-05-01"
|
13
13
|
s.description = "This gem is intended to wrap Amazon's SellerCentral pages with a Ruby API. Currently this gem supports accessing buyer feedback only."
|
14
14
|
s.email = "dev@optoro.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -79,7 +79,7 @@ Gem::Specification.new do |s|
|
|
79
79
|
s.homepage = "http://github.com/optoro/amazon_seller_central"
|
80
80
|
s.licenses = ["MIT"]
|
81
81
|
s.require_paths = ["lib"]
|
82
|
-
s.rubygems_version = "1.8.
|
82
|
+
s.rubygems_version = "1.8.10"
|
83
83
|
s.summary = "Ruby API to access Amazon's SellerCentral"
|
84
84
|
|
85
85
|
if s.respond_to? :specification_version then
|
@@ -89,7 +89,7 @@ Gem::Specification.new do |s|
|
|
89
89
|
s.add_runtime_dependency(%q<mechanize>, [">= 1.0.0"])
|
90
90
|
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
91
91
|
s.add_development_dependency(%q<bundler>, [">= 0"])
|
92
|
-
s.add_development_dependency(%q<jeweler>, ["
|
92
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
93
93
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
94
94
|
s.add_development_dependency(%q<yard>, [">= 0"])
|
95
95
|
s.add_development_dependency(%q<guard>, [">= 0"])
|
@@ -104,7 +104,7 @@ Gem::Specification.new do |s|
|
|
104
104
|
s.add_dependency(%q<mechanize>, [">= 1.0.0"])
|
105
105
|
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
106
106
|
s.add_dependency(%q<bundler>, [">= 0"])
|
107
|
-
s.add_dependency(%q<jeweler>, ["
|
107
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
108
108
|
s.add_dependency(%q<rcov>, [">= 0"])
|
109
109
|
s.add_dependency(%q<yard>, [">= 0"])
|
110
110
|
s.add_dependency(%q<guard>, [">= 0"])
|
@@ -120,7 +120,7 @@ Gem::Specification.new do |s|
|
|
120
120
|
s.add_dependency(%q<mechanize>, [">= 1.0.0"])
|
121
121
|
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
122
122
|
s.add_dependency(%q<bundler>, [">= 0"])
|
123
|
-
s.add_dependency(%q<jeweler>, ["
|
123
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
124
124
|
s.add_dependency(%q<rcov>, [">= 0"])
|
125
125
|
s.add_dependency(%q<yard>, [">= 0"])
|
126
126
|
s.add_dependency(%q<guard>, [">= 0"])
|
@@ -51,7 +51,7 @@ module AmazonSellerCentral
|
|
51
51
|
data = row.search('.//td').map(&:text)
|
52
52
|
{
|
53
53
|
:date => parse_amazon_date(data[0]),
|
54
|
-
:rating => data[1].to_i,
|
54
|
+
:rating => data[1].gsub(/[^\d]/,'').to_i,
|
55
55
|
:comments => data[2].gsub(/\n\nRespond$/,''),
|
56
56
|
:arrived_on_time => yes_no_nil(data[3]),
|
57
57
|
:item_as_described => yes_no_nil(data[4]),
|
@@ -25,10 +25,17 @@ module AmazonSellerCentral
|
|
25
25
|
page = agent.get('https://sellercentral.amazon.com/')
|
26
26
|
form = page.form_with(:name => 'signin')
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
begin
|
29
|
+
form['email'] = login_email
|
30
|
+
form['password'] = login_password
|
31
|
+
form.submit
|
32
|
+
last_page.body =~ /Welcome! You are signed in as/
|
33
|
+
rescue
|
34
|
+
File.open("/tmp/seller_central_#{Time.now.to_i}.html","w") do |f|
|
35
|
+
f.write page.body
|
36
|
+
end
|
37
|
+
raise
|
38
|
+
end
|
32
39
|
end
|
33
40
|
|
34
41
|
def follow_link_with(options)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amazon_seller_central
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-05-01 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mechanize
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &14385900 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,15 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 1.0.0
|
24
|
+
version_requirements: *14385900
|
30
25
|
- !ruby/object:Gem::Dependency
|
31
26
|
name: rspec
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
27
|
+
requirement: &14383520 !ruby/object:Gem::Requirement
|
33
28
|
none: false
|
34
29
|
requirements:
|
35
30
|
- - ~>
|
@@ -37,15 +32,10 @@ dependencies:
|
|
37
32
|
version: 2.3.0
|
38
33
|
type: :development
|
39
34
|
prerelease: false
|
40
|
-
version_requirements:
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: 2.3.0
|
35
|
+
version_requirements: *14383520
|
46
36
|
- !ruby/object:Gem::Dependency
|
47
37
|
name: bundler
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirement: &14381800 !ruby/object:Gem::Requirement
|
49
39
|
none: false
|
50
40
|
requirements:
|
51
41
|
- - ! '>='
|
@@ -53,31 +43,21 @@ dependencies:
|
|
53
43
|
version: '0'
|
54
44
|
type: :development
|
55
45
|
prerelease: false
|
56
|
-
version_requirements:
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
46
|
+
version_requirements: *14381800
|
62
47
|
- !ruby/object:Gem::Dependency
|
63
48
|
name: jeweler
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
+
requirement: &14379860 !ruby/object:Gem::Requirement
|
65
50
|
none: false
|
66
51
|
requirements:
|
67
|
-
- -
|
52
|
+
- - ! '>='
|
68
53
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
54
|
+
version: '0'
|
70
55
|
type: :development
|
71
56
|
prerelease: false
|
72
|
-
version_requirements:
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: 1.6.3
|
57
|
+
version_requirements: *14379860
|
78
58
|
- !ruby/object:Gem::Dependency
|
79
59
|
name: rcov
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirement: &14368020 !ruby/object:Gem::Requirement
|
81
61
|
none: false
|
82
62
|
requirements:
|
83
63
|
- - ! '>='
|
@@ -85,15 +65,10 @@ dependencies:
|
|
85
65
|
version: '0'
|
86
66
|
type: :development
|
87
67
|
prerelease: false
|
88
|
-
version_requirements:
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ! '>='
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0'
|
68
|
+
version_requirements: *14368020
|
94
69
|
- !ruby/object:Gem::Dependency
|
95
70
|
name: yard
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirement: &14365780 !ruby/object:Gem::Requirement
|
97
72
|
none: false
|
98
73
|
requirements:
|
99
74
|
- - ! '>='
|
@@ -101,15 +76,10 @@ dependencies:
|
|
101
76
|
version: '0'
|
102
77
|
type: :development
|
103
78
|
prerelease: false
|
104
|
-
version_requirements:
|
105
|
-
none: false
|
106
|
-
requirements:
|
107
|
-
- - ! '>='
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
79
|
+
version_requirements: *14365780
|
110
80
|
- !ruby/object:Gem::Dependency
|
111
81
|
name: guard
|
112
|
-
requirement: !ruby/object:Gem::Requirement
|
82
|
+
requirement: &14364280 !ruby/object:Gem::Requirement
|
113
83
|
none: false
|
114
84
|
requirements:
|
115
85
|
- - ! '>='
|
@@ -117,15 +87,10 @@ dependencies:
|
|
117
87
|
version: '0'
|
118
88
|
type: :development
|
119
89
|
prerelease: false
|
120
|
-
version_requirements:
|
121
|
-
none: false
|
122
|
-
requirements:
|
123
|
-
- - ! '>='
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
version: '0'
|
90
|
+
version_requirements: *14364280
|
126
91
|
- !ruby/object:Gem::Dependency
|
127
92
|
name: guard-rspec
|
128
|
-
requirement: !ruby/object:Gem::Requirement
|
93
|
+
requirement: &14350900 !ruby/object:Gem::Requirement
|
129
94
|
none: false
|
130
95
|
requirements:
|
131
96
|
- - ! '>='
|
@@ -133,15 +98,10 @@ dependencies:
|
|
133
98
|
version: '0'
|
134
99
|
type: :development
|
135
100
|
prerelease: false
|
136
|
-
version_requirements:
|
137
|
-
none: false
|
138
|
-
requirements:
|
139
|
-
- - ! '>='
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: '0'
|
101
|
+
version_requirements: *14350900
|
142
102
|
- !ruby/object:Gem::Dependency
|
143
103
|
name: rb-inotify
|
144
|
-
requirement: !ruby/object:Gem::Requirement
|
104
|
+
requirement: &14348540 !ruby/object:Gem::Requirement
|
145
105
|
none: false
|
146
106
|
requirements:
|
147
107
|
- - ! '>='
|
@@ -149,15 +109,10 @@ dependencies:
|
|
149
109
|
version: 0.8.5
|
150
110
|
type: :development
|
151
111
|
prerelease: false
|
152
|
-
version_requirements:
|
153
|
-
none: false
|
154
|
-
requirements:
|
155
|
-
- - ! '>='
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: 0.8.5
|
112
|
+
version_requirements: *14348540
|
158
113
|
- !ruby/object:Gem::Dependency
|
159
114
|
name: libnotify
|
160
|
-
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirement: &14344860 !ruby/object:Gem::Requirement
|
161
116
|
none: false
|
162
117
|
requirements:
|
163
118
|
- - ! '>='
|
@@ -165,15 +120,10 @@ dependencies:
|
|
165
120
|
version: '0'
|
166
121
|
type: :development
|
167
122
|
prerelease: false
|
168
|
-
version_requirements:
|
169
|
-
none: false
|
170
|
-
requirements:
|
171
|
-
- - ! '>='
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
123
|
+
version_requirements: *14344860
|
174
124
|
- !ruby/object:Gem::Dependency
|
175
125
|
name: ffi
|
176
|
-
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirement: &14325780 !ruby/object:Gem::Requirement
|
177
127
|
none: false
|
178
128
|
requirements:
|
179
129
|
- - ! '>='
|
@@ -181,15 +131,10 @@ dependencies:
|
|
181
131
|
version: '0'
|
182
132
|
type: :development
|
183
133
|
prerelease: false
|
184
|
-
version_requirements:
|
185
|
-
none: false
|
186
|
-
requirements:
|
187
|
-
- - ! '>='
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
version: '0'
|
134
|
+
version_requirements: *14325780
|
190
135
|
- !ruby/object:Gem::Dependency
|
191
136
|
name: faker
|
192
|
-
requirement: !ruby/object:Gem::Requirement
|
137
|
+
requirement: &14320440 !ruby/object:Gem::Requirement
|
193
138
|
none: false
|
194
139
|
requirements:
|
195
140
|
- - ! '>='
|
@@ -197,15 +142,10 @@ dependencies:
|
|
197
142
|
version: '0'
|
198
143
|
type: :development
|
199
144
|
prerelease: false
|
200
|
-
version_requirements:
|
201
|
-
none: false
|
202
|
-
requirements:
|
203
|
-
- - ! '>='
|
204
|
-
- !ruby/object:Gem::Version
|
205
|
-
version: '0'
|
145
|
+
version_requirements: *14320440
|
206
146
|
- !ruby/object:Gem::Dependency
|
207
147
|
name: fakeweb
|
208
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirement: &14317160 !ruby/object:Gem::Requirement
|
209
149
|
none: false
|
210
150
|
requirements:
|
211
151
|
- - ! '>='
|
@@ -213,15 +153,10 @@ dependencies:
|
|
213
153
|
version: '0'
|
214
154
|
type: :development
|
215
155
|
prerelease: false
|
216
|
-
version_requirements:
|
217
|
-
none: false
|
218
|
-
requirements:
|
219
|
-
- - ! '>='
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: '0'
|
156
|
+
version_requirements: *14317160
|
222
157
|
- !ruby/object:Gem::Dependency
|
223
158
|
name: ruby-debug19
|
224
|
-
requirement: !ruby/object:Gem::Requirement
|
159
|
+
requirement: &14314960 !ruby/object:Gem::Requirement
|
225
160
|
none: false
|
226
161
|
requirements:
|
227
162
|
- - ! '>='
|
@@ -229,12 +164,7 @@ dependencies:
|
|
229
164
|
version: '0'
|
230
165
|
type: :development
|
231
166
|
prerelease: false
|
232
|
-
version_requirements:
|
233
|
-
none: false
|
234
|
-
requirements:
|
235
|
-
- - ! '>='
|
236
|
-
- !ruby/object:Gem::Version
|
237
|
-
version: '0'
|
167
|
+
version_requirements: *14314960
|
238
168
|
description: This gem is intended to wrap Amazon's SellerCentral pages with a Ruby
|
239
169
|
API. Currently this gem supports accessing buyer feedback only.
|
240
170
|
email: dev@optoro.com
|
@@ -317,7 +247,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
317
247
|
version: '0'
|
318
248
|
segments:
|
319
249
|
- 0
|
320
|
-
hash:
|
250
|
+
hash: 4298441168075719366
|
321
251
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
322
252
|
none: false
|
323
253
|
requirements:
|
@@ -326,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
326
256
|
version: '0'
|
327
257
|
requirements: []
|
328
258
|
rubyforge_project:
|
329
|
-
rubygems_version: 1.8.
|
259
|
+
rubygems_version: 1.8.10
|
330
260
|
signing_key:
|
331
261
|
specification_version: 3
|
332
262
|
summary: Ruby API to access Amazon's SellerCentral
|