sucker 1.2.0 → 1.3.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/LICENSE +1 -1
  2. data/README.md +45 -20
  3. data/lib/sucker/parameters.rb +11 -7
  4. data/lib/sucker/parameters.rbc +723 -0
  5. data/lib/sucker/request.rb +52 -154
  6. data/lib/sucker/request.rbc +2719 -0
  7. data/lib/sucker/response.rb +14 -36
  8. data/lib/sucker/response.rbc +1307 -0
  9. data/lib/sucker/version.rb +3 -1
  10. data/lib/sucker/version.rbc +130 -0
  11. data/lib/sucker.rb +4 -2
  12. data/lib/sucker.rbc +286 -0
  13. data/spec/fixtures/cassette_library/0394751221.yml +26 -0
  14. data/spec/fixtures/cassette_library/0415246334.yml +26 -0
  15. data/spec/fixtures/cassette_library/0679753354.yml +26 -0
  16. data/spec/fixtures/cassette_library/0816614024-0007218095.yml +26 -0
  17. data/spec/fixtures/cassette_library/0816614024-0143105825.yml +26 -0
  18. data/spec/fixtures/cassette_library/0816614024.yml +26 -0
  19. data/spec/fixtures/cassette_library/482224816x.yml +26 -0
  20. data/spec/fixtures/cassette_library/816614024.yml +151 -0
  21. data/spec/fixtures/cassette_library/a2h6nh4sqyfz4m.yml +26 -0
  22. data/spec/fixtures/cassette_library/a2jyso6w6kep83.yml +26 -0
  23. data/spec/fixtures/cassette_library/author-lacan-or-deleuze-and-not-fiction.yml +26 -0
  24. data/spec/fixtures/cassette_library/b000aspues.yml +26 -0
  25. data/spec/fixtures/cassette_library/deleuze-binding-kindle.yml +26 -0
  26. data/spec/fixtures/cassette_library/deleuze.yml +26 -0
  27. data/spec/fixtures/cassette_library/george-orwell.yml +26 -0
  28. data/spec/fixtures/cassette_library/spec/sucker/request.yml +4 -4
  29. data/spec/fixtures/cassette_library/spec/sucker/response.yml +3 -3
  30. data/spec/spec_helper.rbc +230 -0
  31. data/spec/sucker/parameters_spec.rbc +1476 -0
  32. data/spec/sucker/request_spec.rb +34 -217
  33. data/spec/sucker/request_spec.rbc +2473 -0
  34. data/spec/sucker/response_spec.rb +46 -95
  35. data/spec/sucker/response_spec.rbc +2854 -0
  36. data/spec/sucker_spec.rbc +287 -0
  37. data/spec/support/amazon_credentials.rbc +154 -0
  38. data/spec/support/asins.rbc +335 -0
  39. data/spec/support/vcr.rbc +356 -0
  40. metadata +72 -96
  41. data/CHANGELOG.md +0 -47
@@ -0,0 +1,356 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 29
13
+ 5
14
+ 7
15
+ 0
16
+ 64
17
+ 47
18
+ 49
19
+ 1
20
+ 1
21
+ 15
22
+ 45
23
+ 2
24
+ 3
25
+ 56
26
+ 4
27
+ 50
28
+ 5
29
+ 0
30
+ 15
31
+ 45
32
+ 6
33
+ 7
34
+ 56
35
+ 8
36
+ 50
37
+ 9
38
+ 0
39
+ 15
40
+ 2
41
+ 11
42
+ I
43
+ 2
44
+ I
45
+ 0
46
+ I
47
+ 0
48
+ I
49
+ 0
50
+ n
51
+ p
52
+ 10
53
+ s
54
+ 3
55
+ vcr
56
+ x
57
+ 7
58
+ require
59
+ x
60
+ 3
61
+ VCR
62
+ n
63
+ M
64
+ 1
65
+ p
66
+ 2
67
+ x
68
+ 9
69
+ for_block
70
+ t
71
+ n
72
+ x
73
+ 9
74
+ __block__
75
+ i
76
+ 74
77
+ 57
78
+ 19
79
+ 0
80
+ 15
81
+ 20
82
+ 0
83
+ 45
84
+ 0
85
+ 1
86
+ 65
87
+ 49
88
+ 2
89
+ 0
90
+ 49
91
+ 3
92
+ 1
93
+ 7
94
+ 4
95
+ 64
96
+ 81
97
+ 5
98
+ 13
99
+ 18
100
+ 2
101
+ 49
102
+ 6
103
+ 1
104
+ 15
105
+ 15
106
+ 20
107
+ 0
108
+ 44
109
+ 43
110
+ 7
111
+ 80
112
+ 49
113
+ 8
114
+ 1
115
+ 13
116
+ 7
117
+ 9
118
+ 7
119
+ 10
120
+ 49
121
+ 11
122
+ 2
123
+ 15
124
+ 13
125
+ 7
126
+ 12
127
+ 7
128
+ 13
129
+ 35
130
+ 1
131
+ 49
132
+ 11
133
+ 2
134
+ 15
135
+ 13
136
+ 18
137
+ 2
138
+ 49
139
+ 14
140
+ 1
141
+ 15
142
+ 15
143
+ 20
144
+ 0
145
+ 7
146
+ 15
147
+ 49
148
+ 16
149
+ 1
150
+ 11
151
+ I
152
+ 7
153
+ I
154
+ 1
155
+ I
156
+ 1
157
+ I
158
+ 1
159
+ n
160
+ p
161
+ 17
162
+ x
163
+ 4
164
+ File
165
+ n
166
+ x
167
+ 11
168
+ active_path
169
+ x
170
+ 7
171
+ dirname
172
+ s
173
+ 29
174
+ /../fixtures/cassette_library
175
+ x
176
+ 1
177
+ +
178
+ x
179
+ 21
180
+ cassette_library_dir=
181
+ x
182
+ 4
183
+ Hash
184
+ x
185
+ 16
186
+ new_from_literal
187
+ x
188
+ 6
189
+ record
190
+ x
191
+ 4
192
+ none
193
+ x
194
+ 3
195
+ []=
196
+ x
197
+ 17
198
+ match_requests_on
199
+ x
200
+ 4
201
+ host
202
+ x
203
+ 25
204
+ default_cassette_options=
205
+ x
206
+ 7
207
+ webmock
208
+ x
209
+ 9
210
+ stub_with
211
+ p
212
+ 15
213
+ I
214
+ 0
215
+ I
216
+ 3
217
+ I
218
+ 4
219
+ I
220
+ 4
221
+ I
222
+ 1d
223
+ I
224
+ 5
225
+ I
226
+ 1f
227
+ I
228
+ 7
229
+ I
230
+ 27
231
+ I
232
+ 6
233
+ I
234
+ 30
235
+ I
236
+ 7
237
+ I
238
+ 42
239
+ I
240
+ 8
241
+ I
242
+ 4a
243
+ x
244
+ 50
245
+ /Users/hakanensari/code/sucker/spec/support/vcr.rb
246
+ p
247
+ 1
248
+ x
249
+ 1
250
+ c
251
+ x
252
+ 6
253
+ config
254
+ x
255
+ 5
256
+ RSpec
257
+ n
258
+ M
259
+ 1
260
+ p
261
+ 2
262
+ x
263
+ 9
264
+ for_block
265
+ t
266
+ n
267
+ x
268
+ 9
269
+ __block__
270
+ i
271
+ 17
272
+ 57
273
+ 19
274
+ 0
275
+ 15
276
+ 20
277
+ 0
278
+ 45
279
+ 0
280
+ 1
281
+ 43
282
+ 2
283
+ 43
284
+ 3
285
+ 49
286
+ 4
287
+ 1
288
+ 11
289
+ I
290
+ 4
291
+ I
292
+ 1
293
+ I
294
+ 1
295
+ I
296
+ 1
297
+ n
298
+ p
299
+ 5
300
+ x
301
+ 3
302
+ VCR
303
+ n
304
+ x
305
+ 5
306
+ RSpec
307
+ x
308
+ 6
309
+ Macros
310
+ x
311
+ 6
312
+ extend
313
+ p
314
+ 5
315
+ I
316
+ 0
317
+ I
318
+ b
319
+ I
320
+ 4
321
+ I
322
+ c
323
+ I
324
+ 11
325
+ x
326
+ 50
327
+ /Users/hakanensari/code/sucker/spec/support/vcr.rb
328
+ p
329
+ 1
330
+ x
331
+ 6
332
+ config
333
+ x
334
+ 9
335
+ configure
336
+ p
337
+ 7
338
+ I
339
+ 0
340
+ I
341
+ 1
342
+ I
343
+ 9
344
+ I
345
+ 3
346
+ I
347
+ 12
348
+ I
349
+ b
350
+ I
351
+ 1d
352
+ x
353
+ 50
354
+ /Users/hakanensari/code/sucker/spec/support/vcr.rb
355
+ p
356
+ 0
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sucker
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 2
8
- - 0
9
- version: 1.2.0
4
+ prerelease: 6
5
+ version: 1.3.0.pre
10
6
  platform: ruby
11
7
  authors:
12
8
  - Paper Cavalier
@@ -14,7 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-01-17 00:00:00 +00:00
13
+ date: 2011-02-17 00:00:00 +00:00
18
14
  default_executable:
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
@@ -23,13 +19,9 @@ dependencies:
23
19
  requirement: &id001 !ruby/object:Gem::Requirement
24
20
  none: false
25
21
  requirements:
26
- - - ">="
22
+ - - ~>
27
23
  - !ruby/object:Gem::Version
28
- segments:
29
- - 2
30
- - 3
31
- - 2
32
- version: 2.3.2
24
+ version: 3.0.0
33
25
  type: :runtime
34
26
  version_requirements: *id001
35
27
  - !ruby/object:Gem::Dependency
@@ -40,10 +32,6 @@ dependencies:
40
32
  requirements:
41
33
  - - ~>
42
34
  - !ruby/object:Gem::Version
43
- segments:
44
- - 0
45
- - 5
46
- - 0
47
35
  version: 0.5.0
48
36
  type: :runtime
49
37
  version_requirements: *id002
@@ -55,133 +43,75 @@ dependencies:
55
43
  requirements:
56
44
  - - ~>
57
45
  - !ruby/object:Gem::Version
58
- segments:
59
- - 1
60
- - 4
61
- - 0
62
46
  version: 1.4.0
63
47
  type: :runtime
64
48
  version_requirements: *id003
65
49
  - !ruby/object:Gem::Dependency
66
- name: curb
50
+ name: cucumber
67
51
  prerelease: false
68
52
  requirement: &id004 !ruby/object:Gem::Requirement
69
53
  none: false
70
54
  requirements:
71
55
  - - ~>
72
56
  - !ruby/object:Gem::Version
73
- segments:
74
- - 0
75
- - 7
76
- - 0
77
- version: 0.7.0
78
- type: :runtime
57
+ version: 0.10.0
58
+ type: :development
79
59
  version_requirements: *id004
80
60
  - !ruby/object:Gem::Dependency
81
- name: cucumber
61
+ name: relish
82
62
  prerelease: false
83
63
  requirement: &id005 !ruby/object:Gem::Requirement
84
64
  none: false
85
65
  requirements:
86
66
  - - ~>
87
67
  - !ruby/object:Gem::Version
88
- segments:
89
- - 0
90
- - 10
91
- - 0
92
- version: 0.10.0
68
+ version: 0.2.1
93
69
  type: :development
94
70
  version_requirements: *id005
95
71
  - !ruby/object:Gem::Dependency
96
- name: relish
72
+ name: rspec
97
73
  prerelease: false
98
74
  requirement: &id006 !ruby/object:Gem::Requirement
99
75
  none: false
100
76
  requirements:
101
77
  - - ~>
102
78
  - !ruby/object:Gem::Version
103
- segments:
104
- - 0
105
- - 2
106
- - 0
107
- version: 0.2.0
79
+ version: 2.5.0
108
80
  type: :development
109
81
  version_requirements: *id006
110
82
  - !ruby/object:Gem::Dependency
111
- name: rspec
83
+ name: throttler
112
84
  prerelease: false
113
85
  requirement: &id007 !ruby/object:Gem::Requirement
114
86
  none: false
115
87
  requirements:
116
88
  - - ~>
117
89
  - !ruby/object:Gem::Version
118
- segments:
119
- - 2
120
- - 4
121
- - 0
122
- version: 2.4.0
90
+ version: 0.2.1
123
91
  type: :development
124
92
  version_requirements: *id007
125
93
  - !ruby/object:Gem::Dependency
126
- name: throttler
94
+ name: vcr
127
95
  prerelease: false
128
96
  requirement: &id008 !ruby/object:Gem::Requirement
129
97
  none: false
130
98
  requirements:
131
99
  - - ~>
132
100
  - !ruby/object:Gem::Version
133
- segments:
134
- - 0
135
- - 2
136
- - 1
137
- version: 0.2.1
101
+ version: 1.6.0
138
102
  type: :development
139
103
  version_requirements: *id008
140
- - !ruby/object:Gem::Dependency
141
- name: vcr
142
- prerelease: false
143
- requirement: &id009 !ruby/object:Gem::Requirement
144
- none: false
145
- requirements:
146
- - - ~>
147
- - !ruby/object:Gem::Version
148
- segments:
149
- - 1
150
- - 5
151
- - 0
152
- version: 1.5.0
153
- type: :development
154
- version_requirements: *id009
155
104
  - !ruby/object:Gem::Dependency
156
105
  name: webmock
157
106
  prerelease: false
158
- requirement: &id010 !ruby/object:Gem::Requirement
107
+ requirement: &id009 !ruby/object:Gem::Requirement
159
108
  none: false
160
109
  requirements:
161
110
  - - ~>
162
111
  - !ruby/object:Gem::Version
163
- segments:
164
- - 1
165
- - 6
166
- - 2
167
112
  version: 1.6.2
168
113
  type: :development
169
- version_requirements: *id010
170
- - !ruby/object:Gem::Dependency
171
- name: ruby-debug19
172
- prerelease: false
173
- requirement: &id011 !ruby/object:Gem::Requirement
174
- none: false
175
- requirements:
176
- - - ~>
177
- - !ruby/object:Gem::Version
178
- segments:
179
- - 0
180
- - 11
181
- - 0
182
- version: 0.11.0
183
- type: :development
184
- version_requirements: *id011
114
+ version_requirements: *id009
185
115
  description: A minimal Ruby wrapper to the Amazon Product Advertising API
186
116
  email:
187
117
  - code@papercavalier.com
@@ -193,26 +123,53 @@ extra_rdoc_files: []
193
123
 
194
124
  files:
195
125
  - lib/sucker/parameters.rb
126
+ - lib/sucker/parameters.rbc
196
127
  - lib/sucker/request.rb
128
+ - lib/sucker/request.rbc
197
129
  - lib/sucker/response.rb
130
+ - lib/sucker/response.rbc
198
131
  - lib/sucker/version.rb
132
+ - lib/sucker/version.rbc
199
133
  - lib/sucker.rb
134
+ - lib/sucker.rbc
200
135
  - LICENSE
201
136
  - README.md
202
- - CHANGELOG.md
203
137
  - spec/fixtures/asins.txt
138
+ - spec/fixtures/cassette_library/0394751221.yml
139
+ - spec/fixtures/cassette_library/0415246334.yml
140
+ - spec/fixtures/cassette_library/0679753354.yml
141
+ - spec/fixtures/cassette_library/0816614024-0007218095.yml
142
+ - spec/fixtures/cassette_library/0816614024-0143105825.yml
143
+ - spec/fixtures/cassette_library/0816614024.yml
144
+ - spec/fixtures/cassette_library/482224816x.yml
145
+ - spec/fixtures/cassette_library/816614024.yml
146
+ - spec/fixtures/cassette_library/a2h6nh4sqyfz4m.yml
147
+ - spec/fixtures/cassette_library/a2jyso6w6kep83.yml
148
+ - spec/fixtures/cassette_library/author-lacan-or-deleuze-and-not-fiction.yml
149
+ - spec/fixtures/cassette_library/b000aspues.yml
150
+ - spec/fixtures/cassette_library/deleuze-binding-kindle.yml
151
+ - spec/fixtures/cassette_library/deleuze.yml
152
+ - spec/fixtures/cassette_library/george-orwell.yml
204
153
  - spec/fixtures/cassette_library/spec/sucker/request.yml
205
154
  - spec/fixtures/cassette_library/spec/sucker/response.yml
206
155
  - spec/spec_helper.rb
156
+ - spec/spec_helper.rbc
207
157
  - spec/sucker/parameters_spec.rb
158
+ - spec/sucker/parameters_spec.rbc
208
159
  - spec/sucker/request_spec.rb
160
+ - spec/sucker/request_spec.rbc
209
161
  - spec/sucker/response_spec.rb
162
+ - spec/sucker/response_spec.rbc
210
163
  - spec/sucker_spec.rb
164
+ - spec/sucker_spec.rbc
211
165
  - spec/support/amazon.yml
212
166
  - spec/support/amazon.yml.example
213
167
  - spec/support/amazon_credentials.rb
168
+ - spec/support/amazon_credentials.rbc
214
169
  - spec/support/asins.rb
170
+ - spec/support/asins.rbc
215
171
  - spec/support/vcr.rb
172
+ - spec/support/vcr.rbc
216
173
  has_rdoc: true
217
174
  homepage: https://rubygems.org/gems/sucker
218
175
  licenses: []
@@ -227,35 +184,54 @@ required_ruby_version: !ruby/object:Gem::Requirement
227
184
  requirements:
228
185
  - - ">="
229
186
  - !ruby/object:Gem::Version
230
- segments:
231
- - 0
232
187
  version: "0"
233
188
  required_rubygems_version: !ruby/object:Gem::Requirement
234
189
  none: false
235
190
  requirements:
236
- - - ">="
191
+ - - ">"
237
192
  - !ruby/object:Gem::Version
238
- segments:
239
- - 0
240
- version: "0"
193
+ version: 1.3.1
241
194
  requirements: []
242
195
 
243
196
  rubyforge_project: sucker
244
- rubygems_version: 1.3.7
197
+ rubygems_version: 1.5.0
245
198
  signing_key:
246
199
  specification_version: 3
247
200
  summary: A Ruby wrapper to the Amazon Product Advertising API
248
201
  test_files:
249
202
  - spec/fixtures/asins.txt
203
+ - spec/fixtures/cassette_library/0394751221.yml
204
+ - spec/fixtures/cassette_library/0415246334.yml
205
+ - spec/fixtures/cassette_library/0679753354.yml
206
+ - spec/fixtures/cassette_library/0816614024-0007218095.yml
207
+ - spec/fixtures/cassette_library/0816614024-0143105825.yml
208
+ - spec/fixtures/cassette_library/0816614024.yml
209
+ - spec/fixtures/cassette_library/482224816x.yml
210
+ - spec/fixtures/cassette_library/816614024.yml
211
+ - spec/fixtures/cassette_library/a2h6nh4sqyfz4m.yml
212
+ - spec/fixtures/cassette_library/a2jyso6w6kep83.yml
213
+ - spec/fixtures/cassette_library/author-lacan-or-deleuze-and-not-fiction.yml
214
+ - spec/fixtures/cassette_library/b000aspues.yml
215
+ - spec/fixtures/cassette_library/deleuze-binding-kindle.yml
216
+ - spec/fixtures/cassette_library/deleuze.yml
217
+ - spec/fixtures/cassette_library/george-orwell.yml
250
218
  - spec/fixtures/cassette_library/spec/sucker/request.yml
251
219
  - spec/fixtures/cassette_library/spec/sucker/response.yml
252
220
  - spec/spec_helper.rb
221
+ - spec/spec_helper.rbc
253
222
  - spec/sucker/parameters_spec.rb
223
+ - spec/sucker/parameters_spec.rbc
254
224
  - spec/sucker/request_spec.rb
225
+ - spec/sucker/request_spec.rbc
255
226
  - spec/sucker/response_spec.rb
227
+ - spec/sucker/response_spec.rbc
256
228
  - spec/sucker_spec.rb
229
+ - spec/sucker_spec.rbc
257
230
  - spec/support/amazon.yml
258
231
  - spec/support/amazon.yml.example
259
232
  - spec/support/amazon_credentials.rb
233
+ - spec/support/amazon_credentials.rbc
260
234
  - spec/support/asins.rb
235
+ - spec/support/asins.rbc
261
236
  - spec/support/vcr.rb
237
+ - spec/support/vcr.rbc
data/CHANGELOG.md DELETED
@@ -1,47 +0,0 @@
1
- 1.1.4
2
- =====
3
-
4
- * Required openssl library as I've heard a couple of complaints about
5
- their systems complaining when it is not explicitly required. Can't
6
- reproduce this locally though.
7
-
8
- 1.1.3
9
- =====
10
-
11
- * Fixed bug where curl_opts was not setting options on the curl object
12
-
13
- 1.1.2
14
- =====
15
-
16
- * Fixed seemingly benign bug in Request#associate_tag=.
17
- 1.1.1
18
- =====
19
-
20
- * Added back Request#curl as a deprecated method.
21
-
22
- 1.1.0
23
- =====
24
-
25
- * Removed Request#get!. Bloat.
26
- * Added Request#get_all to fetch responses from all venues
27
- simultaneously.
28
- * Added Request#associate_tags= to set associate tags for all locales.
29
- * Added Request#keys= to set distinct keys for locales.
30
- * Request#get validates presence of key and locale.
31
- * Renamed Request#curl to Request#curl_opts.
32
-
33
- 1.0.0
34
- =====
35
-
36
- * Added #each and #map to Response. #find no longer yields.
37
-
38
- 1.0.0.beta4
39
- ===========
40
-
41
- * Sucker::Request#get! raises an error if response is not valid.
42
-
43
- 1.0.0.beta3
44
- ===========
45
-
46
- * Sucker::Response#find yields to a block if given one.
47
- * Renamed #node to #find