weatherbug 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/weatherbug.rb +1 -0
- data/lib/weatherbug/forecast.rb +1 -1
- data/lib/weatherbug/live_observation.rb +2 -0
- data/lib/weatherbug/version.rb +1 -1
- metadata +4 -4
data/lib/weatherbug.rb
CHANGED
@@ -56,6 +56,7 @@ module WeatherBug
|
|
56
56
|
station_id = station.is_a?(WeatherBug::Station) ? station.station_id : station
|
57
57
|
params = {'StationId' => station_id}
|
58
58
|
params['UnitType'] = '1' if unit_type == :c
|
59
|
+
params['ShowIcon'] = '1'
|
59
60
|
response = make_request('LiveObservations', params)
|
60
61
|
|
61
62
|
live_observation = WeatherBug::LiveObservation.from_document response.xpath('/aws:weather/aws:ob').first
|
data/lib/weatherbug/forecast.rb
CHANGED
@@ -5,7 +5,7 @@ module WeatherBug
|
|
5
5
|
register_transformer 'aws:title', :required => true
|
6
6
|
register_transformer 'aws:city'
|
7
7
|
register_transformer 'aws:short-title'
|
8
|
-
register_transformer 'aws:icon'
|
8
|
+
register_transformer 'aws:icon/@icon'
|
9
9
|
register_transformer 'aws:description'
|
10
10
|
register_transformer 'aws:prediction'
|
11
11
|
register_transformer 'aws:lo', :name => :temp_low, :transform => :to_i
|
@@ -14,6 +14,8 @@ module WeatherBug
|
|
14
14
|
register_transformer 'aws:wind-direction'
|
15
15
|
register_transformer 'aws:wind-speed', :transform => :to_i
|
16
16
|
register_transformer 'aws:pressure', :transform => :to_f
|
17
|
+
register_transformer 'aws:description'
|
18
|
+
register_transformer 'aws:image/@icon', :name => :icon
|
17
19
|
|
18
20
|
def self.from_document(document)
|
19
21
|
lops = super
|
data/lib/weatherbug/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weatherbug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Crepezzi
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-30 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|