sucker 1.3.0.pre.2 → 1.3.0.pre.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +32 -19
- data/lib/sucker.rb +0 -1
- data/lib/sucker.rbc +281 -0
- data/lib/sucker/parameters.rb +4 -8
- data/lib/sucker/parameters.rbc +723 -0
- data/lib/sucker/request.rb +1 -3
- data/lib/sucker/request.rbc +2674 -0
- data/lib/sucker/response.rb +9 -32
- data/lib/sucker/response.rbc +1319 -0
- data/lib/sucker/response/hash.rb +46 -0
- data/lib/sucker/version.rb +2 -4
- data/lib/sucker/version.rbc +130 -0
- data/spec/spec_helper.rb +4 -4
- data/spec/spec_helper.rbc +230 -0
- data/spec/sucker/parameters_spec.rbc +1476 -0
- data/spec/sucker/request_spec.rb +0 -11
- data/spec/sucker/request_spec.rbc +2642 -0
- data/spec/sucker/response/hash_spec.rb +43 -0
- data/spec/sucker/response_spec.rb +3 -18
- data/spec/sucker/response_spec.rbc +2854 -0
- data/spec/sucker_spec.rbc +287 -0
- data/spec/support/amazon_credentials.rbc +154 -0
- data/spec/support/asins.rbc +335 -0
- data/spec/support/vcr.rbc +356 -0
- metadata +36 -52
- data/spec/fixtures/cassette_library/067972110x.yml +0 -26
- data/spec/fixtures/cassette_library/integration/alternate_versions.yml +0 -26
- data/spec/fixtures/cassette_library/integration/errors.yml +0 -26
- data/spec/fixtures/cassette_library/integration/france.yml +0 -26
- data/spec/fixtures/cassette_library/integration/images.yml +0 -26
- data/spec/fixtures/cassette_library/integration/item_lookup/multiple.yml +0 -26
- data/spec/fixtures/cassette_library/integration/item_lookup/single.yml +0 -26
- data/spec/fixtures/cassette_library/integration/item_search.yml +0 -26
- data/spec/fixtures/cassette_library/integration/japan.yml +0 -26
- data/spec/fixtures/cassette_library/integration/keyword_search.yml +0 -26
- data/spec/fixtures/cassette_library/integration/kindle.yml +0 -26
- data/spec/fixtures/cassette_library/integration/kindle_2.yml +0 -26
- data/spec/fixtures/cassette_library/integration/multiple_locales.yml +0 -151
- data/spec/fixtures/cassette_library/integration/power_search.yml +0 -26
- data/spec/fixtures/cassette_library/integration/related_items/child.yml +0 -26
- data/spec/fixtures/cassette_library/integration/related_items/parent.yml +0 -26
- data/spec/fixtures/cassette_library/integration/seller_listings_search.yml +0 -26
- data/spec/fixtures/cassette_library/integration/twenty_items.yml +0 -26
- data/spec/fixtures/cassette_library/unit/sucker/request.yml +0 -61
- data/spec/fixtures/cassette_library/unit/sucker/response.yml +0 -26
@@ -0,0 +1,287 @@
|
|
1
|
+
!RBIX
|
2
|
+
0
|
3
|
+
x
|
4
|
+
M
|
5
|
+
1
|
6
|
+
n
|
7
|
+
n
|
8
|
+
x
|
9
|
+
10
|
10
|
+
__script__
|
11
|
+
i
|
12
|
+
22
|
13
|
+
5
|
14
|
+
7
|
15
|
+
0
|
16
|
+
64
|
17
|
+
47
|
18
|
+
49
|
19
|
+
1
|
20
|
+
1
|
21
|
+
15
|
22
|
+
5
|
23
|
+
45
|
24
|
+
2
|
25
|
+
3
|
26
|
+
56
|
27
|
+
4
|
28
|
+
47
|
29
|
+
50
|
30
|
+
5
|
31
|
+
1
|
32
|
+
15
|
33
|
+
2
|
34
|
+
11
|
35
|
+
I
|
36
|
+
3
|
37
|
+
I
|
38
|
+
0
|
39
|
+
I
|
40
|
+
0
|
41
|
+
I
|
42
|
+
0
|
43
|
+
n
|
44
|
+
p
|
45
|
+
6
|
46
|
+
s
|
47
|
+
11
|
48
|
+
spec_helper
|
49
|
+
x
|
50
|
+
7
|
51
|
+
require
|
52
|
+
x
|
53
|
+
6
|
54
|
+
Sucker
|
55
|
+
n
|
56
|
+
M
|
57
|
+
1
|
58
|
+
p
|
59
|
+
2
|
60
|
+
x
|
61
|
+
9
|
62
|
+
for_block
|
63
|
+
t
|
64
|
+
n
|
65
|
+
x
|
66
|
+
9
|
67
|
+
__block__
|
68
|
+
i
|
69
|
+
11
|
70
|
+
5
|
71
|
+
7
|
72
|
+
0
|
73
|
+
64
|
74
|
+
56
|
75
|
+
1
|
76
|
+
47
|
77
|
+
50
|
78
|
+
2
|
79
|
+
1
|
80
|
+
11
|
81
|
+
I
|
82
|
+
4
|
83
|
+
I
|
84
|
+
0
|
85
|
+
I
|
86
|
+
0
|
87
|
+
I
|
88
|
+
0
|
89
|
+
I
|
90
|
+
-2
|
91
|
+
p
|
92
|
+
3
|
93
|
+
s
|
94
|
+
4
|
95
|
+
.new
|
96
|
+
M
|
97
|
+
1
|
98
|
+
p
|
99
|
+
2
|
100
|
+
x
|
101
|
+
9
|
102
|
+
for_block
|
103
|
+
t
|
104
|
+
n
|
105
|
+
x
|
106
|
+
9
|
107
|
+
__block__
|
108
|
+
i
|
109
|
+
11
|
110
|
+
5
|
111
|
+
7
|
112
|
+
0
|
113
|
+
64
|
114
|
+
56
|
115
|
+
1
|
116
|
+
47
|
117
|
+
50
|
118
|
+
2
|
119
|
+
1
|
120
|
+
11
|
121
|
+
I
|
122
|
+
4
|
123
|
+
I
|
124
|
+
0
|
125
|
+
I
|
126
|
+
0
|
127
|
+
I
|
128
|
+
0
|
129
|
+
I
|
130
|
+
-2
|
131
|
+
p
|
132
|
+
3
|
133
|
+
s
|
134
|
+
24
|
135
|
+
returns a Request object
|
136
|
+
M
|
137
|
+
1
|
138
|
+
p
|
139
|
+
2
|
140
|
+
x
|
141
|
+
9
|
142
|
+
for_block
|
143
|
+
t
|
144
|
+
n
|
145
|
+
x
|
146
|
+
9
|
147
|
+
__block__
|
148
|
+
i
|
149
|
+
38
|
150
|
+
45
|
151
|
+
0
|
152
|
+
1
|
153
|
+
13
|
154
|
+
71
|
155
|
+
2
|
156
|
+
47
|
157
|
+
9
|
158
|
+
21
|
159
|
+
47
|
160
|
+
49
|
161
|
+
3
|
162
|
+
0
|
163
|
+
13
|
164
|
+
47
|
165
|
+
49
|
166
|
+
4
|
167
|
+
0
|
168
|
+
15
|
169
|
+
8
|
170
|
+
24
|
171
|
+
49
|
172
|
+
2
|
173
|
+
0
|
174
|
+
5
|
175
|
+
45
|
176
|
+
0
|
177
|
+
5
|
178
|
+
43
|
179
|
+
6
|
180
|
+
47
|
181
|
+
49
|
182
|
+
7
|
183
|
+
1
|
184
|
+
49
|
185
|
+
8
|
186
|
+
1
|
187
|
+
11
|
188
|
+
I
|
189
|
+
4
|
190
|
+
I
|
191
|
+
0
|
192
|
+
I
|
193
|
+
0
|
194
|
+
I
|
195
|
+
0
|
196
|
+
I
|
197
|
+
-2
|
198
|
+
p
|
199
|
+
9
|
200
|
+
x
|
201
|
+
6
|
202
|
+
Sucker
|
203
|
+
n
|
204
|
+
x
|
205
|
+
3
|
206
|
+
new
|
207
|
+
x
|
208
|
+
8
|
209
|
+
allocate
|
210
|
+
x
|
211
|
+
10
|
212
|
+
initialize
|
213
|
+
n
|
214
|
+
x
|
215
|
+
7
|
216
|
+
Request
|
217
|
+
x
|
218
|
+
17
|
219
|
+
be_an_instance_of
|
220
|
+
x
|
221
|
+
6
|
222
|
+
should
|
223
|
+
p
|
224
|
+
3
|
225
|
+
I
|
226
|
+
0
|
227
|
+
I
|
228
|
+
6
|
229
|
+
I
|
230
|
+
26
|
231
|
+
x
|
232
|
+
50
|
233
|
+
/Users/hakanensari/code/sucker/spec/sucker_spec.rb
|
234
|
+
p
|
235
|
+
0
|
236
|
+
x
|
237
|
+
2
|
238
|
+
it
|
239
|
+
p
|
240
|
+
3
|
241
|
+
I
|
242
|
+
0
|
243
|
+
I
|
244
|
+
5
|
245
|
+
I
|
246
|
+
b
|
247
|
+
x
|
248
|
+
50
|
249
|
+
/Users/hakanensari/code/sucker/spec/sucker_spec.rb
|
250
|
+
p
|
251
|
+
0
|
252
|
+
x
|
253
|
+
8
|
254
|
+
describe
|
255
|
+
p
|
256
|
+
3
|
257
|
+
I
|
258
|
+
0
|
259
|
+
I
|
260
|
+
4
|
261
|
+
I
|
262
|
+
b
|
263
|
+
x
|
264
|
+
50
|
265
|
+
/Users/hakanensari/code/sucker/spec/sucker_spec.rb
|
266
|
+
p
|
267
|
+
0
|
268
|
+
x
|
269
|
+
8
|
270
|
+
describe
|
271
|
+
p
|
272
|
+
5
|
273
|
+
I
|
274
|
+
0
|
275
|
+
I
|
276
|
+
1
|
277
|
+
I
|
278
|
+
9
|
279
|
+
I
|
280
|
+
3
|
281
|
+
I
|
282
|
+
16
|
283
|
+
x
|
284
|
+
50
|
285
|
+
/Users/hakanensari/code/sucker/spec/sucker_spec.rb
|
286
|
+
p
|
287
|
+
0
|
@@ -0,0 +1,154 @@
|
|
1
|
+
!RBIX
|
2
|
+
0
|
3
|
+
x
|
4
|
+
M
|
5
|
+
1
|
6
|
+
n
|
7
|
+
n
|
8
|
+
x
|
9
|
+
10
|
10
|
+
__script__
|
11
|
+
i
|
12
|
+
16
|
13
|
+
99
|
14
|
+
7
|
15
|
+
0
|
16
|
+
7
|
17
|
+
1
|
18
|
+
65
|
19
|
+
67
|
20
|
+
49
|
21
|
+
2
|
22
|
+
0
|
23
|
+
49
|
24
|
+
3
|
25
|
+
4
|
26
|
+
15
|
27
|
+
2
|
28
|
+
11
|
29
|
+
I
|
30
|
+
5
|
31
|
+
I
|
32
|
+
0
|
33
|
+
I
|
34
|
+
0
|
35
|
+
I
|
36
|
+
0
|
37
|
+
n
|
38
|
+
p
|
39
|
+
4
|
40
|
+
x
|
41
|
+
6
|
42
|
+
amazon
|
43
|
+
M
|
44
|
+
1
|
45
|
+
n
|
46
|
+
n
|
47
|
+
x
|
48
|
+
6
|
49
|
+
amazon
|
50
|
+
i
|
51
|
+
30
|
52
|
+
39
|
53
|
+
0
|
54
|
+
13
|
55
|
+
10
|
56
|
+
29
|
57
|
+
15
|
58
|
+
45
|
59
|
+
1
|
60
|
+
2
|
61
|
+
45
|
62
|
+
3
|
63
|
+
4
|
64
|
+
65
|
65
|
+
49
|
66
|
+
5
|
67
|
+
0
|
68
|
+
49
|
69
|
+
6
|
70
|
+
1
|
71
|
+
7
|
72
|
+
7
|
73
|
+
64
|
74
|
+
81
|
75
|
+
8
|
76
|
+
49
|
77
|
+
9
|
78
|
+
1
|
79
|
+
38
|
80
|
+
0
|
81
|
+
11
|
82
|
+
I
|
83
|
+
3
|
84
|
+
I
|
85
|
+
0
|
86
|
+
I
|
87
|
+
0
|
88
|
+
I
|
89
|
+
0
|
90
|
+
n
|
91
|
+
p
|
92
|
+
10
|
93
|
+
x
|
94
|
+
7
|
95
|
+
@amazon
|
96
|
+
x
|
97
|
+
4
|
98
|
+
YAML
|
99
|
+
n
|
100
|
+
x
|
101
|
+
4
|
102
|
+
File
|
103
|
+
n
|
104
|
+
x
|
105
|
+
11
|
106
|
+
active_path
|
107
|
+
x
|
108
|
+
7
|
109
|
+
dirname
|
110
|
+
s
|
111
|
+
11
|
112
|
+
/amazon.yml
|
113
|
+
x
|
114
|
+
1
|
115
|
+
+
|
116
|
+
x
|
117
|
+
9
|
118
|
+
load_file
|
119
|
+
p
|
120
|
+
5
|
121
|
+
I
|
122
|
+
-1
|
123
|
+
I
|
124
|
+
1
|
125
|
+
I
|
126
|
+
0
|
127
|
+
I
|
128
|
+
2
|
129
|
+
I
|
130
|
+
1e
|
131
|
+
x
|
132
|
+
65
|
133
|
+
/Users/hakanensari/code/sucker/spec/support/amazon_credentials.rb
|
134
|
+
p
|
135
|
+
0
|
136
|
+
x
|
137
|
+
17
|
138
|
+
method_visibility
|
139
|
+
x
|
140
|
+
15
|
141
|
+
add_defn_method
|
142
|
+
p
|
143
|
+
3
|
144
|
+
I
|
145
|
+
0
|
146
|
+
I
|
147
|
+
1
|
148
|
+
I
|
149
|
+
10
|
150
|
+
x
|
151
|
+
65
|
152
|
+
/Users/hakanensari/code/sucker/spec/support/amazon_credentials.rb
|
153
|
+
p
|
154
|
+
0
|
@@ -0,0 +1,335 @@
|
|
1
|
+
!RBIX
|
2
|
+
0
|
3
|
+
x
|
4
|
+
M
|
5
|
+
1
|
6
|
+
n
|
7
|
+
n
|
8
|
+
x
|
9
|
+
10
|
10
|
+
__script__
|
11
|
+
i
|
12
|
+
16
|
13
|
+
99
|
14
|
+
7
|
15
|
+
0
|
16
|
+
7
|
17
|
+
1
|
18
|
+
65
|
19
|
+
67
|
20
|
+
49
|
21
|
+
2
|
22
|
+
0
|
23
|
+
49
|
24
|
+
3
|
25
|
+
4
|
26
|
+
15
|
27
|
+
2
|
28
|
+
11
|
29
|
+
I
|
30
|
+
5
|
31
|
+
I
|
32
|
+
0
|
33
|
+
I
|
34
|
+
0
|
35
|
+
I
|
36
|
+
0
|
37
|
+
n
|
38
|
+
p
|
39
|
+
4
|
40
|
+
x
|
41
|
+
13
|
42
|
+
asins_fixture
|
43
|
+
M
|
44
|
+
1
|
45
|
+
n
|
46
|
+
n
|
47
|
+
x
|
48
|
+
13
|
49
|
+
asins_fixture
|
50
|
+
i
|
51
|
+
81
|
52
|
+
45
|
53
|
+
0
|
54
|
+
1
|
55
|
+
13
|
56
|
+
71
|
57
|
+
2
|
58
|
+
47
|
59
|
+
9
|
60
|
+
37
|
61
|
+
47
|
62
|
+
49
|
63
|
+
3
|
64
|
+
0
|
65
|
+
13
|
66
|
+
45
|
67
|
+
0
|
68
|
+
4
|
69
|
+
7
|
70
|
+
5
|
71
|
+
64
|
72
|
+
65
|
73
|
+
49
|
74
|
+
6
|
75
|
+
0
|
76
|
+
49
|
77
|
+
7
|
78
|
+
2
|
79
|
+
7
|
80
|
+
8
|
81
|
+
64
|
82
|
+
47
|
83
|
+
49
|
84
|
+
9
|
85
|
+
2
|
86
|
+
15
|
87
|
+
8
|
88
|
+
56
|
89
|
+
45
|
90
|
+
0
|
91
|
+
10
|
92
|
+
7
|
93
|
+
5
|
94
|
+
64
|
95
|
+
65
|
96
|
+
49
|
97
|
+
6
|
98
|
+
0
|
99
|
+
49
|
100
|
+
7
|
101
|
+
2
|
102
|
+
7
|
103
|
+
8
|
104
|
+
64
|
105
|
+
49
|
106
|
+
2
|
107
|
+
2
|
108
|
+
56
|
109
|
+
11
|
110
|
+
50
|
111
|
+
12
|
112
|
+
0
|
113
|
+
19
|
114
|
+
0
|
115
|
+
15
|
116
|
+
94
|
117
|
+
9
|
118
|
+
76
|
119
|
+
20
|
120
|
+
0
|
121
|
+
56
|
122
|
+
13
|
123
|
+
50
|
124
|
+
14
|
125
|
+
0
|
126
|
+
8
|
127
|
+
77
|
128
|
+
1
|
129
|
+
15
|
130
|
+
20
|
131
|
+
0
|
132
|
+
11
|
133
|
+
I
|
134
|
+
6
|
135
|
+
I
|
136
|
+
1
|
137
|
+
I
|
138
|
+
0
|
139
|
+
I
|
140
|
+
0
|
141
|
+
n
|
142
|
+
p
|
143
|
+
15
|
144
|
+
x
|
145
|
+
4
|
146
|
+
File
|
147
|
+
n
|
148
|
+
x
|
149
|
+
3
|
150
|
+
new
|
151
|
+
x
|
152
|
+
8
|
153
|
+
allocate
|
154
|
+
n
|
155
|
+
s
|
156
|
+
24
|
157
|
+
../../fixtures/asins.txt
|
158
|
+
x
|
159
|
+
11
|
160
|
+
active_path
|
161
|
+
x
|
162
|
+
11
|
163
|
+
expand_path
|
164
|
+
s
|
165
|
+
1
|
166
|
+
r
|
167
|
+
x
|
168
|
+
10
|
169
|
+
initialize
|
170
|
+
n
|
171
|
+
M
|
172
|
+
1
|
173
|
+
p
|
174
|
+
2
|
175
|
+
x
|
176
|
+
9
|
177
|
+
for_block
|
178
|
+
t
|
179
|
+
n
|
180
|
+
x
|
181
|
+
13
|
182
|
+
asins_fixture
|
183
|
+
i
|
184
|
+
10
|
185
|
+
57
|
186
|
+
19
|
187
|
+
0
|
188
|
+
15
|
189
|
+
20
|
190
|
+
0
|
191
|
+
49
|
192
|
+
0
|
193
|
+
0
|
194
|
+
11
|
195
|
+
I
|
196
|
+
3
|
197
|
+
I
|
198
|
+
1
|
199
|
+
I
|
200
|
+
1
|
201
|
+
I
|
202
|
+
1
|
203
|
+
n
|
204
|
+
p
|
205
|
+
1
|
206
|
+
x
|
207
|
+
5
|
208
|
+
chomp
|
209
|
+
p
|
210
|
+
3
|
211
|
+
I
|
212
|
+
0
|
213
|
+
I
|
214
|
+
2
|
215
|
+
I
|
216
|
+
a
|
217
|
+
x
|
218
|
+
52
|
219
|
+
/Users/hakanensari/code/sucker/spec/support/asins.rb
|
220
|
+
p
|
221
|
+
1
|
222
|
+
x
|
223
|
+
4
|
224
|
+
line
|
225
|
+
x
|
226
|
+
3
|
227
|
+
map
|
228
|
+
M
|
229
|
+
1
|
230
|
+
p
|
231
|
+
2
|
232
|
+
x
|
233
|
+
9
|
234
|
+
for_block
|
235
|
+
t
|
236
|
+
n
|
237
|
+
x
|
238
|
+
13
|
239
|
+
asins_fixture
|
240
|
+
i
|
241
|
+
9
|
242
|
+
57
|
243
|
+
19
|
244
|
+
0
|
245
|
+
15
|
246
|
+
20
|
247
|
+
0
|
248
|
+
60
|
249
|
+
1
|
250
|
+
11
|
251
|
+
I
|
252
|
+
3
|
253
|
+
I
|
254
|
+
1
|
255
|
+
I
|
256
|
+
1
|
257
|
+
I
|
258
|
+
1
|
259
|
+
n
|
260
|
+
p
|
261
|
+
0
|
262
|
+
p
|
263
|
+
3
|
264
|
+
I
|
265
|
+
0
|
266
|
+
I
|
267
|
+
4
|
268
|
+
I
|
269
|
+
9
|
270
|
+
x
|
271
|
+
52
|
272
|
+
/Users/hakanensari/code/sucker/spec/support/asins.rb
|
273
|
+
p
|
274
|
+
1
|
275
|
+
x
|
276
|
+
4
|
277
|
+
asin
|
278
|
+
x
|
279
|
+
4
|
280
|
+
each
|
281
|
+
p
|
282
|
+
13
|
283
|
+
I
|
284
|
+
-1
|
285
|
+
I
|
286
|
+
1
|
287
|
+
I
|
288
|
+
0
|
289
|
+
I
|
290
|
+
2
|
291
|
+
I
|
292
|
+
40
|
293
|
+
I
|
294
|
+
3
|
295
|
+
I
|
296
|
+
43
|
297
|
+
I
|
298
|
+
4
|
299
|
+
I
|
300
|
+
4c
|
301
|
+
I
|
302
|
+
3
|
303
|
+
I
|
304
|
+
4e
|
305
|
+
I
|
306
|
+
7
|
307
|
+
I
|
308
|
+
51
|
309
|
+
x
|
310
|
+
52
|
311
|
+
/Users/hakanensari/code/sucker/spec/support/asins.rb
|
312
|
+
p
|
313
|
+
1
|
314
|
+
x
|
315
|
+
5
|
316
|
+
asins
|
317
|
+
x
|
318
|
+
17
|
319
|
+
method_visibility
|
320
|
+
x
|
321
|
+
15
|
322
|
+
add_defn_method
|
323
|
+
p
|
324
|
+
3
|
325
|
+
I
|
326
|
+
0
|
327
|
+
I
|
328
|
+
1
|
329
|
+
I
|
330
|
+
10
|
331
|
+
x
|
332
|
+
52
|
333
|
+
/Users/hakanensari/code/sucker/spec/support/asins.rb
|
334
|
+
p
|
335
|
+
0
|