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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/wwo.rb +3 -1
  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: b5bc251a86c383f3b0d1aaf6be33881e869aaef1
4
- data.tar.gz: 0edd788aef8e11199086f79db935d201dd349080
3
+ metadata.gz: 7cec9c308673d100b324ac161fd5417c94917dc5
4
+ data.tar.gz: 15e89edc4574ea9ecb1358454671642280116973
5
5
  SHA512:
6
- metadata.gz: 76d2e93f027f980484157d59e37e1dea4fd3fadd847a9dede42cdc30000a1723b75874fe5f838639e3feb8c530a7c69d5751989098650c945f01325dcf760a47
7
- data.tar.gz: 84675e426090d271abd0bc05b0b1eb6aaca81c2625b6caa23a625122ec1cbfdac359c107c8a896d71693b929fb1d5c51f58fb8c6fd8a6c165f0128795d5d487a
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 ! response.data.weather.nil? && response.data.weather.any? && response.data.weather.size > 1
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
@@ -1,3 +1,3 @@
1
1
  module Wwo
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
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.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - 株式会社アルム Allm Inc