sucker 1.4.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/README.md +17 -54
  2. data/lib/sucker/hash.rb +1 -0
  3. data/lib/sucker/hash.rbc +26 -26
  4. data/lib/sucker/parameters.rb +4 -0
  5. data/lib/sucker/parameters.rbc +95 -30
  6. data/lib/sucker/request.rb +35 -12
  7. data/lib/sucker/request.rbc +420 -244
  8. data/lib/sucker/response.rb +3 -3
  9. data/lib/sucker/response.rbc +91 -65
  10. data/lib/sucker/version.rb +1 -1
  11. data/lib/sucker/version.rbc +1 -1
  12. data/lib/sucker.rb +1 -1
  13. data/spec/fixtures/cassette_library/cartcreate/e3e2f9b71afba67619a95c7178178595.yml +26 -0
  14. data/spec/fixtures/cassette_library/cartcreate/f8fe45cc6b78ac1aac675a8f76d5f7d9.yml +26 -0
  15. data/spec/fixtures/cassette_library/{0415246334.yml → itemlookup/0547439fa22ec1178508f61bc8fb1dfb.yml} +3 -3
  16. data/spec/fixtures/cassette_library/itemlookup/2656b1813249aff0d4febb01044962ff.yml +26 -0
  17. data/spec/fixtures/cassette_library/itemlookup/4908294851a4df13269707e9f6507f91.yml +26 -0
  18. data/spec/fixtures/cassette_library/itemlookup/49690856d2b9cb358fc505dc52862acf.yml +26 -0
  19. data/spec/fixtures/cassette_library/itemlookup/5670727fa0cb9f30464e41aa1346c91c.yml +26 -0
  20. data/spec/fixtures/cassette_library/{b000aspues.yml → itemlookup/67b3c825b2902b511412057442db6e91.yml} +3 -3
  21. data/spec/fixtures/cassette_library/itemlookup/6e6b1dc74378e2e1118713e254191fc0.yml +26 -0
  22. data/spec/fixtures/cassette_library/itemlookup/742f3458144935c0a3320be6e842a17c.yml +26 -0
  23. data/spec/fixtures/cassette_library/itemlookup/76f548183c2804a74d0ed7e0bfbd6d4a.yml +26 -0
  24. data/spec/fixtures/cassette_library/itemlookup/8286b763b726d3dc1fc992023e639b9b.yml +151 -0
  25. data/spec/fixtures/cassette_library/{816614024.yml → itemlookup/9853d1f8ae05d5501df4e4390c5abeae.yml} +18 -18
  26. data/spec/fixtures/cassette_library/itemlookup/9d82768fe80b09c4a3697c608e5edebe.yml +26 -0
  27. data/spec/fixtures/cassette_library/{482224816x.yml → itemlookup/b6c76ad93b17b86adb932b9b97c1f019.yml} +3 -3
  28. data/spec/fixtures/cassette_library/itemlookup/d3d6ea869d31173526f48907bff752a3.yml +26 -0
  29. data/spec/fixtures/cassette_library/itemlookup/d8ad346710c3b479febcf58e67fea7ef.yml +26 -0
  30. data/spec/fixtures/cassette_library/{0394751221.yml → itemlookup/e880c4cb3dd56cdfa2161a71fece15ac.yml} +3 -3
  31. data/spec/fixtures/cassette_library/itemsearch/1c4db6b83580a7498b87d7502c249307.yml +26 -0
  32. data/spec/fixtures/cassette_library/itemsearch/295b9eadfb69d55e1c0acb06220e0b6e.yml +26 -0
  33. data/spec/fixtures/cassette_library/itemsearch/30d2bff757af125e31b82c47380b98ba.yml +26 -0
  34. data/spec/fixtures/cassette_library/itemsearch/34098006ffbbd9570b2c2f9ce23df9f3.yml +26 -0
  35. data/spec/fixtures/cassette_library/itemsearch/4c1e50d070821f4eb9fe3961aba105ee.yml +26 -0
  36. data/spec/fixtures/cassette_library/itemsearch/5a15430433ab94c70466eb61c919a028.yml +26 -0
  37. data/spec/fixtures/cassette_library/itemsearch/8fd40b929a9ed46e2b38ac905c8ab53a.yml +26 -0
  38. data/spec/fixtures/cassette_library/itemsearch/e9a6659c2b464d7388c3831c6425a526.yml +26 -0
  39. data/spec/fixtures/cassette_library/sellerlistingsearch/6b38af058d6a0bda696f49de13cfd343.yml +26 -0
  40. data/spec/fixtures/cassette_library/{a2h6nh4sqyfz4m.yml → sellerlistingsearch/c92200a4bd3d6d9023fa6317a780589b.yml} +3 -3
  41. data/spec/fixtures/cassette_library/sellerlistingsearch/cb25caadce96ac3de70b69b76431d730.yml +26 -0
  42. data/spec/fixtures/cassette_library/sellerlistingsearch/e1261838e1754870ffd309dd78eb7374.yml +26 -0
  43. data/spec/fixtures/cassette_library/spec/sucker/request.yml +4 -4
  44. data/spec/fixtures/cassette_library/spec/sucker/response.yml +3 -3
  45. data/spec/sucker/request_spec.rb +35 -15
  46. data/spec/sucker/request_spec.rbc +660 -166
  47. data/spec/sucker/response_spec.rb +4 -4
  48. data/spec/sucker/response_spec.rbc +133 -269
  49. metadata +75 -36
  50. data/spec/fixtures/cassette_library/0679753354.yml +0 -26
  51. data/spec/fixtures/cassette_library/0816614024-0007218095.yml +0 -26
  52. data/spec/fixtures/cassette_library/0816614024-0143105825.yml +0 -26
  53. data/spec/fixtures/cassette_library/0816614024.yml +0 -26
  54. data/spec/fixtures/cassette_library/a2jyso6w6kep83.yml +0 -26
  55. data/spec/fixtures/cassette_library/author-lacan-or-deleuze-and-not-fiction.yml +0 -26
  56. data/spec/fixtures/cassette_library/deleuze-binding-kindle.yml +0 -26
  57. data/spec/fixtures/cassette_library/deleuze.yml +0 -26
  58. data/spec/fixtures/cassette_library/george-orwell.yml +0 -26
  59. data/spec/fixtures/cassette_library/offer-listing-id.yml +0 -26
@@ -9,15 +9,15 @@ module Sucker
9
9
  let(:asins) { ['0816614024', '0143105825'] }
10
10
 
11
11
  let(:response) do
12
- worker = Sucker.new(
12
+ request = Sucker.new(
13
13
  :locale => :us,
14
14
  :key => amazon['key'],
15
15
  :secret => amazon['secret'])
16
- worker << {
16
+ request << {
17
17
  'Operation' => 'ItemLookup',
18
18
  'IdType' => 'ASIN',
19
19
  'ItemId' => asins }
20
- worker.get
20
+ request.get
21
21
  end
22
22
 
23
23
  describe '.new' do
@@ -26,7 +26,7 @@ module Sucker
26
26
  end
27
27
 
28
28
  it 'initializes the response code' do
29
- response.code.should == '200'
29
+ response.code.should == 200
30
30
  end
31
31
  end
32
32