asin 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +4 -6
- data/CHANGELOG.rdoc +10 -0
- data/Gemfile.lock +36 -26
- data/README.rdoc +11 -9
- data/asin.gemspec +13 -11
- data/lib/asin/client.rb +27 -7
- data/lib/asin/configuration.rb +52 -100
- data/lib/asin/version.rb +1 -1
- data/rakefile.rb +1 -7
- data/spec/browse_node_spec.rb +1 -3
- data/spec/cart_spec.rb +26 -36
- data/spec/cassettes/asin/asin_cart_with_an_existing_cart_should_add_items_to_a_cart.yml +68 -0
- data/spec/cassettes/asin/asin_cart_with_an_existing_cart_should_clear_a_cart.yml +66 -0
- data/spec/cassettes/asin/asin_cart_with_an_existing_cart_should_get_a_cart.yml +67 -0
- data/spec/cassettes/asin/asin_cart_with_an_existing_cart_should_update_a_cart.yml +70 -0
- data/spec/cassettes/{browse_node_599826.yml → asin/browse_node_should_lookup_a_browse_node.yml} +8 -8
- data/spec/cassettes/asin/cart_should_create_a_cart.yml +36 -0
- data/spec/cassettes/{lookup_1430218150_item_class.yml → asin/lookup_and_search_should_have_metadata.yml} +39 -21
- data/spec/cassettes/{lookup_1430218150.yml → asin/lookup_and_search_should_lookup_a_book.yml} +39 -21
- data/spec/cassettes/{lookup_multiple_asins.yml → asin/lookup_and_search_should_lookup_multiple_books.yml} +89 -71
- data/spec/cassettes/{lookup_1430218150_small_and_alternateversions.yml → asin/lookup_and_search_should_lookup_multiple_response_groups.yml} +7 -7
- data/spec/cassettes/{lookup_1430218150_rash.yml → asin/lookup_and_search_should_return_a_custom_item_class.yml} +39 -21
- data/spec/cassettes/{lookup_1430218150_medium.yml → asin/lookup_and_search_should_return_a_mash_value.yml} +39 -21
- data/spec/cassettes/{lookup_1430218150_mash.yml → asin/lookup_and_search_should_return_a_rash_value.yml} +39 -21
- data/spec/cassettes/asin/lookup_and_search_should_return_a_raw_value.yml +81 -0
- data/spec/cassettes/asin/lookup_and_search_should_search_keywords_a_book_with_fulltext.yml +538 -0
- data/spec/cassettes/{search_keywords_single_result.yml → asin/lookup_and_search_should_search_keywords_and_handle_a_single_result.yml} +19 -19
- data/spec/cassettes/{search_keywords_index_music.yml → asin/lookup_and_search_should_search_keywords_never_mind_music.yml} +62 -59
- data/spec/cassettes/asin/lookup_and_search_should_search_music.yml +37 -0
- data/spec/cassettes/{search_keywords_key_index_music.yml → asin/lookup_and_search_should_search_never_mind_music.yml} +76 -67
- data/spec/cassettes/asin/similarity_should_find_similar_items.yml +618 -0
- data/spec/cassettes/asin/similarity_should_find_similar_items_for_multiple_asins_and_different_config.yml +58 -0
- data/spec/cassettes/asin/similarity_should_lookup_for_similar_items.yml +618 -0
- data/spec/config_spec.rb +2 -7
- data/spec/search_spec.rb +60 -87
- data/spec/similarity_spec.rb +23 -0
- data/spec/spec_helper.rb +19 -6
- metadata +158 -137
- data/spec/cassettes/add_items1430216263.yml +0 -67
- data/spec/cassettes/clear_cart.yml +0 -65
- data/spec/cassettes/create_cart_with_asin_1430218150_and_other_asin_1430216263.yml +0 -36
- data/spec/cassettes/get_cart.yml +0 -67
- data/spec/cassettes/lookup_1430218150_raw.yml +0 -63
- data/spec/cassettes/search_index_music.yml +0 -32
- data/spec/cassettes/search_keywords.yml +0 -479
- data/spec/cassettes/update_items.yml +0 -70
data/spec/config_spec.rb
CHANGED
@@ -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
|
-
|
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(
|
11
|
+
lambda { @helper.configure :wrong => 'key' }.should raise_error(ArgumentError)
|
17
12
|
end
|
18
13
|
|
19
14
|
it "should not override the configuration" do
|
data/spec/search_spec.rb
CHANGED
@@ -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
|
-
|
12
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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
|
-
|
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
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
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
|
-
|
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
|
-
|
48
|
-
|
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
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
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
|
-
|
69
|
-
|
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
|
-
|
76
|
-
|
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
|
-
|
83
|
-
|
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
|
96
|
-
|
97
|
-
|
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
|
104
|
-
|
105
|
-
|
106
|
-
|
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
|
112
|
-
|
113
|
-
|
114
|
-
|
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
|
119
|
-
|
120
|
-
|
121
|
-
|
89
|
+
it "should search music", :vcr do
|
90
|
+
items = @helper.search :SearchIndex => :Music
|
91
|
+
items.should have(0).things
|
92
|
+
end
|
122
93
|
|
123
|
-
|
124
|
-
|
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
|
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
-
|
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 '
|
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
|
-
|
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
|
-
-
|
7
|
+
authors:
|
8
|
+
- Peter Schröder
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
-
|
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:
|
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
|
-
|
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:
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.1'
|
36
33
|
type: :runtime
|
37
|
-
|
38
|
-
|
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
|
-
|
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:
|
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
|
-
|
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:
|
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
|
-
|
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:
|
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
|
-
|
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:
|
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
|
-
|
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:
|
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
|
-
|
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:
|
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
|
-
|
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:
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: 2.7.0
|
113
121
|
type: :development
|
114
|
-
|
115
|
-
|
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
|
-
|
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:
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: 0.9.9
|
124
143
|
type: :development
|
125
|
-
|
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/
|
157
|
-
- spec/cassettes/
|
158
|
-
- spec/cassettes/
|
159
|
-
- spec/cassettes/
|
160
|
-
- spec/cassettes/
|
161
|
-
- spec/cassettes/
|
162
|
-
- spec/cassettes/
|
163
|
-
- spec/cassettes/
|
164
|
-
- spec/cassettes/
|
165
|
-
- spec/cassettes/
|
166
|
-
- spec/cassettes/
|
167
|
-
- spec/cassettes/
|
168
|
-
- spec/cassettes/
|
169
|
-
- spec/cassettes/
|
170
|
-
- spec/cassettes/
|
171
|
-
- spec/cassettes/
|
172
|
-
- spec/cassettes/
|
173
|
-
- spec/cassettes/
|
174
|
-
- spec/cassettes/
|
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:
|
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:
|
213
|
+
requirements:
|
214
|
+
- - ! '>='
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
version: '0'
|
199
217
|
requirements: []
|
200
|
-
|
201
218
|
rubyforge_project: asin
|
202
|
-
rubygems_version: 1.
|
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/
|
211
|
-
- spec/cassettes/
|
212
|
-
- spec/cassettes/
|
213
|
-
- spec/cassettes/
|
214
|
-
- spec/cassettes/
|
215
|
-
- spec/cassettes/
|
216
|
-
- spec/cassettes/
|
217
|
-
- spec/cassettes/
|
218
|
-
- spec/cassettes/
|
219
|
-
- spec/cassettes/
|
220
|
-
- spec/cassettes/
|
221
|
-
- spec/cassettes/
|
222
|
-
- spec/cassettes/
|
223
|
-
- spec/cassettes/
|
224
|
-
- spec/cassettes/
|
225
|
-
- spec/cassettes/
|
226
|
-
- spec/cassettes/
|
227
|
-
- spec/cassettes/
|
228
|
-
- spec/cassettes/
|
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
|