vast_api 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -1,7 +1,7 @@
1
1
  class VastApi
2
2
  class Attributes < Hash
3
3
  attr_reader :xml, :url, :vast
4
- delegate :attributes, :listings, :categories, :to=>@vast
4
+ delegate :attributes, :listings, :categories, :to => :vast
5
5
  def initialize(vast)
6
6
  @vast = vast
7
7
  @url = "#{@vast.api_url}attributes/-/#{@vast.category}?#{@vast.query}"
@@ -11,7 +11,7 @@ class VastApi
11
11
 
12
12
  def attr(var_name)
13
13
  if var = @xml.at(var_name)
14
- var.text
14
+ var.text
15
15
  elsif var = @xml.at('//v:'+var_name)
16
16
  var.text
17
17
  elsif var = @xml.at('//o:'+var_name)
@@ -22,12 +22,12 @@ class VastApi
22
22
  end
23
23
 
24
24
  private
25
-
25
+
26
26
  def populate
27
27
  @xml.xpath("//xmlns:entry").each do |entry|
28
28
  self[entry.at_xpath('v:attribute')['id']] = Entry.new(entry)
29
29
  end
30
30
  end
31
-
31
+
32
32
  end
33
33
  end
@@ -2,7 +2,7 @@ class VastApi
2
2
  class Categories < Hash
3
3
  attr_reader :xml, :url, :vast
4
4
 
5
- delegate :attributes, :listings, :categories, :to=>@vast
5
+ delegate :attributes, :listings, :categories, :to=>:vast
6
6
 
7
7
  def initialize(vast)
8
8
  @vast = vast
@@ -13,7 +13,7 @@ class VastApi
13
13
 
14
14
  def attr(var_name)
15
15
  if var = @xml.at(var_name)
16
- var.text
16
+ var.text
17
17
  elsif var = @xml.at('//v:'+var_name)
18
18
  var.text
19
19
  elsif var = @xml.at('//o:'+var_name)
@@ -2,7 +2,7 @@ class VastApi
2
2
  class Listings < Array
3
3
  attr_reader :xml, :url, :vast
4
4
 
5
- delegate :attributes, :listings, :categories, :to=>@vast
5
+ delegate :attributes, :listings, :categories, :to=>:vast
6
6
 
7
7
  def initialize(vast)
8
8
  @vast = vast
@@ -13,7 +13,7 @@ class VastApi
13
13
 
14
14
  def attr(var_name)
15
15
  if var = @xml.at(var_name)
16
- var.text
16
+ var.text
17
17
  elsif var = @xml.at('//v:'+var_name)
18
18
  var.text
19
19
  elsif var = @xml.at('//o:'+var_name)
@@ -32,7 +32,7 @@ class VastApi
32
32
  end
33
33
  @query
34
34
  end
35
-
35
+
36
36
  def find(id)
37
37
  @vast.find(id)
38
38
  end
data/vast_api.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{vast_api}
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 = [%q{Ryan Ong}, %q{Mikhail Knyazev}]
12
- s.date = %q{2011-06-30}
12
+ s.date = %q{2011-07-01}
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.1.1
5
+ version: 0.1.2
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-06-30 00:00:00 Z
14
+ date: 2011-07-01 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -155,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - ">="
157
157
  - !ruby/object:Gem::Version
158
- hash: -2433271560619440749
158
+ hash: 3790848219343916625
159
159
  segments:
160
160
  - 0
161
161
  version: "0"