wwo 0.3.6 → 0.3.7

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 +3 -2
  3. data/lib/wwo/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 235b3b66844641b8c428a44a2ac5bc95c81406d8
4
- data.tar.gz: 033258d57a8fead1f35c700d6d4a0d4d357210e8
3
+ metadata.gz: bc8c8c42a4c2d6bfe73aa0c2fa5b2df1b9cb5b0e
4
+ data.tar.gz: 500cf12c55b20807d9949278aed4a7cd22065537
5
5
  SHA512:
6
- metadata.gz: 6ff0aeb574c2dd5bc3d966f58af24f2563ba61adc8c4cadf8febccadae39b18474a0f91d9b624abbe51b78681d36df3453ea1dd60508b7a3dae9efbcc7e3087c
7
- data.tar.gz: 3eb440c6340ca943b6d9c08ebf4e4e23bf3f94fec39fb413887b53f1571f7010f60a8378830683ef3eec93db28cd657505e34c66eaa073ff11cb571e4c3a8297
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"] = response.data.weather.first.weatherCode
178
+ data[:daily][:data][0]["conditionCode"] = "999"
178
179
 
179
180
  return data
180
181
  end
data/lib/wwo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wwo
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
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.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - 株式会社アルム Allm Inc