lita-onewheel-forecast-io 1.1.0 → 1.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e7939943f8bb42823cc685f74687541f8099cf3
|
4
|
+
data.tar.gz: dd6ab041be109af577e9988caca667c389782ee2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17a04e305e21c1e4ec04f7405c58be6882999e1516c9edaeadc71eecd6c89755894b69a81f0aedcbdc45fe8837b06f7cbce366a00e848f490e87bd14989ce57a
|
7
|
+
data.tar.gz: 95fb3a33b960f4fc540b9bb5893ffdb4800cfaa67f5a26bf0e74a8ca38287d3c2a512b6a3d4b36d0b9b6259f9d7e42144adb466da80736bf4564086374590e1a
|
@@ -191,18 +191,19 @@ module ForecastIo
|
|
191
191
|
key = 'cloudCover'
|
192
192
|
data_points = []
|
193
193
|
data = forecast['hourly']['data']
|
194
|
+
sun_mod_data = []
|
194
195
|
|
195
196
|
data.each do |datum|
|
196
197
|
data_points.push (1 - datum[key]).to_f # It's a cloud cover percentage, so let's inverse it to give us sun cover.
|
197
|
-
|
198
|
+
sun_mod_data << {key => (1 - datum[key]).to_f} # Mod the source data for the get_dot_str call below.
|
198
199
|
end
|
199
200
|
|
200
201
|
differential = data_points.max - data_points.min
|
201
202
|
|
202
|
-
str = get_dot_str(chars,
|
203
|
+
str = get_dot_str(chars, sun_mod_data, data_points.min, differential, key)
|
203
204
|
|
204
205
|
if config.colors
|
205
|
-
str = get_colored_string(
|
206
|
+
str = get_colored_string(sun_mod_data, key, str, get_sun_range_colors)
|
206
207
|
end
|
207
208
|
|
208
209
|
max = 1 - get_min_by_data_key(forecast, 'hourly', key)
|
@@ -293,7 +293,7 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
293
293
|
|
294
294
|
it '!ansisun' do
|
295
295
|
send_command 'ansisun'
|
296
|
-
expect(replies.last).to eq("Portland, OR 48hr sun forecast |\u000308████████████████████\u000307▇▇▅\u000309▅▅▃\u000303▁_▁\u000309▃▃▃\u000303▁▁▁▁▃\u000309▃▅\u000307▇▇▇▇\u000308▇▇▇▇▇▇\u0003| max
|
296
|
+
expect(replies.last).to eq("Portland, OR 48hr sun forecast |\u000308████████████████████\u000307▇▇▅\u000309▅▅▃\u000303▁_▁\u000309▃▃▃\u000303▁▁▁▁▃\u000309▃▅\u000307▇▇▇▇\u000308▇▇▇▇▇▇\u0003| max 100%")
|
297
297
|
end
|
298
298
|
|
299
299
|
it '!dailysun' do
|
@@ -303,7 +303,7 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
303
303
|
|
304
304
|
it '!asciisun' do
|
305
305
|
send_command 'asciisun'
|
306
|
-
expect(replies.last).to eq("Portland, OR 48hr sun forecast |\u000308''''''''''''''''''''\u000307**~\u000309~~-\u000303._.\u000309---\u000303....-\u000309-~\u000307****\u000308******\u0003| max
|
306
|
+
expect(replies.last).to eq("Portland, OR 48hr sun forecast |\u000308''''''''''''''''''''\u000307**~\u000309~~-\u000303._.\u000309---\u000303....-\u000309-~\u000307****\u000308******\u0003| max 100%")
|
307
307
|
end
|
308
308
|
|
309
309
|
it '!ansicloud' do
|
@@ -444,8 +444,8 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
444
444
|
expect(replies[2]).to include("|\u000302_\u000313▅\u000310▁\u000303▃\u000309▃\u000311▃\u000308▅\u000307▅\u000304▅\u000313▅\u000302___________________________________________________\u0003|")
|
445
445
|
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")
|
446
446
|
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")
|
447
|
-
expect(replies[5]).to eq("Portland, OR 48hr sun forecast |\u000308████████████████████\u000307▇▇▅\u000309▅▅▃\u000303▁_▁\u000309▃▃▃\u000303▁▁▁▁▃\u000309▃▅\u000307▇▇▇▇\u000308▇▇▇▇▇▇\u0003| max
|
448
|
-
expect(replies[6]).to eq("Portland, OR 24h cloud cover
|
447
|
+
expect(replies[5]).to eq("Portland, OR 48hr sun forecast |\u000308████████████████████\u000307▇▇▅\u000309▅▅▃\u000303▁_▁\u000309▃▃▃\u000303▁▁▁▁▃\u000309▃▅\u000307▇▇▇▇\u000308▇▇▇▇▇▇\u0003| max 100%")
|
448
|
+
expect(replies[6]).to eq("Portland, OR 24h cloud cover |___________▁▁▁▁▁▁▁▁▃▅▅▅| range 0% - 49.0%")
|
449
449
|
expect(replies[7]).to eq("Portland, OR 48 hr snows |\u000302_______________________❄❄❄❄▁▁▁▁▁▁▁▁▁▁▁▁▁❄❄❄❄❄❄❄❄_\u0003| max 4.0%")
|
450
450
|
end
|
451
451
|
|