tucano 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -22,7 +22,7 @@ This returns an Array of Tucano::Items with names, prices, currency, category an
22
22
 
23
23
  `product = products.first`
24
24
 
25
- => `Tucano::Item:0x007fb5e40edde0 @name="Ruby on Rails 3 Tutorial: Learn Rails by Example (Addison-Wesley Professional Ruby Series)", @category="Book", @price="3999", @currency="USD", @image="http://ecx.images-amazon.com/images/I/51TEzGZ%2BggL.jpg"`
25
+ => `Tucano::Item:0x007fb5e40edde0 @name="Ruby on Rails 3 Tutorial: Learn Rails by Example (Addison-Wesley Professional Ruby Series)", @category="Book", @price="3999", @currency="USD", @image="http://ecx.images-amazon.com/images/I/51TEzGZ%2BggL.jpg, @url="http://www.amazon.com/Ruby-Rails-Tutorial-Addison-Wesley-Professional/dp/0321743121%3FSubscriptionId%3DAKIAJ5HO5KJC4OISP7WQ%26tag%3Dvoicsear-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0321743121""`
26
26
 
27
27
  So you can do stuff like:
28
28
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/lib/tucano.rb CHANGED
@@ -2,7 +2,7 @@ require 'vacuum'
2
2
 
3
3
  module Tucano
4
4
  class Item
5
- attr_accessor :name, :description, :price, :currency, :image, :category
5
+ attr_accessor :name, :description, :price, :currency, :image, :category, :url
6
6
  end
7
7
 
8
8
  class ProductSearch
@@ -23,6 +23,8 @@ module Tucano
23
23
  i.currency = item["ItemAttributes"]["ListPrice"]["CurrencyCode"]
24
24
  #i.description = item["EditorialReviews"]["EditorialReview"]["Content"]
25
25
  i.image = item["LargeImage"]["URL"]
26
+ i.url = item["DetailPageURL"]
27
+
26
28
  return i
27
29
  end
28
30
 
data/spec/tucano_spec.rb CHANGED
@@ -24,6 +24,7 @@ describe "Tucano" do
24
24
  item.image.length.should be > 0
25
25
  item.category.length.should be > 0
26
26
  item.currency.should == "USD"
27
+ item.url.should include("amazon.co")
27
28
  end
28
29
 
29
30
  it "should return an empty array when no results are found" do
data/tucano.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "tucano"
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mark Provan"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tucano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: vacuum
16
- requirement: &70149533357900 !ruby/object:Gem::Requirement
16
+ requirement: &70277896162560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70149533357900
24
+ version_requirements: *70277896162560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70149533355040 !ruby/object:Gem::Requirement
27
+ requirement: &70277896161640 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.8.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70149533355040
35
+ version_requirements: *70277896161640
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rdoc
38
- requirement: &70149533354060 !ruby/object:Gem::Requirement
38
+ requirement: &70277896160980 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '3.12'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70149533354060
46
+ version_requirements: *70277896160980
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &70149533353360 !ruby/object:Gem::Requirement
49
+ requirement: &70277896160200 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70149533353360
57
+ version_requirements: *70277896160200
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: jeweler
60
- requirement: &70149533352360 !ruby/object:Gem::Requirement
60
+ requirement: &70277896159400 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.8.3
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70149533352360
68
+ version_requirements: *70277896159400
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rcov
71
- requirement: &70149533351640 !ruby/object:Gem::Requirement
71
+ requirement: &70277896158380 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - =
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.9.11
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70149533351640
79
+ version_requirements: *70277896158380
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: fuubar
82
- requirement: &70149533350920 !ruby/object:Gem::Requirement
82
+ requirement: &70277896157720 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70149533350920
90
+ version_requirements: *70277896157720
91
91
  description: When taking part in a hackathon recently I was looking for a simple gem
92
92
  to pull products from Amazon based on a search string. I found a few but none did
93
93
  exactly what I wanted, so I built this one.
@@ -126,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  segments:
128
128
  - 0
129
- hash: 1874087922233728749
129
+ hash: 3400692591691002697
130
130
  required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  none: false
132
132
  requirements: