lita-onewheel-forecast-io 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/forecasts.rb +2 -2
- data/lita-onewheel-forecast-io.gemspec +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: 72536d5b1065e43f030d6b986bdad048a67fcd1c
|
4
|
+
data.tar.gz: ef409e9ff3ad406a864f76e3565adb5ddf8c4ad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee9c5e61b4db3f127752329c275d70f4fa9956acaf8efef50adeba320affcfd8b10252477a7ed6607ada8c58f130f1ee9dbd63f3da537536838d1cf5dea8720f
|
7
|
+
data.tar.gz: 34c6ef670a438b59bd1f0e7bf2bc409bbd219abd6f1e1c1fbd5f5ad15b3e38768df996005ee6797bf34296a372ad7719377bc603b9b32fdef31eda73402e1079
|
@@ -3,13 +3,13 @@ module ForecastIo
|
|
3
3
|
def ascii_rain_forecast(forecast)
|
4
4
|
(str, precip_type) = do_the_rain_chance_thing(forecast, ascii_chars, 'precipProbability')
|
5
5
|
max = get_max_by_data_key(forecast, 'minutely', 'precipProbability')
|
6
|
-
"1hr #{precip_type} probability #{(Time.now).strftime('%H:%M').to_s}|#{str}|#{(Time.now + 3600).strftime('%H:%M').to_s} max #{max * 100}%"
|
6
|
+
"1hr #{precip_type} probability #{(Time.now).strftime('%H:%M').to_s}|#{str}|#{(Time.now + 3600).strftime('%H:%M').to_s} max #{(max.to_f * 100).round(2)}%"
|
7
7
|
end
|
8
8
|
|
9
9
|
def ansi_rain_forecast(forecast)
|
10
10
|
(str, precip_type) = do_the_rain_chance_thing(forecast, ansi_chars, 'precipProbability') #, 'probability', get_rain_range_colors)
|
11
11
|
max = get_max_by_data_key(forecast, 'minutely', 'precipProbability')
|
12
|
-
"1hr #{precip_type} probability #{(Time.now).strftime('%H:%M').to_s}|#{str}|#{(Time.now + 3600).strftime('%H:%M').to_s} max #{max.to_f * 100}%"
|
12
|
+
"1hr #{precip_type} probability #{(Time.now).strftime('%H:%M').to_s}|#{str}|#{(Time.now + 3600).strftime('%H:%M').to_s} max #{(max.to_f * 100).round(2)}%"
|
13
13
|
end
|
14
14
|
|
15
15
|
def ansi_rain_intensity_forecast(forecast)
|