lita-onewheel-forecast-io 1.3.6 → 1.3.7

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: 23f6c48591e55e4113405cc117c61551d383fff6
4
- data.tar.gz: 18170c097c7a36cc5e9ef16410440fc0007a7a30
3
+ metadata.gz: 09990bb66324ca9f2931ae20a237d0ae5d408714
4
+ data.tar.gz: 7272ae4c2e85e67de2bd2560702fd20f92a49a7d
5
5
  SHA512:
6
- metadata.gz: 4c6583ae6171f7d6ffa8b05c451ac21b27cc6be940f6981e5ce78e72156b875f01fddc9b8ca2e7c643108c4ed3c7e88a7533cb1b2d1f5c4335cc5d5cb758d133
7
- data.tar.gz: 3d230c9398e9372e9da49b5a8300721dac83e2f56f0fc41ce96fe964ac64a6198535ee5017c68b2090fa863aac2c80f1a680a3f65500e9277e79fe5cc246e445
6
+ metadata.gz: 677beff74cebd5a8c7b7b41e2d7ff2b1591e78ae0cbed61f19c6397e7b223b23dfaad273f102f46897f9ed1889421ee779926ebdf65ac0bb3d515e49f49df5d0
7
+ data.tar.gz: 3bcc7ef0db7b7914b828a6f36ecba91df5ac3394f49ff744c51f38638a09214870c5c9bc89c2a66463475db2e054d9536595777c86b0bc5443f670e3990d3e71
@@ -1,3 +1,5 @@
1
+ require 'tzinfo'
2
+
1
3
  module ForecastIo
2
4
  module Forecasts
3
5
  def ascii_rain_forecast(forecast)
@@ -476,8 +478,11 @@ module ForecastIo
476
478
  if time_to_close_the_windows.nil?
477
479
  "Leave 'em open, no excess heat today."
478
480
  else
481
+ timezone = TZInfo::Timezone.get('America/Los_Angeles')
479
482
  time_at = Time.at(time_to_close_the_windows).to_datetime
480
- "Close the windows at #{time_at.strftime('%k:%M')}."
483
+ local_time = timezone.utc_to_local(time_at)
484
+
485
+ "Close the windows at #{local_time.strftime('%k:%M')}."
481
486
  end
482
487
  end
483
488
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-forecast-io'
3
- spec.version = '1.3.6'
3
+ spec.version = '1.3.7'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = <<-EOS
@@ -33,4 +33,5 @@ EOS
33
33
  spec.add_runtime_dependency 'geocoder', '~> 1.2'
34
34
  spec.add_runtime_dependency 'multi_json', '~> 1.7'
35
35
  spec.add_runtime_dependency 'magic-eightball', '~> 0.0'
36
+ spec.add_runtime_dependency 'tzinfo', '~> 1.2'
36
37
  end
@@ -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('Shut them down at 16:00.')
516
+ expect(replies.last).to eq('Close the windows at 16:00.')
517
517
  end
518
518
 
519
519
  # it 'colors strings' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-forecast-io
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0.0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: tzinfo
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '1.2'
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '1.2'
167
181
  description: |2
168
182
  A rather different take on the weather. <br/>
169
183
  !ansirain Portland, OR 97206, USA rain probability 21:30|████████████████████████████████████▇▇▇▇▇▇▇▇▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅|22:30 max 100% <br/>