lita-onewheel-forecast-io 1.4.16 → 1.4.17

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: 9e35daf91ea87627eff8a13a7add8b932bd6708d
4
- data.tar.gz: cdfaa2b93fdefcba65695904afc440a4f98de6ba
3
+ metadata.gz: 7fce6c39193e67284206976446da1c18a7746244
4
+ data.tar.gz: 01bf2263c0f3f51dff4c02ea75fe6b73fa167ee5
5
5
  SHA512:
6
- metadata.gz: 030467008da6f2b6ceeb035a2e96ce95680f081f8b640a0cb7276453ed8ebb84b9586ef6affdd749cf3d95667c583e412dbaac4cd0370baae0b4c8dade3c1704
7
- data.tar.gz: 8f41fec613e741c004d2236d8b4054e55a1de78e83c59c4e1e5541ac775722f1e65577fb1a341db747a74091f524fec4d907ed57722c1633329ea8c989ec1f18
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
- puts index
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}°F)."
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-forecast-io'
3
- spec.version = '1.4.16'
3
+ spec.version = '1.4.17'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = <<-EOS
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.16
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-20 00:00:00.000000000 Z
11
+ date: 2016-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita