lita-onewheel-forecast-io 1.4.17 → 1.5.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d60d4719e1ac79ab5178f40b21b6c9f87629222
|
4
|
+
data.tar.gz: 70309a6c717c7c6c7fe5ad14b4b83b8131291c06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43cb66ff058ad064675628e6c07ba689e2e37b2d0da12c3b27f276c3137fcdc3209bac54881f7b2bf585e196ba49eaa430625ea796cdbc7884b436039ba693dd
|
7
|
+
data.tar.gz: 062a083f34288d57b1e6e695de9bed020a9f7a7bdd90281a82244a36f6f1439a487cb28260eb88de5e6a933fbced2b26b3143949b5e9e2808f57b74be3e37c83
|
data/lib/lita/handlers/utils.rb
CHANGED
@@ -57,20 +57,10 @@ module ForecastIo
|
|
57
57
|
end
|
58
58
|
|
59
59
|
# Perform a geocoder lookup based on a) the query or b) the user's serialized state.
|
60
|
-
# If neither of those exist, default to
|
60
|
+
# If neither of those exist, default to config location.
|
61
61
|
def geo_lookup(user, query, persist = true)
|
62
62
|
Lita.logger.debug "Performing geolookup for '#{user.name}' for '#{query}'"
|
63
63
|
|
64
|
-
default_location = {
|
65
|
-
'formatted_address' => 'Portland, OR',
|
66
|
-
'geometry' => {
|
67
|
-
'location' => {
|
68
|
-
'lat' => 45.5230622,
|
69
|
-
'lng' => -122.6764816
|
70
|
-
}
|
71
|
-
}
|
72
|
-
}
|
73
|
-
|
74
64
|
if query.nil? or query.empty?
|
75
65
|
Lita.logger.debug "No query specified, pulling from redis #{REDIS_KEY}, #{user.name}"
|
76
66
|
serialized_geocoded = redis.hget(REDIS_KEY, user.name)
|
@@ -80,6 +70,7 @@ module ForecastIo
|
|
80
70
|
Lita.logger.debug "Cached location: #{geocoded.inspect}"
|
81
71
|
end
|
82
72
|
|
73
|
+
query = (query.nil?)? config.default_location : query
|
83
74
|
Lita.logger.debug "q & g #{query.inspect} #{geocoded.inspect}"
|
84
75
|
|
85
76
|
unless geocoded
|
@@ -91,13 +82,6 @@ module ForecastIo
|
|
91
82
|
end
|
92
83
|
end
|
93
84
|
|
94
|
-
# Let's set up the defaults in the event that the geocoder fails.
|
95
|
-
# See https://github.com/onewheelskyward/lita-onewheel-forecast-io/issues/34
|
96
|
-
unless geocoded
|
97
|
-
Lita.logger.debug "Geocoded was #{geocoded.inspect}, setting to default."
|
98
|
-
geocoded = default_location
|
99
|
-
end
|
100
|
-
|
101
85
|
Lita.logger.debug "geocoded: '#{geocoded}'"
|
102
86
|
loc = Location.new(
|
103
87
|
geocoded['formatted_address'],
|
data/lita_config_sample.rb
CHANGED
@@ -6,4 +6,5 @@ Lita.configure do |config|
|
|
6
6
|
config.handlers.onewheel_forecast_io.api_key = 'yourforecastiokey'
|
7
7
|
config.handlers.onewheel_forecast_io.api_uri = 'https://api.forecast.io/forecast/'
|
8
8
|
config.handlers.onewheel_forecast_io.colors = true
|
9
|
+
config.handlers.onewheel_forecast_io.default_location = 'Portland, OR'
|
9
10
|
end
|
@@ -215,7 +215,7 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
215
215
|
|
216
216
|
it '!forecast' do
|
217
217
|
send_command 'forecast'
|
218
|
-
expect(replies.last).to eq("Portland, OR weather is currently 28.39°F and clear. Winds out of the E at 5.74 mph. It will be clear for the hour, and flurries tomorrow morning. There are also 357.71 ozones.")
|
218
|
+
expect(replies.last).to eq("Portland, OR, USA weather is currently 28.39°F and clear. Winds out of the E at 5.74 mph. It will be clear for the hour, and flurries tomorrow morning. There are also 357.71 ozones.")
|
219
219
|
end
|
220
220
|
|
221
221
|
it '!rain' do
|
@@ -284,7 +284,7 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
284
284
|
|
285
285
|
it '!conditions' do
|
286
286
|
send_command 'conditions'
|
287
|
-
expect(replies.last).to eq("Portland, OR 28.3°F |\u000306_▁▃\u000310▅▇█\u000303█\u0003| 38.72°F / 4.3 mph |\u000306↓\u000310↙←\u000311↖↑↗\u000308→\u0003| 12.71 mph / 98% chance of sun / 60m precip |\u000306❄\u000311▇\u000308▇\u000302_____________\u0003|")
|
287
|
+
expect(replies.last).to eq("Portland, OR, USA 28.3°F |\u000306_▁▃\u000310▅▇█\u000303█\u0003| 38.72°F / 4.3 mph |\u000306↓\u000310↙←\u000311↖↑↗\u000308→\u0003| 12.71 mph / 98% chance of sun / 60m precip |\u000306❄\u000311▇\u000308▇\u000302_____________\u0003|")
|
288
288
|
end
|
289
289
|
|
290
290
|
it '!alerts' do
|
@@ -294,32 +294,32 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
294
294
|
|
295
295
|
it '!ansisun' do
|
296
296
|
send_command 'ansisun'
|
297
|
-
expect(replies.last).to eq("Portland, OR 48hr sun forecast |\u000308████████████████████\u000307▇▇▅\u000309▅▅▃\u000303▁_▁\u000309▃▃▃\u000303▁▁▁▁▃\u000309▃▅\u000307▇▇▇▇\u000308▇▇▇▇▇▇\u0003| max 100%")
|
297
|
+
expect(replies.last).to eq("Portland, OR, USA 48hr sun forecast |\u000308████████████████████\u000307▇▇▅\u000309▅▅▃\u000303▁_▁\u000309▃▃▃\u000303▁▁▁▁▃\u000309▃▅\u000307▇▇▇▇\u000308▇▇▇▇▇▇\u0003| max 100%")
|
298
298
|
end
|
299
299
|
|
300
300
|
it '!dailysun' do
|
301
301
|
send_command 'dailysun'
|
302
|
-
expect(replies.last).to eq("Portland, OR 8 day sun forecast |\u000308█\u000309▃\u000308▇\u000309▁_\u000307▅\u000309▃\u000307▅\u0003| max 76%")
|
302
|
+
expect(replies.last).to eq("Portland, OR, USA 8 day sun forecast |\u000308█\u000309▃\u000308▇\u000309▁_\u000307▅\u000309▃\u000307▅\u0003| max 76%")
|
303
303
|
end
|
304
304
|
|
305
305
|
it '!asciisun' do
|
306
306
|
send_command 'asciisun'
|
307
|
-
expect(replies.last).to eq("Portland, OR 48hr sun forecast |\u000308''''''''''''''''''''\u000307**~\u000309~~-\u000303._.\u000309---\u000303....-\u000309-~\u000307****\u000308******\u0003| max 100%")
|
307
|
+
expect(replies.last).to eq("Portland, OR, USA 48hr sun forecast |\u000308''''''''''''''''''''\u000307**~\u000309~~-\u000303._.\u000309---\u000303....-\u000309-~\u000307****\u000308******\u0003| max 100%")
|
308
308
|
end
|
309
309
|
|
310
310
|
it '!ansicloud' do
|
311
311
|
send_command 'ansicloud'
|
312
|
-
expect(replies.last).to eq('Portland, OR 24h cloud cover |___________▁▁▁▁▁▁▁▁▃▅▅▅| range 0% - 49.0%')
|
312
|
+
expect(replies.last).to eq('Portland, OR, USA 24h cloud cover |___________▁▁▁▁▁▁▁▁▃▅▅▅| range 0% - 49.0%')
|
313
313
|
end
|
314
314
|
|
315
315
|
it '!asciicloud' do
|
316
316
|
send_command 'asciicloud'
|
317
|
-
expect(replies.last).to eq('Portland, OR 24h cloud cover |___________........-~~~| range 0% - 49.0%')
|
317
|
+
expect(replies.last).to eq('Portland, OR, USA 24h cloud cover |___________........-~~~| range 0% - 49.0%')
|
318
318
|
end
|
319
319
|
|
320
320
|
it '!asciitemp' do
|
321
321
|
send_command 'asciitemp'
|
322
|
-
expect(replies.last).to eq("Portland, OR 24 hr temps: 28.3°F |\u000306_.-\u000310~*'\u000303''\u000310''*~\u000306~------....\u0003| 28.4°F Range: 28.3°F - 39.0°F")
|
322
|
+
expect(replies.last).to eq("Portland, OR, USA 24 hr temps: 28.3°F |\u000306_.-\u000310~*'\u000303''\u000310''*~\u000306~------....\u0003| 28.4°F Range: 28.3°F - 39.0°F")
|
323
323
|
end
|
324
324
|
|
325
325
|
it '!asciirain' do
|
@@ -329,22 +329,22 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
329
329
|
|
330
330
|
it '!7day' do
|
331
331
|
send_command '7day'
|
332
|
-
expect(replies.last).to eq("Portland, OR 7day high/low temps 39.0°F |\u000303_▃\u000309▅\u000303▅\u000309▅███\u0003| 52.4°F / 28.2°F |\u000306_▁▃\u000310▅\u000303█\u000310▇\u000303██\u0003| 39.7°F Range: 28.17°F - 52.38°F")
|
332
|
+
expect(replies.last).to eq("Portland, OR, USA 7day high/low temps 39.0°F |\u000303_▃\u000309▅\u000303▅\u000309▅███\u0003| 52.4°F / 28.2°F |\u000306_▁▃\u000310▅\u000303█\u000310▇\u000303██\u0003| 39.7°F Range: 28.17°F - 52.38°F")
|
333
333
|
end
|
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%")
|
337
|
+
expect(replies.last).to eq("Portland, OR, USA 48 hr snows |\u000302_______________________❄❄❄❄▁▁▁▁▁▁▁▁▁▁▁▁▁❄❄❄❄❄❄❄❄_\u0003| max 4%")
|
338
338
|
end
|
339
339
|
|
340
340
|
it '!7dayrain' do
|
341
341
|
send_command '7dayrain'
|
342
|
-
expect(replies.last).to eq("Portland, OR 7day snows |\u000302_▁▁\u000306▃\u000313█\u000303▅▅\u000310▃\u0003| max 100%")
|
342
|
+
expect(replies.last).to eq("Portland, OR, USA 7day snows |\u000302_▁▁\u000306▃\u000313█\u000303▅▅\u000310▃\u0003| max 100%")
|
343
343
|
end
|
344
344
|
|
345
345
|
it '!ansiozone' do
|
346
346
|
send_command 'ansiozone'
|
347
|
-
expect(replies.last).to eq("Portland, OR ozones 357.98 |??????????◉◉◉??????????◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◎◎◎◎◎◎◎◎◎| 330.44 [24h forecast]")
|
347
|
+
expect(replies.last).to eq("Portland, OR, USA ozones 357.98 |??????????◉◉◉??????????◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◎◎◎◎◎◎◎◎◎| 330.44 [24h forecast]")
|
348
348
|
end
|
349
349
|
|
350
350
|
it '!set scale f' do
|
@@ -380,25 +380,25 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
380
380
|
it '!ansitemp in F' do
|
381
381
|
send_command 'set scale f'
|
382
382
|
send_command 'ansitemp'
|
383
|
-
expect(replies.last).to eq("Portland, OR 24 hr temps: 28.3°F |\u000306_▁▃\u000310▅▇█\u000303██\u000310██▇▅\u000306▅▃▃▃▃▃▃▁▁▁▁\u0003| 28.4°F Range: 28.3°F - 39.0°F")
|
383
|
+
expect(replies.last).to eq("Portland, OR, USA 24 hr temps: 28.3°F |\u000306_▁▃\u000310▅▇█\u000303██\u000310██▇▅\u000306▅▃▃▃▃▃▃▁▁▁▁\u0003| 28.4°F Range: 28.3°F - 39.0°F")
|
384
384
|
end
|
385
385
|
|
386
386
|
it '!ansitemp in k' do
|
387
387
|
send_command 'set scale k'
|
388
388
|
send_command 'ansitemp'
|
389
|
-
expect(replies.last).to eq("Portland, OR 24 hr temps: 271.09K |\u000306_▁▃\u000310▅▇█\u000303██\u000310██▇▅\u000306▅▃▃▃▃▃▃▁▁▁▁\u0003| 271.15K Range: 271.09K - 277.04K")
|
389
|
+
expect(replies.last).to eq("Portland, OR, USA 24 hr temps: 271.09K |\u000306_▁▃\u000310▅▇█\u000303██\u000310██▇▅\u000306▅▃▃▃▃▃▃▁▁▁▁\u0003| 271.15K Range: 271.09K - 277.04K")
|
390
390
|
end
|
391
391
|
|
392
392
|
it '!ansitemp in K' do
|
393
393
|
send_command 'set scale K'
|
394
394
|
send_command 'ansitemp'
|
395
|
-
expect(replies.last).to eq("Portland, OR 24 hr temps: 271.09K |\u000306_▁▃\u000310▅▇█\u000303██\u000310██▇▅\u000306▅▃▃▃▃▃▃▁▁▁▁\u0003| 271.15K Range: 271.09K - 277.04K")
|
395
|
+
expect(replies.last).to eq("Portland, OR, USA 24 hr temps: 271.09K |\u000306_▁▃\u000310▅▇█\u000303██\u000310██▇▅\u000306▅▃▃▃▃▃▃▁▁▁▁\u0003| 271.15K Range: 271.09K - 277.04K")
|
396
396
|
end
|
397
397
|
|
398
398
|
it '!ansitemp in C' do
|
399
399
|
send_command 'set scale c'
|
400
400
|
send_command 'ansitemp'
|
401
|
-
expect(replies.last).to eq("Portland, OR 24 hr temps: -2.06°C |\u000306_▁▃\u000310▅▇█\u000303██\u000310██▇▅\u000306▅▃▃▃▃▃▃▁▁▁▁\u0003| -2.0°C Range: -2.06°C - 3.89°C")
|
401
|
+
expect(replies.last).to eq("Portland, OR, USA 24 hr temps: -2.06°C |\u000306_▁▃\u000310▅▇█\u000303██\u000310██▇▅\u000306▅▃▃▃▃▃▃▁▁▁▁\u0003| -2.0°C Range: -2.06°C - 3.89°C")
|
402
402
|
end
|
403
403
|
|
404
404
|
it '!ansiwind in MPH' do
|
@@ -415,65 +415,65 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
415
415
|
|
416
416
|
it '!sunrise' do
|
417
417
|
send_command 'sunrise'
|
418
|
-
expect(replies.last).to include("Portland, OR sunrise: ")
|
418
|
+
expect(replies.last).to include("Portland, OR, USA sunrise: ")
|
419
419
|
end
|
420
420
|
|
421
421
|
it '!sunset' do
|
422
422
|
send_command 'sunset'
|
423
|
-
expect(replies.last).to include("Portland, OR sunset: ")
|
423
|
+
expect(replies.last).to include("Portland, OR, USA sunset: ")
|
424
424
|
end
|
425
425
|
|
426
426
|
it '!dailywind' do
|
427
427
|
send_command 'dailywind'
|
428
|
-
expect(replies.last).to eq("Portland, OR 7day winds 7.67 mph|\u000310█\u000306▅\u000310██\u000302▅▅▅\u000306▅\u0003|3.02 mph range 2.67 mph-7.67 mph")
|
428
|
+
expect(replies.last).to eq("Portland, OR, USA 7day winds 7.67 mph|\u000310█\u000306▅\u000310██\u000302▅▅▅\u000306▅\u0003|3.02 mph range 2.67 mph-7.67 mph")
|
429
429
|
end
|
430
430
|
|
431
431
|
it '!ansihumidity' do
|
432
432
|
send_command 'ansihumidity'
|
433
|
-
expect(replies.last).to eq("Portland, OR 48hr humidity 67%|\u000307▇\u000308▇▇▇\u000311▅▅▅▅▅▅▅▅▅▅\u000308▇▇▇▇▇▇▇\u000307▇▇▇▇▇▇▇▇▇▇▇▇\u000304████████████████\u0003|80% range: 41%-85%")
|
433
|
+
expect(replies.last).to eq("Portland, OR, USA 48hr humidity 67%|\u000307▇\u000308▇▇▇\u000311▅▅▅▅▅▅▅▅▅▅\u000308▇▇▇▇▇▇▇\u000307▇▇▇▇▇▇▇▇▇▇▇▇\u000304████████████████\u0003|80% range: 41%-85%")
|
434
434
|
end
|
435
435
|
|
436
436
|
it '!dailyhumidity' do
|
437
437
|
send_command 'dailyhumidity'
|
438
|
-
expect(replies.last).to eq("Portland, OR 7day humidity 58%|\u000302▇▇▇▇████\u0003|87% range 58%-93%")
|
438
|
+
expect(replies.last).to eq("Portland, OR, USA 7day humidity 58%|\u000302▇▇▇▇████\u0003|87% range 58%-93%")
|
439
439
|
end
|
440
440
|
|
441
441
|
it '!forecastallthethings' do
|
442
442
|
send_command 'forecastallthethings'
|
443
|
-
expect(replies[0]).to eq("Portland, OR weather is currently 28.39°F and clear. Winds out of the E at 5.74 mph. It will be clear for the hour, and flurries tomorrow morning. There are also 357.71 ozones.")
|
443
|
+
expect(replies[0]).to eq("Portland, OR, USA weather is currently 28.39°F and clear. Winds out of the E at 5.74 mph. It will be clear for the hour, and flurries tomorrow morning. There are also 357.71 ozones.")
|
444
444
|
expect(replies[1]).to include("|\u000302_❄\u000306▃\u000310▅\u000303▅\u000309▅\u000311▇\u000308▇\u000307█\u000304█\u000313█\u000302__________________________________________________\u0003|")
|
445
445
|
expect(replies[2]).to include("|\u000302_\u000313▅\u000310▁\u000303▃\u000309▃\u000311▃\u000308▅\u000307▅\u000304▅\u000313▅\u000302___________________________________________________\u0003|")
|
446
|
-
expect(replies[3]).to eq("Portland, OR 24 hr temps: 28.3°F |\u000306_▁▃\u000310▅▇█\u000303██\u000310██▇▅\u000306▅▃▃▃▃▃▃▁▁▁▁\u0003| 28.4°F Range: 28.3°F - 39.0°F")
|
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
|
-
expect(replies[5]).to eq("Portland, OR 48hr sun forecast |\u000308████████████████████\u000307▇▇▅\u000309▅▅▃\u000303▁_▁\u000309▃▃▃\u000303▁▁▁▁▃\u000309▃▅\u000307▇▇▇▇\u000308▇▇▇▇▇▇\u0003| max 100%")
|
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%")
|
451
|
-
expect(replies.last).to eq("Portland, OR 67%|\u000307▇\u000308▇▇▇\u000311▅▅▅▅▅▅▅▅▅▅\u000308▇▇▇▇▇▇▇\u000307▇▇▇▇▇▇▇▇▇▇▇▇\u000304████████████████\u0003|80% range: 41%-85%")
|
446
|
+
expect(replies[3]).to eq("Portland, OR, USA 24 hr temps: 28.3°F |\u000306_▁▃\u000310▅▇█\u000303██\u000310██▇▅\u000306▅▃▃▃▃▃▃▁▁▁▁\u0003| 28.4°F Range: 28.3°F - 39.0°F")
|
447
|
+
expect(replies[4]).to eq("Portland, OR, USA 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
|
+
expect(replies[5]).to eq("Portland, OR, USA 48hr sun forecast |\u000308████████████████████\u000307▇▇▅\u000309▅▅▃\u000303▁_▁\u000309▃▃▃\u000303▁▁▁▁▃\u000309▃▅\u000307▇▇▇▇\u000308▇▇▇▇▇▇\u0003| max 100%")
|
449
|
+
expect(replies[6]).to eq("Portland, OR, USA 24h cloud cover |___________▁▁▁▁▁▁▁▁▃▅▅▅| range 0% - 49.0%")
|
450
|
+
expect(replies[7]).to eq("Portland, OR, USA 48 hr snows |\u000302_______________________❄❄❄❄▁▁▁▁▁▁▁▁▁▁▁▁▁❄❄❄❄❄❄❄❄_\u0003| max 4%")
|
451
|
+
expect(replies.last).to eq("Portland, OR, USA 67%|\u000307▇\u000308▇▇▇\u000311▅▅▅▅▅▅▅▅▅▅\u000308▇▇▇▇▇▇▇\u000307▇▇▇▇▇▇▇▇▇▇▇▇\u000304████████████████\u0003|80% range: 41%-85%")
|
452
452
|
end
|
453
453
|
|
454
454
|
it '!ansipressure' do
|
455
455
|
send_command 'ansipressure'
|
456
|
-
expect(replies.last).to eq("Portland, OR pressure 1021.2 hPa |████▇▅▅▃▃▃▃▅▇▇▇▇▇▅▅▅▅▅▃▃▃▃▅▅▅▃▁▁▁__▁▁▃▃▅▅▅▅▅▃▁▁▁▃| 1018.31 hPa range: 1017.96-1021.2 hPa [48h forecast]")
|
456
|
+
expect(replies.last).to eq("Portland, OR, USA pressure 1021.2 hPa |████▇▅▅▃▃▃▃▅▇▇▇▇▇▅▅▅▅▅▃▃▃▃▅▅▅▃▁▁▁__▁▁▃▃▅▅▅▅▅▃▁▁▁▃| 1018.31 hPa range: 1017.96-1021.2 hPa [48h forecast]")
|
457
457
|
end
|
458
458
|
|
459
459
|
it '!ansibarometer' do
|
460
460
|
send_command 'ansibarometer'
|
461
|
-
expect(replies.last).to eq("Portland, OR pressure 1021.2 hPa |████▇▅▅▃▃▃▃▅▇▇▇▇▇▅▅▅▅▅▃▃▃▃▅▅▅▃▁▁▁__▁▁▃▃▅▅▅▅▅▃▁▁▁▃| 1018.31 hPa range: 1017.96-1021.2 hPa [48h forecast]")
|
461
|
+
expect(replies.last).to eq("Portland, OR, USA pressure 1021.2 hPa |████▇▅▅▃▃▃▃▅▇▇▇▇▇▅▅▅▅▅▃▃▃▃▅▅▅▃▁▁▁__▁▁▃▃▅▅▅▅▅▃▁▁▁▃| 1018.31 hPa range: 1017.96-1021.2 hPa [48h forecast]")
|
462
462
|
end
|
463
463
|
|
464
464
|
it '!dailypressure' do
|
465
465
|
send_command 'dailypressure'
|
466
|
-
expect(replies.last).to eq("Portland, OR pressure 1019.92 hPa |▅▅▃_▁▇██| 1027.26 hPa range: 1013.45-1027.26 hPa [8 day forecast]")
|
466
|
+
expect(replies.last).to eq("Portland, OR, USA pressure 1019.92 hPa |▅▅▃_▁▇██| 1027.26 hPa range: 1013.45-1027.26 hPa [8 day forecast]")
|
467
467
|
end
|
468
468
|
|
469
469
|
it '!dailybarometer' do
|
470
470
|
send_command 'dailybarometer'
|
471
|
-
expect(replies.last).to eq("Portland, OR pressure 1019.92 hPa |▅▅▃_▁▇██| 1027.26 hPa range: 1013.45-1027.26 hPa [8 day forecast]")
|
471
|
+
expect(replies.last).to eq("Portland, OR, USA pressure 1019.92 hPa |▅▅▃_▁▇██| 1027.26 hPa range: 1013.45-1027.26 hPa [8 day forecast]")
|
472
472
|
end
|
473
473
|
|
474
474
|
it '!asciiwind' do
|
475
475
|
send_command 'asciiwind'
|
476
|
-
expect(replies.last).to eq("Portland, OR 48h wind direction 4.3 mph|\u000306v\u000310,<\u000311\\^/\u000308>.\u000311v<<<<<<\u000310<<<<<<<\u000306<<<<<\u000302<<<,,,,vvv\u000306vvvvvvvv,,\u0003|4.18 mph Range: 1.39 mph - 12.71 mph")
|
476
|
+
expect(replies.last).to eq("Portland, OR, USA 48h wind direction 4.3 mph|\u000306v\u000310,<\u000311\\^/\u000308>.\u000311v<<<<<<\u000310<<<<<<<\u000306<<<<<\u000302<<<,,,,vvv\u000306vvvvvvvv,,\u0003|4.18 mph Range: 1.39 mph - 12.71 mph")
|
477
477
|
end
|
478
478
|
|
479
479
|
it '!geo' do
|
@@ -526,7 +526,7 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
526
526
|
it 'will not say a 28.000000000000004% chance of rain' do
|
527
527
|
mock_up '28000000000004percent'
|
528
528
|
send_command 'dailyrain'
|
529
|
-
expect(replies.last).to eq("Portland, OR 48 hr rains |\u000302▁_▁\u000306▃▃▃\u000310▅\u000302▁_▁▁\u000306▃\u000302▁\u000310▃\u000306▃\u000310▅\u000306▃\u000302▁▁▁▁▁▁__________________________\u0003| max 28%")
|
529
|
+
expect(replies.last).to eq("Portland, OR, USA 48 hr rains |\u000302▁_▁\u000306▃▃▃\u000310▅\u000302▁_▁▁\u000306▃\u000302▁\u000310▃\u000306▃\u000310▅\u000306▃\u000302▁▁▁▁▁▁__________________________\u0003| max 28%")
|
530
530
|
end
|
531
531
|
|
532
532
|
it 'will return windows for good morning' 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
|
+
version: 1.5.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-08-
|
11
|
+
date: 2016-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|