wwo 0.3.3 → 0.3.4
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.
- checksums.yaml +4 -4
- data/lib/wwo.rb +3 -1
- data/lib/wwo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7cec9c308673d100b324ac161fd5417c94917dc5
|
|
4
|
+
data.tar.gz: 15e89edc4574ea9ecb1358454671642280116973
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd0b1dfd6df7c88c429cb643add5b39f17bc6ec2d2e051b85beaed3cae7d54e9e08225dae5e0ec44bb4ae7888e0bf6552d69effcd1fd056091d612ee0fb720de
|
|
7
|
+
data.tar.gz: 0e59dfcd54c73f5baf6f428f26919fd245c5c1aaef95c5a01725eb1430d8c637ec7b8be16d3e4dbbcd4877878c4e2cc9134299ffcbe967e3d70b4b83a4e3560a
|
data/lib/wwo.rb
CHANGED
|
@@ -136,7 +136,9 @@ module Wwo
|
|
|
136
136
|
# Munges the repsonse into one like what we would expect from Forecast.io
|
|
137
137
|
#
|
|
138
138
|
def make_into_forecast_response(response)
|
|
139
|
-
if
|
|
139
|
+
if response.is_a?(Hash) && response.empty?
|
|
140
|
+
return { daily: { data: [] } }
|
|
141
|
+
elsif ! response.data.weather.nil? && response.data.weather.any? && response.data.weather.size > 1
|
|
140
142
|
data = { daily: { data: [] } }
|
|
141
143
|
response.data.weather.each do |weather|
|
|
142
144
|
icon = weather.hourly.first.weatherIconUrl.first.value
|
data/lib/wwo/version.rb
CHANGED