wwo 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/wwo.rb +4 -1
  3. data/lib/wwo/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc8c8c42a4c2d6bfe73aa0c2fa5b2df1b9cb5b0e
4
- data.tar.gz: 500cf12c55b20807d9949278aed4a7cd22065537
3
+ metadata.gz: 6319cdc7c7c9ff980a091f4ac8237692aa7403b6
4
+ data.tar.gz: 2174db252c049bb9c193b91fb8f2ca98a4b68892
5
5
  SHA512:
6
- metadata.gz: 4ac315de4c291b3e3be0b8a90dd2d49a444049035bbcd7f56ce8e06b055cc8f8eca6489cbb0c3f9752273e7bcb814cb45b21487a88159084dd14988fd7b1e8ba
7
- data.tar.gz: 9e0e5ddb04ff56d0ad764eba71dc6c78f7f7e8d94617e3ea5dd499efa9b29fbf784d5720a6ab7ed44fe0146d51f14668529a2d7cfa3f146a62a002fbcfe4dda3
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
@@ -1,3 +1,3 @@
1
1
  module Wwo
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
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.7
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-09 00:00:00.000000000 Z
13
+ date: 2016-03-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday