lita-onewheel-forecast-io 1.6.3 → 1.6.4

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: 80e5797d746bc23f13fb827bb614aedbd2ba7990
4
- data.tar.gz: 34d94cd504bef00cb65691e0b343c024ce867819
3
+ metadata.gz: 282d3fc2cfdee6d76c4c6c26a240a31ff35d04df
4
+ data.tar.gz: d859b10ccccae9258013edce2fced69f7932b8f8
5
5
  SHA512:
6
- metadata.gz: c23d7a863835938b7cfacc8f56b76248b8e327e68cfa7c95b2c31f4b41fa098037b23397d2f006853be612201cb1faf9aaaeabcca0e5a14488b62d8db48364f6
7
- data.tar.gz: 55b095c4ad28c8360db8c4ae353808c8bbe1451fc6b6e801fbe30e655e06d2f544f98d58ff5029758796923253f91d51c4e20992e0ceeb272ee94455ff986426
6
+ metadata.gz: 2e25b3fb4eac96214183dbc7caf3a46dc9372f356fa9d9f76beca087d5f3a055091d6d69b9be08ae561542f8bd4bfc5b8ffe655ca41da803b72b0bb299ffce98
7
+ data.tar.gz: 052cee91b5b0e65b4476e5bdc67e5d902d361f2fc38cd03dcd9a5ef512f810355cdeb1fe4c22254254da1f3214170f40fdc6735c460f2bfdcd89e4a284eec007
@@ -443,30 +443,27 @@ module ForecastIo
443
443
  end
444
444
 
445
445
  def do_the_today_thing(forecast, yesterday)
446
- puts "#{forecast['daily']['data'][0]['temperatureMax']} - #{yesterday['daily']['data'][0]['temperatureMax']}"
447
- temp_diff = forecast['daily']['data'][0]['temperatureMax'] - forecast['daily']['data'][0]['temperatureMax']
448
- get_daily_comparison_text(temp_diff)
446
+ temp_diff = forecast['daily']['data'][0]['temperatureMax'] - yesterday['daily']['data'][0]['temperatureMax']
447
+ get_daily_comparison_text(temp_diff, forecast['daily']['data'][0]['temperatureMax'])
449
448
  end
450
449
 
451
450
  def do_the_tomorrow_thing(forecast)
452
- puts "#{forecast['daily']['data'][0]['temperatureMax']} - #{forecast['daily']['data'][1]['temperatureMax']}"
453
- forecast['daily']['data'][0]['temperatureMax'] - forecast['daily']['data'][1]['temperatureMax']
454
451
  temp_diff = forecast['daily']['data'][0]['temperatureMax'] - forecast['daily']['data'][1]['temperatureMax']
455
- get_daily_comparison_text(temp_diff)
452
+ get_daily_comparison_text(temp_diff, forecast['daily']['data'][0]['temperatureMax'])
456
453
  end
457
454
 
458
455
  # If the temperature difference is positive,
459
- def get_daily_comparison_text(temp_diff)
456
+ def get_daily_comparison_text(temp_diff, high)
460
457
  if temp_diff <= 1 and temp_diff >= -1
461
458
  'about the same as'
462
459
  elsif temp_diff > 1 and temp_diff <= 5
463
460
  'cooler than'
464
461
  elsif temp_diff > 5
465
- 'much colder than'
462
+ (high > 70)? 'much cooler than' : 'much colder than'
466
463
  elsif temp_diff < -1 and temp_diff >= -5
467
464
  'warmer than'
468
465
  elsif temp_diff < -5
469
- 'much hotter than'
466
+ (high < 70)? 'much warmer than' : 'much hotter than'
470
467
  end
471
468
  end
472
469
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-forecast-io'
3
- spec.version = '1.6.3'
3
+ spec.version = '1.6.4'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = <<-EOS
@@ -507,7 +507,7 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
507
507
  it '!tomorrows' do
508
508
  mock_up 'much_warmer'
509
509
  send_command 'tomorrow'
510
- expect(replies.last).to eq('Tomorrow will be much hotter than today.')
510
+ expect(replies.last).to eq('Tomorrow will be much warmer than today.')
511
511
  end
512
512
 
513
513
  it '!windows' 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.6.3
4
+ version: 1.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-28 00:00:00.000000000 Z
11
+ date: 2017-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita