yahoo_weatherman 1.0.2 → 1.0.3

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.
@@ -13,7 +13,7 @@ require 'yahoo_weatherman/response'
13
13
 
14
14
  module Weatherman
15
15
 
16
- VERSION = '1.0.2'
16
+ VERSION = '1.0.3'
17
17
 
18
18
  URI = 'http://weather.yahooapis.com/forecastrss'
19
19
 
@@ -62,7 +62,7 @@ module Weatherman
62
62
  end
63
63
 
64
64
  def get(url)
65
- open(url).read
65
+ open(url) { |stream| stream.read }
66
66
  end
67
67
  end
68
68
  end
@@ -150,7 +150,7 @@ module Weatherman
150
150
  private
151
151
  def attribute(attr, root = @document_root)
152
152
  elements = root.xpath(attr)
153
- elements.size == 1 ? elements.first : elements
153
+ elements.one? ? elements.first : elements
154
154
  end
155
155
 
156
156
  def item_attribute(attr)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "yahoo_weatherman"
3
- gem.version = "1.0.2"
3
+ gem.version = "1.0.3"
4
4
  gem.authors = ["Dalto Curvelano Junior"]
5
5
  gem.description = "A ruby wrapper to the Yahoo! Weather feed with i18n support."
6
6
  gem.summary = "A ruby wrapper to the Yahoo! Weather feed with i18n support."
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 2
9
- version: 1.0.2
8
+ - 3
9
+ version: 1.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dalto Curvelano Junior
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-06 00:00:00 -03:00
17
+ date: 2010-05-25 00:00:00 -03:00
18
18
  default_executable:
19
19
  dependencies: []
20
20