lita-onewheel-forecast-io 1.4.1 → 1.4.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 975690706b5d9aa3c3e1018579b6ba7a422ef1b4
4
- data.tar.gz: b20a7284dcd11c6aa6559fa5f3edac4bbbc49c07
3
+ metadata.gz: e4c96df4333594f7487e637c7603806c2432426b
4
+ data.tar.gz: 22703801a850358515d34952096a8b8bf8c99a03
5
5
  SHA512:
6
- metadata.gz: f9517b97db282f46efacf9b04b4b062183fba4f3e464689a571388b46133fcf0c34e4df66539e0c6ad4d3d39ae9af663a34a95cb156d81e2260e30c9bec06498
7
- data.tar.gz: c6e8ae02c532a094f79f7747927d8668e232f34539fa3c9b5f7e7ee4cfa8be93b2296dee6c7314ab16c8f21e92a8ef1c66a306eb94f87bb3876498982f1a8b0a
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
- if time_to_close_the_windows and hour['temperature'].to_i < 71
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(time_to_close_the_windows).to_datetime)
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."
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-forecast-io'
3
- spec.version = '1.4.1'
3
+ spec.version = '1.4.10'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = <<-EOS
@@ -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 16:00. The high today will be 72°F.')
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.1
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-24 00:00:00.000000000 Z
11
+ date: 2016-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita