asin 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/.travis.yml +4 -6
  2. data/CHANGELOG.rdoc +10 -0
  3. data/Gemfile.lock +36 -26
  4. data/README.rdoc +11 -9
  5. data/asin.gemspec +13 -11
  6. data/lib/asin/client.rb +27 -7
  7. data/lib/asin/configuration.rb +52 -100
  8. data/lib/asin/version.rb +1 -1
  9. data/rakefile.rb +1 -7
  10. data/spec/browse_node_spec.rb +1 -3
  11. data/spec/cart_spec.rb +26 -36
  12. data/spec/cassettes/asin/asin_cart_with_an_existing_cart_should_add_items_to_a_cart.yml +68 -0
  13. data/spec/cassettes/asin/asin_cart_with_an_existing_cart_should_clear_a_cart.yml +66 -0
  14. data/spec/cassettes/asin/asin_cart_with_an_existing_cart_should_get_a_cart.yml +67 -0
  15. data/spec/cassettes/asin/asin_cart_with_an_existing_cart_should_update_a_cart.yml +70 -0
  16. data/spec/cassettes/{browse_node_599826.yml → asin/browse_node_should_lookup_a_browse_node.yml} +8 -8
  17. data/spec/cassettes/asin/cart_should_create_a_cart.yml +36 -0
  18. data/spec/cassettes/{lookup_1430218150_item_class.yml → asin/lookup_and_search_should_have_metadata.yml} +39 -21
  19. data/spec/cassettes/{lookup_1430218150.yml → asin/lookup_and_search_should_lookup_a_book.yml} +39 -21
  20. data/spec/cassettes/{lookup_multiple_asins.yml → asin/lookup_and_search_should_lookup_multiple_books.yml} +89 -71
  21. data/spec/cassettes/{lookup_1430218150_small_and_alternateversions.yml → asin/lookup_and_search_should_lookup_multiple_response_groups.yml} +7 -7
  22. data/spec/cassettes/{lookup_1430218150_rash.yml → asin/lookup_and_search_should_return_a_custom_item_class.yml} +39 -21
  23. data/spec/cassettes/{lookup_1430218150_medium.yml → asin/lookup_and_search_should_return_a_mash_value.yml} +39 -21
  24. data/spec/cassettes/{lookup_1430218150_mash.yml → asin/lookup_and_search_should_return_a_rash_value.yml} +39 -21
  25. data/spec/cassettes/asin/lookup_and_search_should_return_a_raw_value.yml +81 -0
  26. data/spec/cassettes/asin/lookup_and_search_should_search_keywords_a_book_with_fulltext.yml +538 -0
  27. data/spec/cassettes/{search_keywords_single_result.yml → asin/lookup_and_search_should_search_keywords_and_handle_a_single_result.yml} +19 -19
  28. data/spec/cassettes/{search_keywords_index_music.yml → asin/lookup_and_search_should_search_keywords_never_mind_music.yml} +62 -59
  29. data/spec/cassettes/asin/lookup_and_search_should_search_music.yml +37 -0
  30. data/spec/cassettes/{search_keywords_key_index_music.yml → asin/lookup_and_search_should_search_never_mind_music.yml} +76 -67
  31. data/spec/cassettes/asin/similarity_should_find_similar_items.yml +618 -0
  32. data/spec/cassettes/asin/similarity_should_find_similar_items_for_multiple_asins_and_different_config.yml +58 -0
  33. data/spec/cassettes/asin/similarity_should_lookup_for_similar_items.yml +618 -0
  34. data/spec/config_spec.rb +2 -7
  35. data/spec/search_spec.rb +60 -87
  36. data/spec/similarity_spec.rb +23 -0
  37. data/spec/spec_helper.rb +19 -6
  38. metadata +158 -137
  39. data/spec/cassettes/add_items1430216263.yml +0 -67
  40. data/spec/cassettes/clear_cart.yml +0 -65
  41. data/spec/cassettes/create_cart_with_asin_1430218150_and_other_asin_1430216263.yml +0 -36
  42. data/spec/cassettes/get_cart.yml +0 -67
  43. data/spec/cassettes/lookup_1430218150_raw.yml +0 -63
  44. data/spec/cassettes/search_index_music.yml +0 -32
  45. data/spec/cassettes/search_keywords.yml +0 -479
  46. data/spec/cassettes/update_items.yml +0 -70
@@ -4,16 +4,11 @@ module ASIN
4
4
  describe ASIN do
5
5
  context "configuration" do
6
6
  it "should fail without secret and key" do
7
- lambda { @helper.lookup 'bla' }.should raise_error(RuntimeError, "you have to configure ASIN: 'configure :secret => 'your-secret', :key => 'your-key'")
8
- end
9
-
10
- it "should fail with configuration key set to nil" do
11
- @helper.configure :secret => @secret, :key => @key, :associate_tag => nil
12
- lambda { @helper.lookup 'bla' }.should raise_error(RuntimeError, "nil is not a valid value for associate_tag")
7
+ expect { @helper.lookup 'bla' }.should raise_error(ArgumentError, "you are missing mandatory configuration options. please set [:secret, :key]")
13
8
  end
14
9
 
15
10
  it "should fail with wrong configuration key" do
16
- lambda { @helper.configure :wrong => 'key' }.should raise_error(NoMethodError)
11
+ lambda { @helper.configure :wrong => 'key' }.should raise_error(ArgumentError)
17
12
  end
18
13
 
19
14
  it "should not override the configuration" do
@@ -7,121 +7,94 @@ module ASIN
7
7
  @helper.configure :secret => @secret, :key => @key
8
8
  end
9
9
 
10
- it "should lookup a book" do
11
- VCR.use_cassette("lookup_#{ANY_ASIN}", :match_requests_on => [:host, :path]) do
12
- items = @helper.lookup(ANY_ASIN)
13
- items.first.title.should =~ /Learn Objective/
14
- end
10
+ it "should lookup a book", :vcr do
11
+ items = @helper.lookup(ANY_ASIN)
12
+ items.first.title.should =~ /Learn Objective/
15
13
  end
16
14
 
17
- it "should have metadata" do
18
- VCR.use_cassette("lookup_#{ANY_ASIN}_medium", :match_requests_on => [:host, :path]) do
19
- items = @helper.lookup(ANY_ASIN, :ResponseGroup => :Medium)
20
- item = items.first
21
- item.asin.should eql(ANY_ASIN)
22
- item.title.should =~ /Learn Objective/
23
- item.amount.should eql(3999)
24
- item.details_url.should eql('http://www.amazon.com/Learn-Objective-C-Mac-Mark-Dalrymple/dp/1430218150%3FSubscriptionId%3DAKIAJFA5X7RTOKFNPVZQ%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1430218150')
25
- item.image_url.should eql('http://ecx.images-amazon.com/images/I/41kq5bDvnUL.jpg')
26
- item.review.should =~ /Learn Objective-C on the Macintosh/
27
- end
15
+ it "should have metadata", :vcr do
16
+ items = @helper.lookup(ANY_ASIN, :ResponseGroup => :Medium)
17
+ item = items.first
18
+ item.asin.should eql(ANY_ASIN)
19
+ item.title.should =~ /Learn Objective/
20
+ item.amount.should eql(3999)
21
+ item.details_url.should eql('http://www.amazon.com/Learn-Objective-C-Mac-Mark-Dalrymple/dp/1430218150%3FSubscriptionId%3DAKIAJFA5X7RTOKFNPVZQ%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1430218150')
22
+ item.image_url.should eql('http://ecx.images-amazon.com/images/I/41kq5bDvnUL._SL500_.jpg')
23
+ item.review.should =~ /Take your coding skills to the next level/
28
24
  end
29
25
 
30
- it "should lookup multiple response groups" do
31
- VCR.use_cassette("lookup_#{ANY_ASIN}_small_and_alternateversions", :match_requests_on => [:host, :path]) do
32
- items = @helper.lookup(ANY_ASIN, :ResponseGroup => [:Small, :AlternateVersions])
26
+ it "should lookup multiple response groups", :vcr do
27
+ items = @helper.lookup(ANY_ASIN, :ResponseGroup => [:Small, :AlternateVersions])
33
28
 
34
- item = items.first
35
- item.asin.should eql(ANY_ASIN)
36
- item.title.should =~ /Learn Objective/
37
- item.raw.include?("AlternateVersions").should eql(true)
38
- item.raw["AlternateVersions"].length.should eql(1)
39
- item.raw["AlternateVersions"]["AlternateVersion"]["Binding"].should eql("Kindle Edition")
40
- end
29
+ item = items.first
30
+ item.asin.should eql(ANY_ASIN)
31
+ item.title.should =~ /Learn Objective/
32
+ item.raw.include?("AlternateVersions").should eql(true)
33
+ item.raw["AlternateVersions"].length.should eql(1)
34
+ item.raw["AlternateVersions"]["AlternateVersion"]["Binding"].should eql("Kindle Edition")
41
35
  end
42
36
 
43
- it "should lookup multiple books" do
44
- VCR.use_cassette("lookup_multiple_asins", :match_requests_on => [:host, :path]) do
45
- items = @helper.lookup(ANY_ASIN, ANY_OTHER_ASIN)
37
+ it "should lookup multiple books", :vcr do
38
+ items = @helper.lookup(ANY_ASIN, ANY_OTHER_ASIN)
46
39
 
47
- items.first.title.should =~ /Learn Objective/
48
- items.last.title.should =~ /Beginning iPhone Development/
49
- end
40
+ items.last.title.should =~ /Learn Objective/
41
+ items.first.title.should =~ /Beginning iPhone Development/
50
42
  end
51
43
 
52
- it "should return a custom item class" do
53
- VCR.use_cassette("lookup_#{ANY_ASIN}_item_class", :match_requests_on => [:host, :path]) do
54
- module TEST
55
- class TestItem
56
- attr_accessor :testo
57
- def initialize(hash)
58
- @testo = hash
59
- end
44
+ it "should return a custom item class", :vcr do
45
+ module TEST
46
+ class TestItem
47
+ attr_accessor :testo
48
+ def initialize(hash)
49
+ @testo = hash
60
50
  end
61
51
  end
62
- @helper.configure :item_type => TEST::TestItem
63
- @helper.lookup(ANY_ASIN).first.testo.should_not be_nil
64
52
  end
53
+ @helper.configure :item_type => TEST::TestItem
54
+ @helper.lookup(ANY_ASIN).first.testo.should_not be_nil
65
55
  end
66
56
 
67
- it "should return a raw value" do
68
- VCR.use_cassette("lookup_#{ANY_ASIN}_raw", :match_requests_on => [:host, :path]) do
69
- @helper.configure :item_type => :raw
70
- @helper.lookup(ANY_ASIN).first['ItemAttributes']['Title'].should_not be_nil
71
- end
57
+ it "should return a raw value", :vcr do
58
+ @helper.configure :item_type => :raw
59
+ @helper.lookup(ANY_ASIN).first['ItemAttributes']['Title'].should_not be_nil
72
60
  end
73
61
 
74
- it "should return a mash value" do
75
- VCR.use_cassette("lookup_#{ANY_ASIN}_mash", :match_requests_on => [:host, :path]) do
76
- @helper.configure :item_type => :mash
77
- @helper.lookup(ANY_ASIN).first.ItemAttributes.Title.should_not be_nil
78
- end
62
+ it "should return a mash value", :vcr do
63
+ @helper.configure :item_type => :mash
64
+ @helper.lookup(ANY_ASIN).first.ItemAttributes.Title.should_not be_nil
79
65
  end
80
66
 
81
- it "should return a rash value" do
82
- VCR.use_cassette("lookup_#{ANY_ASIN}_rash", :match_requests_on => [:host, :path]) do
83
- @helper.configure :item_type => :rash
84
- @helper.lookup(ANY_ASIN).first.item_attributes.title.should_not be_nil
85
- end
86
- end
87
-
88
- it "should search_keywords and handle a single result" do
89
- VCR.use_cassette("search_keywords_single_result", :match_requests_on => [:host, :path]) do
90
- items = @helper.search_keywords('0471317519')
91
- items.first.title.should =~ /A Self-Teaching Guide/
92
- end
67
+ it "should return a rash value", :vcr do
68
+ @helper.configure :item_type => :rash
69
+ @helper.lookup(ANY_ASIN).first.item_attributes.title.should_not be_nil
93
70
  end
94
71
 
95
- it "should search_keywords a book with fulltext" do
96
- VCR.use_cassette("search_keywords", :match_requests_on => [:host, :path]) do
97
- items = @helper.search_keywords 'Learn', 'Objective-C'
98
- items.should have(10).things
99
- items.first.title.should =~ /Learn Objective/
100
- end
72
+ it "should search_keywords and handle a single result", :vcr do
73
+ items = @helper.search_keywords('0471317519')
74
+ items.first.title.should =~ /A Self-Teaching Guide/
101
75
  end
102
76
 
103
- it "should search_keywords never mind music" do
104
- VCR.use_cassette("search_keywords_index_music", :match_requests_on => [:host, :path]) do
105
- items = @helper.search_keywords 'nirvana', 'never mind', :SearchIndex => :Music
106
- items.should have(10).things
107
- items.first.title.should =~ /Nevermind/
108
- end
77
+ it "should search_keywords a book with fulltext", :vcr do
78
+ items = @helper.search_keywords 'Learn', 'Objective-C'
79
+ items.should have(10).things
80
+ items.first.title.should =~ /Programming in Objective-C/
109
81
  end
110
82
 
111
- it "should search music" do
112
- VCR.use_cassette("search_index_music", :match_requests_on => [:host, :path]) do
113
- items = @helper.search :SearchIndex => :Music
114
- items.should have(0).things
115
- end
83
+ it "should search_keywords never mind music", :vcr do
84
+ items = @helper.search_keywords 'nirvana', 'never mind', :SearchIndex => :Music
85
+ items.should have(10).things
86
+ items.map(&:title).join.should =~ /Nevermind/
116
87
  end
117
88
 
118
- it "should search never mind music" do
119
- VCR.use_cassette("search_keywords_key_index_music", :match_requests_on => [:host, :path]) do
120
- items = @helper.search :Keywords => 'nirvana', :SearchIndex => :Music
121
- items.should have(10).things
89
+ it "should search music", :vcr do
90
+ items = @helper.search :SearchIndex => :Music
91
+ items.should have(0).things
92
+ end
122
93
 
123
- items.first.title.should =~ /Nevermind/
124
- end
94
+ it "should search never mind music", :vcr do
95
+ items = @helper.search :Keywords => 'nirvana', :SearchIndex => :Music
96
+ items.should have(10).things
97
+ items.map(&:title).join.should =~ /Nevermind/
125
98
  end
126
99
  end
127
100
  end
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+
3
+ module ASIN
4
+ describe ASIN do
5
+ context "similarity" do
6
+ before do
7
+ @helper.configure :secret => @secret, :key => @key
8
+ end
9
+
10
+ it "should find similar items", :vcr do
11
+ items = @helper.similar(ANY_ASIN)
12
+ items.should have(10).elements
13
+ items.first.title.should =~ /Learn C on the Mac/
14
+ end
15
+
16
+ it "should find similar items for multiple asins and different config", :vcr do
17
+ items = @helper.similar(ANY_ASIN, ANY_OTHER_ASIN, :SimilarityType => :Intersection, :ResponseGroup => :Small)
18
+ items.should have(2).elements
19
+ items.first.title.should =~ /Beginning iPhone 4 Development/
20
+ end
21
+ end
22
+ end
23
+ end
@@ -1,9 +1,14 @@
1
- $:.unshift File.join(File.dirname(__FILE__),'..','..','lib')
1
+ # WORKAROUND (ps) for http://travis-ci.org/#!/phoet/asin/jobs/1794039
2
+ require "net/http"
3
+ unless Net.const_defined? :HTTPSession
4
+ puts "monkeypatching Net::HTTPSession"
5
+ class Net::HTTPSession < Net::HTTP::HTTPSession; end
6
+ end
2
7
 
3
8
  require 'rspec'
4
9
  require 'asin'
5
10
  require 'asin/client' # is somehow needed for jruby
6
- require 'pp'
11
+ require 'pry'
7
12
  require 'httpclient'
8
13
  require 'vcr'
9
14
  require 'httpi'
@@ -20,12 +25,20 @@ ANY_BROWSE_NODE_ID = '599826'
20
25
 
21
26
  RSpec.configure do |config|
22
27
  config.mock_with :rspec
23
- config.extend VCR::RSpec::Macros
24
-
28
+
29
+ # https://gist.github.com/1212530
30
+ config.treat_symbols_as_metadata_keys_with_true_values = true
31
+ config.around(:each, :vcr => true) do |example|
32
+ name = example.metadata[:full_description].downcase.gsub(/\W+/, "_").split("_", 2).join("/")
33
+ VCR.use_cassette(name, :record => :new_episodes, :match_requests_on => [:host, :path]) do
34
+ example.call
35
+ end
36
+ end
37
+
25
38
  config.before :each do
26
39
  HTTPI.log = false
27
-
28
- ASIN::Configuration.reset
40
+
41
+ ASIN::Configuration.reset!
29
42
  @helper = ASIN::Client.instance
30
43
  @helper.configure :logger => nil
31
44
 
metadata CHANGED
@@ -1,138 +1,155 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: asin
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.0
4
5
  prerelease:
5
- version: 0.7.0
6
6
  platform: ruby
7
- authors:
8
- - "Peter Schr\xC3\xB6der"
7
+ authors:
8
+ - Peter Schröder
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-09-16 00:00:00 +02:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2012-08-02 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: crack
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70302146031160 !ruby/object:Gem::Requirement
20
17
  none: false
21
- requirements:
18
+ requirements:
22
19
  - - ~>
23
- - !ruby/object:Gem::Version
24
- version: "0.1"
20
+ - !ruby/object:Gem::Version
21
+ version: '0.3'
25
22
  type: :runtime
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: hashie
29
23
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70302146031160
25
+ - !ruby/object:Gem::Dependency
26
+ name: hashie
27
+ requirement: &70302146030660 !ruby/object:Gem::Requirement
31
28
  none: false
32
- requirements:
29
+ requirements:
33
30
  - - ~>
34
- - !ruby/object:Gem::Version
35
- version: "1.0"
31
+ - !ruby/object:Gem::Version
32
+ version: '1.1'
36
33
  type: :runtime
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
34
+ prerelease: false
35
+ version_requirements: *70302146030660
36
+ - !ruby/object:Gem::Dependency
39
37
  name: httpi
38
+ requirement: &70302146030200 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: '0.9'
44
+ type: :runtime
40
45
  prerelease: false
41
- requirement: &id003 !ruby/object:Gem::Requirement
46
+ version_requirements: *70302146030200
47
+ - !ruby/object:Gem::Dependency
48
+ name: confiture
49
+ requirement: &70302146029740 !ruby/object:Gem::Requirement
42
50
  none: false
43
- requirements:
51
+ requirements:
44
52
  - - ~>
45
- - !ruby/object:Gem::Version
46
- version: "0.9"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.1'
47
55
  type: :runtime
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
50
- name: httpclient
51
56
  prerelease: false
52
- requirement: &id004 !ruby/object:Gem::Requirement
57
+ version_requirements: *70302146029740
58
+ - !ruby/object:Gem::Dependency
59
+ name: httpclient
60
+ requirement: &70302146029260 !ruby/object:Gem::Requirement
53
61
  none: false
54
- requirements:
62
+ requirements:
55
63
  - - ~>
56
- - !ruby/object:Gem::Version
57
- version: "2.2"
64
+ - !ruby/object:Gem::Version
65
+ version: 2.2.3
58
66
  type: :development
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
61
- name: rash
62
67
  prerelease: false
63
- requirement: &id005 !ruby/object:Gem::Requirement
68
+ version_requirements: *70302146029260
69
+ - !ruby/object:Gem::Dependency
70
+ name: rash
71
+ requirement: &70302146028800 !ruby/object:Gem::Requirement
64
72
  none: false
65
- requirements:
73
+ requirements:
66
74
  - - ~>
67
- - !ruby/object:Gem::Version
68
- version: "0.3"
75
+ - !ruby/object:Gem::Version
76
+ version: 0.3.1
69
77
  type: :development
70
- version_requirements: *id005
71
- - !ruby/object:Gem::Dependency
72
- name: rake
73
78
  prerelease: false
74
- requirement: &id006 !ruby/object:Gem::Requirement
79
+ version_requirements: *70302146028800
80
+ - !ruby/object:Gem::Dependency
81
+ name: rake
82
+ requirement: &70302146028340 !ruby/object:Gem::Requirement
75
83
  none: false
76
- requirements:
84
+ requirements:
77
85
  - - ~>
78
- - !ruby/object:Gem::Version
79
- version: "0.9"
86
+ - !ruby/object:Gem::Version
87
+ version: 0.9.2.2
80
88
  type: :development
81
- version_requirements: *id006
82
- - !ruby/object:Gem::Dependency
83
- name: vcr
84
89
  prerelease: false
85
- requirement: &id007 !ruby/object:Gem::Requirement
90
+ version_requirements: *70302146028340
91
+ - !ruby/object:Gem::Dependency
92
+ name: vcr
93
+ requirement: &70302146027880 !ruby/object:Gem::Requirement
86
94
  none: false
87
- requirements:
95
+ requirements:
88
96
  - - ~>
89
- - !ruby/object:Gem::Version
90
- version: "1.10"
97
+ - !ruby/object:Gem::Version
98
+ version: 1.11.3
91
99
  type: :development
92
- version_requirements: *id007
93
- - !ruby/object:Gem::Dependency
94
- name: webmock
95
100
  prerelease: false
96
- requirement: &id008 !ruby/object:Gem::Requirement
101
+ version_requirements: *70302146027880
102
+ - !ruby/object:Gem::Dependency
103
+ name: webmock
104
+ requirement: &70302146043800 !ruby/object:Gem::Requirement
97
105
  none: false
98
- requirements:
106
+ requirements:
99
107
  - - ~>
100
- - !ruby/object:Gem::Version
101
- version: "1.6"
108
+ - !ruby/object:Gem::Version
109
+ version: 1.8.7
102
110
  type: :development
103
- version_requirements: *id008
104
- - !ruby/object:Gem::Dependency
105
- name: rspec
106
111
  prerelease: false
107
- requirement: &id009 !ruby/object:Gem::Requirement
112
+ version_requirements: *70302146043800
113
+ - !ruby/object:Gem::Dependency
114
+ name: rspec
115
+ requirement: &70302146043340 !ruby/object:Gem::Requirement
108
116
  none: false
109
- requirements:
117
+ requirements:
110
118
  - - ~>
111
- - !ruby/object:Gem::Version
112
- version: "2.6"
119
+ - !ruby/object:Gem::Version
120
+ version: 2.7.0
113
121
  type: :development
114
- version_requirements: *id009
115
- - !ruby/object:Gem::Dependency
122
+ prerelease: false
123
+ version_requirements: *70302146043340
124
+ - !ruby/object:Gem::Dependency
116
125
  name: fuubar
126
+ requirement: &70302146042880 !ruby/object:Gem::Requirement
127
+ none: false
128
+ requirements:
129
+ - - ~>
130
+ - !ruby/object:Gem::Version
131
+ version: 0.0.5
132
+ type: :development
117
133
  prerelease: false
118
- requirement: &id010 !ruby/object:Gem::Requirement
134
+ version_requirements: *70302146042880
135
+ - !ruby/object:Gem::Dependency
136
+ name: pry
137
+ requirement: &70302146042420 !ruby/object:Gem::Requirement
119
138
  none: false
120
- requirements:
139
+ requirements:
121
140
  - - ~>
122
- - !ruby/object:Gem::Version
123
- version: "0.0"
141
+ - !ruby/object:Gem::Version
142
+ version: 0.9.9
124
143
  type: :development
125
- version_requirements: *id010
144
+ prerelease: false
145
+ version_requirements: *70302146042420
126
146
  description: Amazon Simple INterface.
127
- email:
147
+ email:
128
148
  - phoetmail@googlemail.com
129
149
  executables: []
130
-
131
150
  extensions: []
132
-
133
151
  extra_rdoc_files: []
134
-
135
- files:
152
+ files:
136
153
  - .document
137
154
  - .gitignore
138
155
  - .rvmrc
@@ -153,79 +170,83 @@ files:
153
170
  - spec/asin.yml
154
171
  - spec/browse_node_spec.rb
155
172
  - spec/cart_spec.rb
156
- - spec/cassettes/add_items1430216263.yml
157
- - spec/cassettes/browse_node_599826.yml
158
- - spec/cassettes/clear_cart.yml
159
- - spec/cassettes/create_cart_with_asin_1430218150_and_other_asin_1430216263.yml
160
- - spec/cassettes/get_cart.yml
161
- - spec/cassettes/lookup_1430218150.yml
162
- - spec/cassettes/lookup_1430218150_item_class.yml
163
- - spec/cassettes/lookup_1430218150_mash.yml
164
- - spec/cassettes/lookup_1430218150_medium.yml
165
- - spec/cassettes/lookup_1430218150_rash.yml
166
- - spec/cassettes/lookup_1430218150_raw.yml
167
- - spec/cassettes/lookup_1430218150_small_and_alternateversions.yml
168
- - spec/cassettes/lookup_multiple_asins.yml
169
- - spec/cassettes/search_index_music.yml
170
- - spec/cassettes/search_keywords.yml
171
- - spec/cassettes/search_keywords_index_music.yml
172
- - spec/cassettes/search_keywords_key_index_music.yml
173
- - spec/cassettes/search_keywords_single_result.yml
174
- - spec/cassettes/update_items.yml
173
+ - spec/cassettes/asin/asin_cart_with_an_existing_cart_should_add_items_to_a_cart.yml
174
+ - spec/cassettes/asin/asin_cart_with_an_existing_cart_should_clear_a_cart.yml
175
+ - spec/cassettes/asin/asin_cart_with_an_existing_cart_should_get_a_cart.yml
176
+ - spec/cassettes/asin/asin_cart_with_an_existing_cart_should_update_a_cart.yml
177
+ - spec/cassettes/asin/browse_node_should_lookup_a_browse_node.yml
178
+ - spec/cassettes/asin/cart_should_create_a_cart.yml
179
+ - spec/cassettes/asin/lookup_and_search_should_have_metadata.yml
180
+ - spec/cassettes/asin/lookup_and_search_should_lookup_a_book.yml
181
+ - spec/cassettes/asin/lookup_and_search_should_lookup_multiple_books.yml
182
+ - spec/cassettes/asin/lookup_and_search_should_lookup_multiple_response_groups.yml
183
+ - spec/cassettes/asin/lookup_and_search_should_return_a_custom_item_class.yml
184
+ - spec/cassettes/asin/lookup_and_search_should_return_a_mash_value.yml
185
+ - spec/cassettes/asin/lookup_and_search_should_return_a_rash_value.yml
186
+ - spec/cassettes/asin/lookup_and_search_should_return_a_raw_value.yml
187
+ - spec/cassettes/asin/lookup_and_search_should_search_keywords_a_book_with_fulltext.yml
188
+ - spec/cassettes/asin/lookup_and_search_should_search_keywords_and_handle_a_single_result.yml
189
+ - spec/cassettes/asin/lookup_and_search_should_search_keywords_never_mind_music.yml
190
+ - spec/cassettes/asin/lookup_and_search_should_search_music.yml
191
+ - spec/cassettes/asin/lookup_and_search_should_search_never_mind_music.yml
192
+ - spec/cassettes/asin/similarity_should_find_similar_items.yml
193
+ - spec/cassettes/asin/similarity_should_find_similar_items_for_multiple_asins_and_different_config.yml
194
+ - spec/cassettes/asin/similarity_should_lookup_for_similar_items.yml
175
195
  - spec/config_spec.rb
176
196
  - spec/search_spec.rb
197
+ - spec/similarity_spec.rb
177
198
  - spec/spec_helper.rb
178
- has_rdoc: true
179
199
  homepage: http://github.com/phoet/asin
180
200
  licenses: []
181
-
182
201
  post_install_message:
183
202
  rdoc_options: []
184
-
185
- require_paths:
203
+ require_paths:
186
204
  - lib
187
- required_ruby_version: !ruby/object:Gem::Requirement
205
+ required_ruby_version: !ruby/object:Gem::Requirement
188
206
  none: false
189
- requirements:
190
- - - ">="
191
- - !ruby/object:Gem::Version
192
- version: "0"
193
- required_rubygems_version: !ruby/object:Gem::Requirement
207
+ requirements:
208
+ - - ! '>='
209
+ - !ruby/object:Gem::Version
210
+ version: '0'
211
+ required_rubygems_version: !ruby/object:Gem::Requirement
194
212
  none: false
195
- requirements:
196
- - - ">="
197
- - !ruby/object:Gem::Version
198
- version: "0"
213
+ requirements:
214
+ - - ! '>='
215
+ - !ruby/object:Gem::Version
216
+ version: '0'
199
217
  requirements: []
200
-
201
218
  rubyforge_project: asin
202
- rubygems_version: 1.6.2
219
+ rubygems_version: 1.8.17
203
220
  signing_key:
204
221
  specification_version: 3
205
222
  summary: Simple interface to AWS Lookup, Search and Cart operations.
206
- test_files:
223
+ test_files:
207
224
  - spec/asin.yml
208
225
  - spec/browse_node_spec.rb
209
226
  - spec/cart_spec.rb
210
- - spec/cassettes/add_items1430216263.yml
211
- - spec/cassettes/browse_node_599826.yml
212
- - spec/cassettes/clear_cart.yml
213
- - spec/cassettes/create_cart_with_asin_1430218150_and_other_asin_1430216263.yml
214
- - spec/cassettes/get_cart.yml
215
- - spec/cassettes/lookup_1430218150.yml
216
- - spec/cassettes/lookup_1430218150_item_class.yml
217
- - spec/cassettes/lookup_1430218150_mash.yml
218
- - spec/cassettes/lookup_1430218150_medium.yml
219
- - spec/cassettes/lookup_1430218150_rash.yml
220
- - spec/cassettes/lookup_1430218150_raw.yml
221
- - spec/cassettes/lookup_1430218150_small_and_alternateversions.yml
222
- - spec/cassettes/lookup_multiple_asins.yml
223
- - spec/cassettes/search_index_music.yml
224
- - spec/cassettes/search_keywords.yml
225
- - spec/cassettes/search_keywords_index_music.yml
226
- - spec/cassettes/search_keywords_key_index_music.yml
227
- - spec/cassettes/search_keywords_single_result.yml
228
- - spec/cassettes/update_items.yml
227
+ - spec/cassettes/asin/asin_cart_with_an_existing_cart_should_add_items_to_a_cart.yml
228
+ - spec/cassettes/asin/asin_cart_with_an_existing_cart_should_clear_a_cart.yml
229
+ - spec/cassettes/asin/asin_cart_with_an_existing_cart_should_get_a_cart.yml
230
+ - spec/cassettes/asin/asin_cart_with_an_existing_cart_should_update_a_cart.yml
231
+ - spec/cassettes/asin/browse_node_should_lookup_a_browse_node.yml
232
+ - spec/cassettes/asin/cart_should_create_a_cart.yml
233
+ - spec/cassettes/asin/lookup_and_search_should_have_metadata.yml
234
+ - spec/cassettes/asin/lookup_and_search_should_lookup_a_book.yml
235
+ - spec/cassettes/asin/lookup_and_search_should_lookup_multiple_books.yml
236
+ - spec/cassettes/asin/lookup_and_search_should_lookup_multiple_response_groups.yml
237
+ - spec/cassettes/asin/lookup_and_search_should_return_a_custom_item_class.yml
238
+ - spec/cassettes/asin/lookup_and_search_should_return_a_mash_value.yml
239
+ - spec/cassettes/asin/lookup_and_search_should_return_a_rash_value.yml
240
+ - spec/cassettes/asin/lookup_and_search_should_return_a_raw_value.yml
241
+ - spec/cassettes/asin/lookup_and_search_should_search_keywords_a_book_with_fulltext.yml
242
+ - spec/cassettes/asin/lookup_and_search_should_search_keywords_and_handle_a_single_result.yml
243
+ - spec/cassettes/asin/lookup_and_search_should_search_keywords_never_mind_music.yml
244
+ - spec/cassettes/asin/lookup_and_search_should_search_music.yml
245
+ - spec/cassettes/asin/lookup_and_search_should_search_never_mind_music.yml
246
+ - spec/cassettes/asin/similarity_should_find_similar_items.yml
247
+ - spec/cassettes/asin/similarity_should_find_similar_items_for_multiple_asins_and_different_config.yml
248
+ - spec/cassettes/asin/similarity_should_lookup_for_similar_items.yml
229
249
  - spec/config_spec.rb
230
250
  - spec/search_spec.rb
251
+ - spec/similarity_spec.rb
231
252
  - spec/spec_helper.rb