vacuum 3.4.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +3 -2
- data/lib/vacuum/version.rb +1 -1
- data/test/locales.yml +8 -0
- data/test/unit/test_request.rb +0 -38
- metadata +49 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa1820852b9b98be65a7a8f3a69a65f89a5ac914dff10800bb9524709bb907ea
|
4
|
+
data.tar.gz: 8e1b3d9bbc02807619c48259b22424414dbff2f6c7adbf53eddd1962f7b3c055
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a3b132c7c99a7b0f8878e7febc4bed97adac3c26b94b883f3118251f3bc2f71975fe4a9c48d787e0a75b944993bccc8bad78d7a998a7109d8f303a10b95f3ba
|
7
|
+
data.tar.gz: 81ebb45404ce50a2519691bc4bfd0acc4898732d0f5c1872aac21892435ded6a345d345c0db8d42ab452cc015dcecdcc6ee4ccab2205dc28b08a22b36da38ed9
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Cart Form functionality is not covered by this gem but is a primary focus on [ca
|
|
10
10
|
|
11
11
|
You need to [register first](https://webservices.amazon.com/paapi5/documentation/register-for-pa-api.html) to use the API.
|
12
12
|
|
13
|
-
![vacuum](
|
13
|
+
![vacuum](https://github.com/hakanensari/vacuum/blob/main/images/vacuum.jpg?raw=true)
|
14
14
|
|
15
15
|
## Usage
|
16
16
|
|
@@ -174,6 +174,7 @@ In either case, add actual API credentials to a [`locales.yml`](https://github.c
|
|
174
174
|
## Getting Help
|
175
175
|
|
176
176
|
* Ask specific questions about the API on the [Amazon forum](https://forums.aws.amazon.com/forum.jspa?forumID=9).
|
177
|
-
* Report bugs
|
177
|
+
* Report bugs in [GitHub issues](https://github.com/hakanensari/vacuum/issues).
|
178
|
+
* Discuss potential features in [GitHub Discussions](https://github.com/hakanensari/vacuum/discussions).
|
178
179
|
|
179
180
|
|
data/lib/vacuum/version.rb
CHANGED
data/test/locales.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
- :marketplace: UK
|
2
|
+
:access_key: AKIAJPAXMP45DOQJPHJQ
|
3
|
+
:secret_key: feZKxFjRGLtmEO3JXpmCGdDaCPA7AHiVFBhQ/fkf
|
4
|
+
:partner_tag: adabo08-21
|
5
|
+
- :marketplace: US
|
6
|
+
:access_key: AKIAIWQTVHVWCQA5THXQ
|
7
|
+
:secret_key: VOhSIqIY1wF5selhhJYJGVnIET9k5q0J8QjTX38i
|
8
|
+
:partner_tag: adabo-20
|
data/test/unit/test_request.rb
CHANGED
@@ -13,44 +13,6 @@ module Vacuum
|
|
13
13
|
assert_equal ':keyword argument expects a String', err.message
|
14
14
|
end
|
15
15
|
|
16
|
-
def test_search_resources
|
17
|
-
err = assert_raises(ArgumentError) do
|
18
|
-
api.search_items(
|
19
|
-
keywords: 'Harry Potter',
|
20
|
-
resources: %w[Images.Primary.Large ItemInfo.ExternalIds Offer.Listings.Price]
|
21
|
-
)
|
22
|
-
end
|
23
|
-
|
24
|
-
assert_equal 'There is not such resource: Offer.Listings.Price', err.message
|
25
|
-
end
|
26
|
-
|
27
|
-
def test_get_items_wrong_resource
|
28
|
-
err = assert_raises(ArgumentError) do
|
29
|
-
api.get_items(
|
30
|
-
item_ids: :B07212L4G2,
|
31
|
-
resources: %w[BrowseNodeInfo.BrowseNode.SalesRank]
|
32
|
-
)
|
33
|
-
end
|
34
|
-
|
35
|
-
assert_equal 'There is not such resource: BrowseNodeInfo.BrowseNode.SalesRank', err.message
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_get_variations_wrong_resource
|
39
|
-
err = assert_raises(ArgumentError) do
|
40
|
-
api.get_variations(asin: 'B07212L4G2', resources: %w[BrowseNodeInfo.BrowseNode.SalesRank])
|
41
|
-
end
|
42
|
-
|
43
|
-
assert_equal 'There is not such resource: BrowseNodeInfo.BrowseNode.SalesRank', err.message
|
44
|
-
end
|
45
|
-
|
46
|
-
def test_resource_not_array
|
47
|
-
err = assert_raises(ArgumentError) do
|
48
|
-
api.get_items(item_ids: :B07212L4G2, resources: 'foo')
|
49
|
-
end
|
50
|
-
|
51
|
-
assert_equal ':resources argument expects an Array', err.message
|
52
|
-
end
|
53
|
-
|
54
16
|
def api
|
55
17
|
@api ||= Vacuum::Request.new(marketplace: 'US',
|
56
18
|
access_key: 'key',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vacuum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hakan Ensari
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-05-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sigv4
|
@@ -29,16 +29,22 @@ dependencies:
|
|
29
29
|
name: http
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '4.0'
|
35
|
+
- - "<"
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '6.0'
|
35
38
|
type: :runtime
|
36
39
|
prerelease: false
|
37
40
|
version_requirements: !ruby/object:Gem::Requirement
|
38
41
|
requirements:
|
39
|
-
- - "
|
42
|
+
- - ">="
|
40
43
|
- !ruby/object:Gem::Version
|
41
44
|
version: '4.0'
|
45
|
+
- - "<"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '6.0'
|
42
48
|
- !ruby/object:Gem::Dependency
|
43
49
|
name: minitest
|
44
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,6 +87,34 @@ dependencies:
|
|
81
87
|
- - ">="
|
82
88
|
- !ruby/object:Gem::Version
|
83
89
|
version: '0'
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: rubocop-minitest
|
92
|
+
requirement: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
type: :development
|
98
|
+
prerelease: false
|
99
|
+
version_requirements: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: rubocop-rake
|
106
|
+
requirement: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
type: :development
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
84
118
|
- !ruby/object:Gem::Dependency
|
85
119
|
name: simplecov
|
86
120
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,6 +193,7 @@ files:
|
|
159
193
|
- test/integration/test_requests.rb
|
160
194
|
- test/integration_helper.rb
|
161
195
|
- test/locales.rb
|
196
|
+
- test/locales.yml
|
162
197
|
- test/locales.yml.example
|
163
198
|
- test/unit/test_locale.rb
|
164
199
|
- test/unit/test_operation.rb
|
@@ -176,25 +211,26 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
176
211
|
requirements:
|
177
212
|
- - ">="
|
178
213
|
- !ruby/object:Gem::Version
|
179
|
-
version: '2.
|
214
|
+
version: '2.6'
|
180
215
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
216
|
requirements:
|
182
217
|
- - ">="
|
183
218
|
- !ruby/object:Gem::Version
|
184
219
|
version: '0'
|
185
220
|
requirements: []
|
186
|
-
rubygems_version: 3.
|
221
|
+
rubygems_version: 3.2.15
|
187
222
|
signing_key:
|
188
223
|
specification_version: 4
|
189
224
|
summary: Amazon Product Advertising in Ruby
|
190
225
|
test_files:
|
226
|
+
- test/cassettes/vacuum.yml
|
227
|
+
- test/helper.rb
|
228
|
+
- test/integration/test_requests.rb
|
229
|
+
- test/integration_helper.rb
|
230
|
+
- test/locales.rb
|
231
|
+
- test/locales.yml
|
232
|
+
- test/locales.yml.example
|
233
|
+
- test/unit/test_locale.rb
|
191
234
|
- test/unit/test_operation.rb
|
192
235
|
- test/unit/test_request.rb
|
193
|
-
- test/unit/test_locale.rb
|
194
236
|
- test/unit/test_response.rb
|
195
|
-
- test/helper.rb
|
196
|
-
- test/locales.yml.example
|
197
|
-
- test/cassettes/vacuum.yml
|
198
|
-
- test/locales.rb
|
199
|
-
- test/integration_helper.rb
|
200
|
-
- test/integration/test_requests.rb
|