vast_api 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -54,9 +54,12 @@ class VastApi
54
54
  def vast_links
55
55
  if @attributes["vast_links"].nil?
56
56
  @attributes["vast_links"] = {}
57
- @doc.css('link').each do |ln|
57
+ @doc.xpath('xmlns:link').each do |ln|
58
58
  attributes = ln.attributes
59
- @attributes["vast_links"][attributes['rel']] = attributes
59
+ @attributes["vast_links"][attributes['rel'].content] = {}
60
+ attributes.each do |key, node|
61
+ @attributes["vast_links"][attributes['rel'].content][key] = node.content
62
+ end
60
63
  end
61
64
  end
62
65
  @attributes["vast_links"]
@@ -61,6 +61,12 @@ describe VastApi do
61
61
  end
62
62
  find_bike_cat.id.must_equal bike.id
63
63
  end
64
+
65
+ it "entry should have a hash of links" do
66
+ bike = @listing.first
67
+ bike.vast_links['via'].wont_be_nil
68
+ end
69
+
64
70
  end
65
71
 
66
72
  describe 'Attributes' do
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{vast_api}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Ong", "Mikhail Knyazev"]
12
- s.date = %q{2011-03-21}
12
+ s.date = %q{2011-03-22}
13
13
  s.description = %q{A ruby wrapper for the http://www.vast.com/ api}
14
14
  s.email = %q{ryanong@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: vast_api
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.0.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ryan Ong
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-03-21 00:00:00 -04:00
14
+ date: 2011-03-22 00:00:00 -04:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -158,7 +158,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - ">="
160
160
  - !ruby/object:Gem::Version
161
- hash: 292590391515625799
161
+ hash: 141739539048800831
162
162
  segments:
163
163
  - 0
164
164
  version: "0"