lita-onewheel-forecast-io 1.4.16 → 1.4.17
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 +4 -5
- data/lita-onewheel-forecast-io.gemspec +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: 7fce6c39193e67284206976446da1c18a7746244
|
4
|
+
data.tar.gz: 01bf2263c0f3f51dff4c02ea75fe6b73fa167ee5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f6e8041967b7386c28850f7071077c684df4b037ca627c37f10293827e20f10aca4d247f0e608e9ffdd9602df5fcb08936f62659834dd1b00a7a8b10cc94542
|
7
|
+
data.tar.gz: 03f023fb5ddeade411123870947bb49e230d69241c54b08579643bcaac6e5bdbc897b78d801db946929bcf40ce7043ec54a4d51ce01f3ea5e8ac373eddd22c90
|
@@ -472,7 +472,7 @@ module ForecastIo
|
|
472
472
|
if hour['temperature'] > high_temp
|
473
473
|
high_temp = hour['temperature'].to_i
|
474
474
|
end
|
475
|
-
|
475
|
+
|
476
476
|
if !time_to_close_the_windows and hour['temperature'].to_i >= 71
|
477
477
|
if index == 0
|
478
478
|
time_to_close_the_windows = 'now'
|
@@ -492,16 +492,15 @@ module ForecastIo
|
|
492
492
|
|
493
493
|
# Return some meta here and let the caller decide the text.
|
494
494
|
if time_to_close_the_windows.nil?
|
495
|
-
"Leave 'em open, no excess heat today(#{high_temp}
|
495
|
+
"Leave 'em open, no excess heat today(#{get_temperature high_temp})."
|
496
496
|
else
|
497
497
|
# Todo: base timezone on requested location.
|
498
498
|
timezone = TZInfo::Timezone.get('America/Los_Angeles')
|
499
|
-
time_at = Time.at(time_to_close_the_windows).to_datetime
|
500
|
-
local_time = timezone.utc_to_local(time_at)
|
501
|
-
|
502
499
|
if time_to_close_the_windows == 'now'
|
503
500
|
output = "Close the windows now! It is #{get_temperature window_close_temp}. "
|
504
501
|
else
|
502
|
+
time_at = Time.at(time_to_close_the_windows).to_datetime
|
503
|
+
local_time = timezone.utc_to_local(time_at)
|
505
504
|
output = "Close the windows at #{local_time.strftime('%k:%M')}, it will be #{get_temperature window_close_temp}. "
|
506
505
|
end
|
507
506
|
if time_to_open_the_windows
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-onewheel-forecast-io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kreps
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|