sucker 1.0.0.beta.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/CHANGELOG.md +12 -2
  2. data/README.md +5 -2
  3. data/lib/sucker.rbc +341 -0
  4. data/lib/sucker/request.rb +1 -1
  5. data/lib/sucker/request.rbc +2481 -0
  6. data/lib/sucker/response.rb +19 -7
  7. data/lib/sucker/response.rbc +1554 -0
  8. data/lib/sucker/version.rb +2 -2
  9. data/lib/sucker/version.rbc +130 -0
  10. data/spec/fixtures/asins.txt +9406 -406
  11. data/spec/fixtures/cassette_library/integration/alternate_versions.yml +27 -0
  12. data/spec/fixtures/cassette_library/integration/errors.yml +27 -0
  13. data/spec/fixtures/cassette_library/integration/france.yml +27 -0
  14. data/spec/fixtures/cassette_library/integration/images.yml +27 -0
  15. data/spec/fixtures/cassette_library/integration/item_lookup/multiple.yml +27 -0
  16. data/spec/fixtures/cassette_library/integration/item_lookup/single.yml +27 -0
  17. data/spec/fixtures/cassette_library/integration/item_search.yml +27 -0
  18. data/spec/fixtures/cassette_library/integration/japan.yml +27 -0
  19. data/spec/fixtures/cassette_library/integration/keyword_search.yml +27 -0
  20. data/spec/fixtures/cassette_library/integration/kindle.yml +27 -0
  21. data/spec/fixtures/cassette_library/integration/kindle_2.yml +27 -0
  22. data/spec/fixtures/cassette_library/integration/multiple_locales.yml +157 -0
  23. data/spec/fixtures/cassette_library/integration/power_search.yml +27 -0
  24. data/spec/fixtures/cassette_library/integration/related_items/child.yml +27 -0
  25. data/spec/fixtures/cassette_library/integration/related_items/parent.yml +27 -0
  26. data/spec/fixtures/cassette_library/integration/seller_listings_search.yml +27 -0
  27. data/spec/fixtures/cassette_library/integration/twenty_items.yml +27 -0
  28. data/spec/fixtures/cassette_library/unit/sucker/request.yml +29 -0
  29. data/spec/fixtures/cassette_library/unit/sucker/response.yml +27 -0
  30. data/spec/integration/alternate_versions_spec.rb +28 -20
  31. data/spec/integration/alternate_versions_spec.rbc +843 -0
  32. data/spec/integration/errors_spec.rb +10 -6
  33. data/spec/integration/errors_spec.rbc +964 -0
  34. data/spec/integration/france_spec.rb +33 -25
  35. data/spec/integration/france_spec.rbc +1012 -0
  36. data/spec/integration/images_spec.rb +32 -24
  37. data/spec/integration/images_spec.rbc +1047 -0
  38. data/spec/integration/item_lookup_spec.rb +11 -3
  39. data/spec/integration/item_lookup_spec.rbc +1723 -0
  40. data/spec/integration/item_search_spec.rb +6 -2
  41. data/spec/integration/item_search_spec.rbc +926 -0
  42. data/spec/integration/japan_spec.rb +27 -19
  43. data/spec/integration/japan_spec.rbc +849 -0
  44. data/spec/integration/keyword_search_spec.rb +5 -0
  45. data/spec/integration/keyword_search_spec.rbc +838 -0
  46. data/spec/integration/kindle_spec.rb +13 -5
  47. data/spec/integration/kindle_spec.rbc +1425 -0
  48. data/spec/integration/multiple_locales_spec.rb +34 -26
  49. data/spec/integration/multiple_locales_spec.rbc +1090 -0
  50. data/spec/integration/power_search_spec.rb +5 -0
  51. data/spec/integration/power_search_spec.rbc +838 -0
  52. data/spec/integration/related_items_spec.rb +41 -29
  53. data/spec/integration/related_items_spec.rbc +1228 -0
  54. data/spec/integration/seller_listing_search_spec.rb +3 -0
  55. data/spec/integration/seller_listing_search_spec.rbc +852 -0
  56. data/spec/integration/twenty_items_spec.rb +41 -34
  57. data/spec/integration/twenty_items_spec.rbc +1166 -0
  58. data/spec/spec_helper.rbc +231 -0
  59. data/spec/support/amazon.yml +3 -0
  60. data/spec/support/amazon.yml.example +1 -0
  61. data/spec/support/amazon_credentials.rbc +154 -0
  62. data/spec/support/asins.rb +6 -1
  63. data/spec/support/asins.rbc +335 -0
  64. data/spec/support/vcr.rbc +360 -0
  65. data/spec/unit/sucker/request_spec.rb +57 -23
  66. data/spec/unit/sucker/request_spec.rbc +4031 -0
  67. data/spec/unit/sucker/response_spec.rb +100 -26
  68. data/spec/unit/sucker/response_spec.rbc +3787 -0
  69. data/spec/unit/sucker_spec.rb +5 -1
  70. data/spec/unit/sucker_spec.rbc +299 -0
  71. metadata +94 -12
@@ -2,6 +2,7 @@ require "spec_helper"
2
2
 
3
3
  module Sucker
4
4
  describe "Seller listing search" do
5
+
5
6
  use_vcr_cassette "integration/seller_listings_search", :record => :new_episodes
6
7
 
7
8
  let(:listings) do
@@ -25,5 +26,7 @@ module Sucker
25
26
  listings["SellerListing"].size.should be > 0
26
27
  listings["SellerListing"].first.has_key?("Price").should be_true
27
28
  end
29
+
28
30
  end
31
+
29
32
  end
@@ -0,0 +1,852 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 37
13
+ 5
14
+ 7
15
+ 0
16
+ 64
17
+ 47
18
+ 49
19
+ 1
20
+ 1
21
+ 15
22
+ 99
23
+ 7
24
+ 2
25
+ 65
26
+ 49
27
+ 3
28
+ 2
29
+ 13
30
+ 99
31
+ 12
32
+ 7
33
+ 4
34
+ 12
35
+ 7
36
+ 5
37
+ 12
38
+ 65
39
+ 12
40
+ 49
41
+ 6
42
+ 4
43
+ 15
44
+ 49
45
+ 4
46
+ 0
47
+ 15
48
+ 2
49
+ 11
50
+ I
51
+ 6
52
+ I
53
+ 0
54
+ I
55
+ 0
56
+ I
57
+ 0
58
+ n
59
+ p
60
+ 7
61
+ s
62
+ 11
63
+ spec_helper
64
+ x
65
+ 7
66
+ require
67
+ x
68
+ 6
69
+ Sucker
70
+ x
71
+ 11
72
+ open_module
73
+ x
74
+ 15
75
+ __module_init__
76
+ M
77
+ 1
78
+ n
79
+ n
80
+ x
81
+ 6
82
+ Sucker
83
+ i
84
+ 13
85
+ 5
86
+ 66
87
+ 5
88
+ 7
89
+ 0
90
+ 64
91
+ 56
92
+ 1
93
+ 47
94
+ 50
95
+ 2
96
+ 1
97
+ 11
98
+ I
99
+ 3
100
+ I
101
+ 0
102
+ I
103
+ 0
104
+ I
105
+ 0
106
+ n
107
+ p
108
+ 3
109
+ s
110
+ 21
111
+ Seller listing search
112
+ M
113
+ 1
114
+ p
115
+ 2
116
+ x
117
+ 9
118
+ for_block
119
+ t
120
+ n
121
+ x
122
+ 6
123
+ Sucker
124
+ i
125
+ 57
126
+ 5
127
+ 7
128
+ 0
129
+ 64
130
+ 44
131
+ 43
132
+ 1
133
+ 79
134
+ 49
135
+ 2
136
+ 1
137
+ 13
138
+ 7
139
+ 3
140
+ 7
141
+ 4
142
+ 49
143
+ 5
144
+ 2
145
+ 15
146
+ 47
147
+ 49
148
+ 6
149
+ 2
150
+ 15
151
+ 5
152
+ 7
153
+ 7
154
+ 56
155
+ 8
156
+ 47
157
+ 50
158
+ 9
159
+ 1
160
+ 15
161
+ 5
162
+ 7
163
+ 10
164
+ 64
165
+ 56
166
+ 11
167
+ 47
168
+ 50
169
+ 12
170
+ 1
171
+ 15
172
+ 5
173
+ 7
174
+ 13
175
+ 64
176
+ 56
177
+ 14
178
+ 47
179
+ 50
180
+ 12
181
+ 1
182
+ 11
183
+ I
184
+ 7
185
+ I
186
+ 0
187
+ I
188
+ 0
189
+ I
190
+ 0
191
+ I
192
+ -2
193
+ p
194
+ 15
195
+ s
196
+ 34
197
+ integration/seller_listings_search
198
+ x
199
+ 4
200
+ Hash
201
+ x
202
+ 16
203
+ new_from_literal
204
+ x
205
+ 6
206
+ record
207
+ x
208
+ 12
209
+ new_episodes
210
+ x
211
+ 3
212
+ []=
213
+ x
214
+ 16
215
+ use_vcr_cassette
216
+ x
217
+ 8
218
+ listings
219
+ M
220
+ 1
221
+ p
222
+ 2
223
+ x
224
+ 9
225
+ for_block
226
+ t
227
+ n
228
+ x
229
+ 6
230
+ Sucker
231
+ i
232
+ 177
233
+ 45
234
+ 0
235
+ 1
236
+ 13
237
+ 71
238
+ 2
239
+ 47
240
+ 9
241
+ 71
242
+ 47
243
+ 49
244
+ 3
245
+ 0
246
+ 13
247
+ 44
248
+ 43
249
+ 4
250
+ 4
251
+ 3
252
+ 49
253
+ 5
254
+ 1
255
+ 13
256
+ 7
257
+ 6
258
+ 7
259
+ 7
260
+ 64
261
+ 49
262
+ 8
263
+ 2
264
+ 15
265
+ 13
266
+ 7
267
+ 9
268
+ 5
269
+ 48
270
+ 10
271
+ 7
272
+ 11
273
+ 64
274
+ 49
275
+ 12
276
+ 1
277
+ 49
278
+ 8
279
+ 2
280
+ 15
281
+ 13
282
+ 7
283
+ 13
284
+ 5
285
+ 48
286
+ 10
287
+ 7
288
+ 14
289
+ 64
290
+ 49
291
+ 12
292
+ 1
293
+ 49
294
+ 8
295
+ 2
296
+ 15
297
+ 47
298
+ 49
299
+ 15
300
+ 1
301
+ 15
302
+ 8
303
+ 124
304
+ 44
305
+ 43
306
+ 4
307
+ 4
308
+ 3
309
+ 49
310
+ 5
311
+ 1
312
+ 13
313
+ 7
314
+ 6
315
+ 7
316
+ 7
317
+ 64
318
+ 49
319
+ 8
320
+ 2
321
+ 15
322
+ 13
323
+ 7
324
+ 9
325
+ 5
326
+ 48
327
+ 10
328
+ 7
329
+ 11
330
+ 64
331
+ 49
332
+ 12
333
+ 1
334
+ 49
335
+ 8
336
+ 2
337
+ 15
338
+ 13
339
+ 7
340
+ 13
341
+ 5
342
+ 48
343
+ 10
344
+ 7
345
+ 14
346
+ 64
347
+ 49
348
+ 12
349
+ 1
350
+ 49
351
+ 8
352
+ 2
353
+ 15
354
+ 49
355
+ 2
356
+ 1
357
+ 19
358
+ 0
359
+ 15
360
+ 20
361
+ 0
362
+ 44
363
+ 43
364
+ 4
365
+ 80
366
+ 49
367
+ 5
368
+ 1
369
+ 13
370
+ 7
371
+ 16
372
+ 64
373
+ 7
374
+ 17
375
+ 64
376
+ 49
377
+ 8
378
+ 2
379
+ 15
380
+ 13
381
+ 7
382
+ 18
383
+ 64
384
+ 7
385
+ 19
386
+ 64
387
+ 49
388
+ 8
389
+ 2
390
+ 15
391
+ 49
392
+ 20
393
+ 1
394
+ 15
395
+ 20
396
+ 0
397
+ 49
398
+ 21
399
+ 0
400
+ 7
401
+ 22
402
+ 64
403
+ 49
404
+ 23
405
+ 1
406
+ 49
407
+ 24
408
+ 0
409
+ 11
410
+ I
411
+ 9
412
+ I
413
+ 1
414
+ I
415
+ 0
416
+ I
417
+ 0
418
+ I
419
+ -2
420
+ p
421
+ 25
422
+ x
423
+ 6
424
+ Sucker
425
+ n
426
+ x
427
+ 3
428
+ new
429
+ x
430
+ 8
431
+ allocate
432
+ x
433
+ 4
434
+ Hash
435
+ x
436
+ 16
437
+ new_from_literal
438
+ x
439
+ 6
440
+ locale
441
+ s
442
+ 2
443
+ us
444
+ x
445
+ 3
446
+ []=
447
+ x
448
+ 3
449
+ key
450
+ x
451
+ 6
452
+ amazon
453
+ s
454
+ 3
455
+ key
456
+ x
457
+ 2
458
+ []
459
+ x
460
+ 6
461
+ secret
462
+ s
463
+ 6
464
+ secret
465
+ x
466
+ 10
467
+ initialize
468
+ s
469
+ 9
470
+ Operation
471
+ s
472
+ 19
473
+ SellerListingSearch
474
+ s
475
+ 8
476
+ SellerId
477
+ s
478
+ 14
479
+ A2JYSO6W6KEP83
480
+ x
481
+ 2
482
+ <<
483
+ x
484
+ 3
485
+ get
486
+ s
487
+ 14
488
+ SellerListings
489
+ x
490
+ 4
491
+ find
492
+ x
493
+ 5
494
+ first
495
+ p
496
+ 29
497
+ I
498
+ 0
499
+ I
500
+ 8
501
+ I
502
+ 0
503
+ I
504
+ 9
505
+ I
506
+ e
507
+ I
508
+ c
509
+ I
510
+ 17
511
+ I
512
+ a
513
+ I
514
+ 21
515
+ I
516
+ b
517
+ I
518
+ 31
519
+ I
520
+ c
521
+ I
522
+ 50
523
+ I
524
+ a
525
+ I
526
+ 5a
527
+ I
528
+ b
529
+ I
530
+ 6a
531
+ I
532
+ c
533
+ I
534
+ 7f
535
+ I
536
+ e
537
+ I
538
+ 81
539
+ I
540
+ 10
541
+ I
542
+ 89
543
+ I
544
+ f
545
+ I
546
+ 94
547
+ I
548
+ 10
549
+ I
550
+ a2
551
+ I
552
+ 12
553
+ I
554
+ b1
555
+ x
556
+ 69
557
+ /Users/snl/code/sucker/spec/integration/seller_listing_search_spec.rb
558
+ p
559
+ 1
560
+ x
561
+ 6
562
+ worker
563
+ x
564
+ 3
565
+ let
566
+ s
567
+ 18
568
+ returns page count
569
+ M
570
+ 1
571
+ p
572
+ 2
573
+ x
574
+ 9
575
+ for_block
576
+ t
577
+ n
578
+ x
579
+ 6
580
+ Sucker
581
+ i
582
+ 22
583
+ 5
584
+ 48
585
+ 0
586
+ 7
587
+ 1
588
+ 64
589
+ 49
590
+ 2
591
+ 1
592
+ 49
593
+ 3
594
+ 0
595
+ 5
596
+ 48
597
+ 4
598
+ 78
599
+ 85
600
+ 5
601
+ 49
602
+ 6
603
+ 1
604
+ 11
605
+ I
606
+ 4
607
+ I
608
+ 0
609
+ I
610
+ 0
611
+ I
612
+ 0
613
+ I
614
+ -2
615
+ p
616
+ 7
617
+ x
618
+ 8
619
+ listings
620
+ s
621
+ 10
622
+ TotalPages
623
+ x
624
+ 2
625
+ []
626
+ x
627
+ 4
628
+ to_i
629
+ x
630
+ 2
631
+ be
632
+ x
633
+ 1
634
+ >
635
+ x
636
+ 6
637
+ should
638
+ p
639
+ 5
640
+ I
641
+ 0
642
+ I
643
+ 15
644
+ I
645
+ 0
646
+ I
647
+ 16
648
+ I
649
+ 16
650
+ x
651
+ 69
652
+ /Users/snl/code/sucker/spec/integration/seller_listing_search_spec.rb
653
+ p
654
+ 0
655
+ x
656
+ 2
657
+ it
658
+ s
659
+ 16
660
+ returns listings
661
+ M
662
+ 1
663
+ p
664
+ 2
665
+ x
666
+ 9
667
+ for_block
668
+ t
669
+ n
670
+ x
671
+ 6
672
+ Sucker
673
+ i
674
+ 47
675
+ 5
676
+ 48
677
+ 0
678
+ 7
679
+ 1
680
+ 64
681
+ 49
682
+ 2
683
+ 1
684
+ 49
685
+ 3
686
+ 0
687
+ 5
688
+ 48
689
+ 4
690
+ 78
691
+ 85
692
+ 5
693
+ 49
694
+ 6
695
+ 1
696
+ 15
697
+ 5
698
+ 48
699
+ 0
700
+ 7
701
+ 1
702
+ 64
703
+ 49
704
+ 2
705
+ 1
706
+ 49
707
+ 7
708
+ 0
709
+ 7
710
+ 8
711
+ 64
712
+ 49
713
+ 9
714
+ 1
715
+ 5
716
+ 48
717
+ 10
718
+ 49
719
+ 6
720
+ 1
721
+ 11
722
+ I
723
+ 4
724
+ I
725
+ 0
726
+ I
727
+ 0
728
+ I
729
+ 0
730
+ I
731
+ -2
732
+ p
733
+ 11
734
+ x
735
+ 8
736
+ listings
737
+ s
738
+ 13
739
+ SellerListing
740
+ x
741
+ 2
742
+ []
743
+ x
744
+ 4
745
+ size
746
+ x
747
+ 2
748
+ be
749
+ x
750
+ 1
751
+ >
752
+ x
753
+ 6
754
+ should
755
+ x
756
+ 5
757
+ first
758
+ s
759
+ 5
760
+ Price
761
+ x
762
+ 8
763
+ has_key?
764
+ x
765
+ 7
766
+ be_true
767
+ p
768
+ 7
769
+ I
770
+ 0
771
+ I
772
+ 19
773
+ I
774
+ 0
775
+ I
776
+ 1a
777
+ I
778
+ 16
779
+ I
780
+ 1b
781
+ I
782
+ 2f
783
+ x
784
+ 69
785
+ /Users/snl/code/sucker/spec/integration/seller_listing_search_spec.rb
786
+ p
787
+ 0
788
+ p
789
+ 11
790
+ I
791
+ 0
792
+ I
793
+ 4
794
+ I
795
+ 0
796
+ I
797
+ 6
798
+ I
799
+ 19
800
+ I
801
+ 8
802
+ I
803
+ 23
804
+ I
805
+ 15
806
+ I
807
+ 2e
808
+ I
809
+ 19
810
+ I
811
+ 39
812
+ x
813
+ 69
814
+ /Users/snl/code/sucker/spec/integration/seller_listing_search_spec.rb
815
+ p
816
+ 0
817
+ x
818
+ 8
819
+ describe
820
+ p
821
+ 3
822
+ I
823
+ 2
824
+ I
825
+ 4
826
+ I
827
+ d
828
+ x
829
+ 69
830
+ /Users/snl/code/sucker/spec/integration/seller_listing_search_spec.rb
831
+ p
832
+ 0
833
+ x
834
+ 13
835
+ attach_method
836
+ p
837
+ 5
838
+ I
839
+ 0
840
+ I
841
+ 1
842
+ I
843
+ 9
844
+ I
845
+ 3
846
+ I
847
+ 25
848
+ x
849
+ 69
850
+ /Users/snl/code/sucker/spec/integration/seller_listing_search_spec.rb
851
+ p
852
+ 0