wwo 0.3.6 → 0.3.7
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 -2
- 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: bc8c8c42a4c2d6bfe73aa0c2fa5b2df1b9cb5b0e
|
|
4
|
+
data.tar.gz: 500cf12c55b20807d9949278aed4a7cd22065537
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4ac315de4c291b3e3be0b8a90dd2d49a444049035bbcd7f56ce8e06b055cc8f8eca6489cbb0c3f9752273e7bcb814cb45b21487a88159084dd14988fd7b1e8ba
|
|
7
|
+
data.tar.gz: 9e0e5ddb04ff56d0ad764eba71dc6c78f7f7e8d94617e3ea5dd499efa9b29fbf784d5720a6ab7ed44fe0146d51f14668529a2d7cfa3f146a62a002fbcfe4dda3
|
data/lib/wwo.rb
CHANGED
|
@@ -161,9 +161,10 @@ module Wwo
|
|
|
161
161
|
data = { daily: { data: [] } }
|
|
162
162
|
response.data.weather.each do |weather|
|
|
163
163
|
icon = weather.hourly.first.weatherIconUrl.first.value
|
|
164
|
+
condition = icon.split('wsymbol_').last.split('_').first.to_i
|
|
165
|
+
|
|
164
166
|
maxTemp = weather.maxtempC
|
|
165
167
|
minTemp = weather.mintempC
|
|
166
|
-
condition = weather.weatherCode
|
|
167
168
|
date = Time.parse("#{weather.date} 12:00:00")
|
|
168
169
|
|
|
169
170
|
data[:daily][:data] << { icon: icon, "temperatureMax" => maxTemp, "temperatureMin" => minTemp, date: date, conditionCode: condition }
|
|
@@ -174,7 +175,7 @@ module Wwo
|
|
|
174
175
|
data[:daily][:data][0][:icon] = response.data.weather.first.hourly.first.weatherIconUrl.first.value
|
|
175
176
|
data[:daily][:data][0]['temperatureMax'] = response.data.weather.first.maxtempC
|
|
176
177
|
data[:daily][:data][0]['temperatureMin'] = response.data.weather.first.mintempC
|
|
177
|
-
data[:daily][:data][0]["conditionCode"] =
|
|
178
|
+
data[:daily][:data][0]["conditionCode"] = "999"
|
|
178
179
|
|
|
179
180
|
return data
|
|
180
181
|
end
|
data/lib/wwo/version.rb
CHANGED