lita-onewheel-forecast-io 1.4.1 → 1.4.10
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4c96df4333594f7487e637c7603806c2432426b
|
4
|
+
data.tar.gz: 22703801a850358515d34952096a8b8bf8c99a03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f79b9505feb5f0c6581129040d102e999181bf20d2b3568bf436c909b1ecb9b740b341db10cc5bf390af0add5101b6d0813c0d5df1749552a6a3d4929466daf6
|
7
|
+
data.tar.gz: e222e6b06378ea2a36d6e98998e3cc9f2aec239163161fc78230ad49eaa384c772d9277f02c37e201c8ed9cd59a75e604888ac11b921f97eb9a183de07326e8d
|
@@ -478,9 +478,11 @@ module ForecastIo
|
|
478
478
|
time_to_close_the_windows = hour['time']
|
479
479
|
window_close_temp = hour['temperature']
|
480
480
|
end
|
481
|
-
|
481
|
+
|
482
|
+
if !time_to_open_the_windows and time_to_close_the_windows and hour['temperature'].to_i < 71
|
482
483
|
time_to_open_the_windows = hour['time']
|
483
484
|
end
|
485
|
+
|
484
486
|
break if index > 12
|
485
487
|
end
|
486
488
|
|
@@ -495,7 +497,7 @@ module ForecastIo
|
|
495
497
|
|
496
498
|
output = "Close the windows at #{local_time.strftime('%k:%M')}, it will be #{window_close_temp}°F. "
|
497
499
|
if time_to_open_the_windows
|
498
|
-
open_time = timezone.utc_to_local(Time.at(
|
500
|
+
open_time = timezone.utc_to_local(Time.at(time_to_open_the_windows).to_datetime)
|
499
501
|
output += "Open them back up at #{open_time.strftime('%k:%M')}. "
|
500
502
|
end
|
501
503
|
output += "The high today will be #{high_temp}°F."
|
@@ -513,7 +513,7 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
513
513
|
it '!windows' do
|
514
514
|
mock_up 'windows'
|
515
515
|
send_command 'windows'
|
516
|
-
expect(replies.last).to eq('Close the windows at 16:00, it will be 72°F. Open them back up at
|
516
|
+
expect(replies.last).to eq('Close the windows at 16:00, it will be 72°F. Open them back up at 17:00. The high today will be 72°F.')
|
517
517
|
end
|
518
518
|
|
519
519
|
it 'will not say a 28.000000000000004% chance of rain' do
|
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.10
|
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-07-
|
11
|
+
date: 2016-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|