wwo 0.3.7 → 0.3.8
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 +4 -1
- data/lib/wwo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6319cdc7c7c9ff980a091f4ac8237692aa7403b6
|
|
4
|
+
data.tar.gz: 2174db252c049bb9c193b91fb8f2ca98a4b68892
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb22246c1e5bda09749a3121bcefb13e1ae4fc0d40f8a8200f90bd8dc6db85292afa7781c355e32fef604d6237cbdc0ca6c6dd8a7033d7af128a20f55b48c604
|
|
7
|
+
data.tar.gz: 9c6c679c1c1fec47e75919e5d129941b753be46e77100dc07520a94cccbb5c692ad530b30348d4cbe1f03b8e446f5b30338852f4b2f9c027a30829f2e6c45702
|
data/lib/wwo.rb
CHANGED
|
@@ -163,11 +163,13 @@ module Wwo
|
|
|
163
163
|
icon = weather.hourly.first.weatherIconUrl.first.value
|
|
164
164
|
condition = icon.split('wsymbol_').last.split('_').first.to_i
|
|
165
165
|
|
|
166
|
+
weatherCode = weather.hourly.first.weatherCode
|
|
167
|
+
|
|
166
168
|
maxTemp = weather.maxtempC
|
|
167
169
|
minTemp = weather.mintempC
|
|
168
170
|
date = Time.parse("#{weather.date} 12:00:00")
|
|
169
171
|
|
|
170
|
-
data[:daily][:data] << { icon: icon, "temperatureMax" => maxTemp, "temperatureMin" => minTemp, date: date, conditionCode: condition }
|
|
172
|
+
data[:daily][:data] << { icon: icon, "temperatureMax" => maxTemp, "temperatureMin" => minTemp, date: date, conditionCode: condition, weatherCode: weatherCode }
|
|
171
173
|
end
|
|
172
174
|
return data
|
|
173
175
|
else
|
|
@@ -176,6 +178,7 @@ module Wwo
|
|
|
176
178
|
data[:daily][:data][0]['temperatureMax'] = response.data.weather.first.maxtempC
|
|
177
179
|
data[:daily][:data][0]['temperatureMin'] = response.data.weather.first.mintempC
|
|
178
180
|
data[:daily][:data][0]["conditionCode"] = "999"
|
|
181
|
+
data[:daily][:data][0]["weatherCode"] = weatherCode = weather.hourly.first.weatherCode
|
|
179
182
|
|
|
180
183
|
return data
|
|
181
184
|
end
|
data/lib/wwo/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wwo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 株式会社アルム Allm Inc
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: exe
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2016-03-
|
|
13
|
+
date: 2016-03-13 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: faraday
|