lita-onewheel-forecast-io 1.3.9 → 1.4.0

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.
@@ -334,7 +334,7 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
334
334
 
335
335
  it '!dailyrain' do
336
336
  send_command 'dailyrain'
337
- expect(replies.last).to eq("Portland, OR 48 hr snows |\u000302_______________________❄❄❄❄▁▁▁▁▁▁▁▁▁▁▁▁▁❄❄❄❄❄❄❄❄_\u0003| max 4.0%")
337
+ expect(replies.last).to eq("Portland, OR 48 hr snows |\u000302_______________________❄❄❄❄▁▁▁▁▁▁▁▁▁▁▁▁▁❄❄❄❄❄❄❄❄_\u0003| max 4%")
338
338
  end
339
339
 
340
340
  it '!7dayrain' do
@@ -447,7 +447,7 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
447
447
  expect(replies[4]).to eq("Portland, OR 48h wind direction 4.3 mph|\u000306↓\u000310↙←\u000311↖↑↗\u000308→↘\u000311↓←←←←←←\u000310←←←←←←←\u000306←←←←←\u000302←←←↙↙↙↙↓↓↓\u000306↓↓↓↓↓↓↓↓↙↙\u0003|4.18 mph Range: 1.39 mph - 12.71 mph")
448
448
  expect(replies[5]).to eq("Portland, OR 48hr sun forecast |\u000308████████████████████\u000307▇▇▅\u000309▅▅▃\u000303▁_▁\u000309▃▃▃\u000303▁▁▁▁▃\u000309▃▅\u000307▇▇▇▇\u000308▇▇▇▇▇▇\u0003| max 100%")
449
449
  expect(replies[6]).to eq("Portland, OR 24h cloud cover |___________▁▁▁▁▁▁▁▁▃▅▅▅| range 0% - 49.0%")
450
- expect(replies[7]).to eq("Portland, OR 48 hr snows |\u000302_______________________❄❄❄❄▁▁▁▁▁▁▁▁▁▁▁▁▁❄❄❄❄❄❄❄❄_\u0003| max 4.0%")
450
+ expect(replies[7]).to eq("Portland, OR 48 hr snows |\u000302_______________________❄❄❄❄▁▁▁▁▁▁▁▁▁▁▁▁▁❄❄❄❄❄❄❄❄_\u0003| max 4%")
451
451
  expect(replies.last).to eq("Portland, OR 67%|\u000307▇\u000308▇▇▇\u000311▅▅▅▅▅▅▅▅▅▅\u000308▇▇▇▇▇▇▇\u000307▇▇▇▇▇▇▇▇▇▇▇▇\u000304████████████████\u0003|80% range: 41%-85%")
452
452
  end
453
453
 
@@ -516,6 +516,12 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
516
516
  expect(replies.last).to eq('Close the windows at 16:00, it will be 72°F. The high today will be 72°F.')
517
517
  end
518
518
 
519
+ it 'will not say a 28.000000000000004% chance of rain' do
520
+ mock_up '28000000000004percent'
521
+ send_command 'dailyrain'
522
+ expect(replies.last).to eq("Portland, OR 48 hr rains |\u000302▁_▁\u000306▃▃▃\u000310▅\u000302▁_▁▁\u000306▃\u000302▁\u000310▃\u000306▃\u000310▅\u000306▃\u000302▁▁▁▁▁▁__________________________\u0003| max 28%")
523
+ end
524
+
519
525
  # it 'colors strings' do
520
526
  # cstr = Lita::Handlers::ForecastIo.get_colored_string([{:key => 1}], :key, 'x', {1 => :blue})
521
527
  # expect(cstr).to equal('x')
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.3.9
4
+ version: 1.4.0
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-04 00:00:00.000000000 Z
11
+ date: 2016-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -205,6 +205,7 @@ files:
205
205
  - lita-onewheel-forecast-io.gemspec
206
206
  - lita_config_sample.rb
207
207
  - locales/en.yml
208
+ - spec/fixtures/28000000000004percent.json
208
209
  - spec/fixtures/heavy_rain.json
209
210
  - spec/fixtures/mock_weather.json
210
211
  - spec/fixtures/mock_weather_no_minute.json
@@ -239,6 +240,7 @@ signing_key:
239
240
  specification_version: 4
240
241
  summary: A text-based interactive query engine for http://forecast.io's api.
241
242
  test_files:
243
+ - spec/fixtures/28000000000004percent.json
242
244
  - spec/fixtures/heavy_rain.json
243
245
  - spec/fixtures/mock_weather.json
244
246
  - spec/fixtures/mock_weather_no_minute.json