lita-onewheel-forecast-io 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/lib/lita/handlers/onewheel_forecast_io.rb +80 -80
- data/lita-onewheel-forecast-io.gemspec +1 -1
- data/spec/lita/handlers/forecast_io_spec.rb +147 -147
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee47eae385f378bf319c59b6df157c3609a2bcd9
|
4
|
+
data.tar.gz: c3b616d65adfb5847025c2f1146fb91fcef64be4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d538de3faea9f702a9f9243b04c6f35f239b979c45deba24a6471bb0b6992c11859cf657a6d54af1f12b0932f0d56715322d72afabacc1c7ad46b676eb50f09
|
7
|
+
data.tar.gz: f65f9e64b7ea4ed345ae910544696c2f720c511a72b06121d67c2be8b0a217931b767a5a1cf6b03c946c1f6ab2b98b16f62d02ca0c1e1ce7caa4e29c7de243e0
|
data/.travis.yml
CHANGED
@@ -21,37 +21,37 @@ module Lita
|
|
21
21
|
include ::ForecastIo::Utils
|
22
22
|
|
23
23
|
# Temperature routes
|
24
|
-
route(/^ansitemp\s*$/i, :handle_irc_ansitemp)
|
25
|
-
route(/^ansitemp\s+(.+)/i, :handle_irc_ansitemp,
|
24
|
+
route(/^ansitemp\s*$/i, :handle_irc_ansitemp, command: true)
|
25
|
+
route(/^ansitemp\s+(.+)/i, :handle_irc_ansitemp, command: true,
|
26
26
|
help: {'!ansitemp [location]' => 'The 24h temperature scale for [location].'})
|
27
|
-
route(/^dailytemp\s*$/i, :handle_irc_daily_temp)
|
28
|
-
route(/^dailytemp\s+(.+)/i, :handle_irc_daily_temp,
|
27
|
+
route(/^dailytemp\s*$/i, :handle_irc_daily_temp, command: true)
|
28
|
+
route(/^dailytemp\s+(.+)/i, :handle_irc_daily_temp, command: true,
|
29
29
|
help: { '!dailytemp [location]' => '48h temperature scale for [location].'})
|
30
|
-
route(/^7day\s*$/i, :handle_irc_seven_day)
|
31
|
-
route(/^7day\s+(.+)/i, :handle_irc_seven_day,
|
30
|
+
route(/^7day\s*$/i, :handle_irc_seven_day, command: true)
|
31
|
+
route(/^7day\s+(.+)/i, :handle_irc_seven_day, command: true,
|
32
32
|
help: { '!7day [location]' => '7 day temperature scale, featuring highs and lows.'})
|
33
|
-
route(/^weekly\s*$/i, :handle_irc_seven_day)
|
34
|
-
route(/^weekly\s+(.+)/i, :handle_irc_seven_day,
|
33
|
+
route(/^weekly\s*$/i, :handle_irc_seven_day, command: true)
|
34
|
+
route(/^weekly\s+(.+)/i, :handle_irc_seven_day, command: true,
|
35
35
|
help: { '!weekly [location]' => 'Alias for !7day.'})
|
36
|
-
route(/^asciitemp\s*$/i, :handle_irc_ascii_temp)
|
37
|
-
route(/^asciitemp\s+(.+)/i, :handle_irc_ascii_temp,
|
36
|
+
route(/^asciitemp\s*$/i, :handle_irc_ascii_temp, command: true)
|
37
|
+
route(/^asciitemp\s+(.+)/i, :handle_irc_ascii_temp, command: true,
|
38
38
|
help: { '!asciitemp [location]' => 'Like ansitemp, but with less ansi.'})
|
39
|
-
route(/^ieeetemp\s*$/i, :handle_irc_ieeetemp)
|
40
|
-
route(/^ieeetemp\s+(.+)/i, :handle_irc_ieeetemp,
|
39
|
+
route(/^ieeetemp\s*$/i, :handle_irc_ieeetemp, command: true)
|
40
|
+
route(/^ieeetemp\s+(.+)/i, :handle_irc_ieeetemp, command: true,
|
41
41
|
help: {'!ieeetemp [location]' => 'The 24h temperature scale for [location], kelvin-style.'})
|
42
42
|
|
43
43
|
# General forecast routes
|
44
|
-
route(/^forecastallthethings\s*$/i, :handle_irc_all_the_things)
|
45
|
-
route(/^forecastallthethings\s+(.+)/i, :handle_irc_all_the_things,
|
44
|
+
route(/^forecastallthethings\s*$/i, :handle_irc_all_the_things, command: true)
|
45
|
+
route(/^forecastallthethings\s+(.+)/i, :handle_irc_all_the_things, command: true,
|
46
46
|
help: { '!forecastallthethings [location]' => 'A huge dump of most available info for [location].'})
|
47
|
-
route(/^forecast\s*$/i, :handle_irc_forecast)
|
48
|
-
route(/^forecast\s+(.+)/i, :handle_irc_forecast,
|
47
|
+
route(/^forecast\s*$/i, :handle_irc_forecast, command: true)
|
48
|
+
route(/^forecast\s+(.+)/i, :handle_irc_forecast, command: true,
|
49
49
|
help: { '!forecast [location]' => 'Text forcast of the location selected.'})
|
50
|
-
route(/^weather\s*$/i, :handle_irc_forecast)
|
51
|
-
route(/^weather\s+(.+)/i, :handle_irc_forecast,
|
50
|
+
route(/^weather\s*$/i, :handle_irc_forecast, command: true)
|
51
|
+
route(/^weather\s+(.+)/i, :handle_irc_forecast, command: true,
|
52
52
|
help: { '!weather [location]' => 'Alias for !forecast.'})
|
53
|
-
route(/^condi*t*i*o*n*s*\s*$/i, :handle_irc_conditions)
|
54
|
-
route(/^condi*t*i*o*n*s*\s+(.+)/i, :handle_irc_conditions,
|
53
|
+
route(/^condi*t*i*o*n*s*\s*$/i, :handle_irc_conditions, command: true)
|
54
|
+
route(/^condi*t*i*o*n*s*\s+(.+)/i, :handle_irc_conditions, command: true,
|
55
55
|
help: { '!cond[itions] [location]' => 'A single-line summary of the conditions at [location].'})
|
56
56
|
|
57
57
|
# One-offs
|
@@ -61,114 +61,114 @@ module Lita
|
|
61
61
|
route(/^snow\s*$/i, :is_it_snowing)
|
62
62
|
route(/^snow\s+(.+)/i, :is_it_snowing,
|
63
63
|
help: { '!snow [location]' => 'Magic Eightball response to whether or not it is snowing in [location] right now.'})
|
64
|
-
route(/^geo\s*$/i, :handle_geo_lookup)
|
65
|
-
route(/^geo\s+(.+)/i, :handle_geo_lookup,
|
64
|
+
route(/^geo\s*$/i, :handle_geo_lookup, command: true)
|
65
|
+
route(/^geo\s+(.+)/i, :handle_geo_lookup, command: true,
|
66
66
|
help: { '!geo [location]' => 'A simple geo-lookup returning GPS coords.'})
|
67
|
-
route(/^alerts\s*$/i, :handle_irc_alerts)
|
68
|
-
route(/^alerts\s+(.+)/i, :handle_irc_alerts,
|
67
|
+
route(/^alerts\s*$/i, :handle_irc_alerts, command: true)
|
68
|
+
route(/^alerts\s+(.+)/i, :handle_irc_alerts, command: true,
|
69
69
|
help: { '!alerts [location]' => 'NOAA alerts for [location].'})
|
70
|
-
route(/^neareststorm\s*$/i, :handle_irc_neareststorm)
|
71
|
-
route(/^neareststorm\s+(.+)$/i, :handle_irc_neareststorm,
|
70
|
+
route(/^neareststorm\s*$/i, :handle_irc_neareststorm, command: true)
|
71
|
+
route(/^neareststorm\s+(.+)$/i, :handle_irc_neareststorm, command: true,
|
72
72
|
help: { '!neareststorm [location]' => 'Nearest storm distance for [location].'})
|
73
73
|
|
74
74
|
# State Commands
|
75
|
-
route(/^set scale (c|f|k)/i, :handle_irc_set_scale,
|
75
|
+
route(/^set scale (c|f|k)/i, :handle_irc_set_scale, command: true,
|
76
76
|
help: { '!set scale [c|f|k]' => 'Set the scale to your chosen degrees.'})
|
77
|
-
route(/^set scale$/i, :handle_irc_set_scale,
|
77
|
+
route(/^set scale$/i, :handle_irc_set_scale, command: true,
|
78
78
|
help: { '!set scale' => 'Toggle between C and F scales.'})
|
79
79
|
|
80
80
|
# Humidity
|
81
|
-
route(/^ansihumidity\s*$/i, :handle_irc_ansi_humidity)
|
82
|
-
route(/^ansihumidity\s+(.+)/i, :handle_irc_ansi_humidity,
|
81
|
+
route(/^ansihumidity\s*$/i, :handle_irc_ansi_humidity, command: true)
|
82
|
+
route(/^ansihumidity\s+(.+)/i, :handle_irc_ansi_humidity, command: true,
|
83
83
|
help: { '!ansihumidity [location]' => '48h humidity report for [location].'})
|
84
|
-
route(/^dailyhumidity\s*$/i, :handle_irc_daily_humidity)
|
85
|
-
route(/^dailyhumidity\s+(.+)/i, :handle_irc_daily_humidity,
|
84
|
+
route(/^dailyhumidity\s*$/i, :handle_irc_daily_humidity, command: true)
|
85
|
+
route(/^dailyhumidity\s+(.+)/i, :handle_irc_daily_humidity, command: true,
|
86
86
|
help: { '!dailyhumidity [location]' => '7 day humidity report.'})
|
87
87
|
|
88
88
|
# Rain related. Where we all started.
|
89
|
-
route(/^ansirain\s*$/i, :handle_irc_ansirain)
|
90
|
-
route(/^ansirain\s+(.+)/i, :handle_irc_ansirain,
|
89
|
+
route(/^ansirain\s*$/i, :handle_irc_ansirain, command: true)
|
90
|
+
route(/^ansirain\s+(.+)/i, :handle_irc_ansirain, command: true,
|
91
91
|
help: { '!ansirain [location]' => '60m rain chance report for [location].'})
|
92
|
-
route(/^ansisnow\s*$/i, :handle_irc_ansirain)
|
93
|
-
route(/^ansisnow\s+(.+)/i, :handle_irc_ansirain,
|
92
|
+
route(/^ansisnow\s*$/i, :handle_irc_ansirain, command: true)
|
93
|
+
route(/^ansisnow\s+(.+)/i, :handle_irc_ansirain, command: true,
|
94
94
|
help: { '!ansisnow [location]' => 'Alias for !ansirain.'})
|
95
|
-
route(/^dailyrain\s*$/i, :handle_irc_daily_rain)
|
96
|
-
route(/^dailyrain\s+(.+)/i, :handle_irc_daily_rain,
|
95
|
+
route(/^dailyrain\s*$/i, :handle_irc_daily_rain, command: true)
|
96
|
+
route(/^dailyrain\s+(.+)/i, :handle_irc_daily_rain, command: true,
|
97
97
|
help: { '!dailyrain [location]' => '48h rain chance report for [location].'})
|
98
|
-
route(/^dailysnow\s*$/i, :handle_irc_daily_rain)
|
99
|
-
route(/^dailysnow\s+(.+)/i, :handle_irc_daily_rain,
|
98
|
+
route(/^dailysnow\s*$/i, :handle_irc_daily_rain, command: true)
|
99
|
+
route(/^dailysnow\s+(.+)/i, :handle_irc_daily_rain, command: true,
|
100
100
|
help: { '!dailysnow [location]' => 'Alias for !dailyrain.'})
|
101
|
-
route(/^7dayrain\s*$/i, :handle_irc_seven_day_rain)
|
102
|
-
route(/^7dayrain\s+(.+)/i, :handle_irc_seven_day_rain,
|
101
|
+
route(/^7dayrain\s*$/i, :handle_irc_seven_day_rain, command: true)
|
102
|
+
route(/^7dayrain\s+(.+)/i, :handle_irc_seven_day_rain, command: true,
|
103
103
|
help: { '!7dayrain [location]' => '7 day rain chance report for [location].'})
|
104
|
-
route(/^weeklyrain\s*$/i, :handle_irc_seven_day_rain)
|
105
|
-
route(/^weeklyrain\s+(.+)/i, :handle_irc_seven_day_rain,
|
104
|
+
route(/^weeklyrain\s*$/i, :handle_irc_seven_day_rain, command: true)
|
105
|
+
route(/^weeklyrain\s+(.+)/i, :handle_irc_seven_day_rain, command: true,
|
106
106
|
help: { '!weeklyrain [location]' => 'Alias for !7dayrain.'})
|
107
|
-
route(/^weeklysnow\s*$/i, :handle_irc_seven_day_rain)
|
108
|
-
route(/^weeklysnow\s+(.+)/i, :handle_irc_seven_day_rain,
|
107
|
+
route(/^weeklysnow\s*$/i, :handle_irc_seven_day_rain, command: true)
|
108
|
+
route(/^weeklysnow\s+(.+)/i, :handle_irc_seven_day_rain, command: true,
|
109
109
|
help: { '!weeklysnow [location]' => 'Alias for !7dayrain.'})
|
110
|
-
route(/^ansiintensity\s*$/i, :handle_irc_ansirain_intensity)
|
111
|
-
route(/^ansiintensity\s+(.+)/i, :handle_irc_ansirain_intensity,
|
110
|
+
route(/^ansiintensity\s*$/i, :handle_irc_ansirain_intensity, command: true)
|
111
|
+
route(/^ansiintensity\s+(.+)/i, :handle_irc_ansirain_intensity, command: true,
|
112
112
|
help: { '!ansiintensity [location]' => '60m rain intensity report for [location].'})
|
113
|
-
route(/^asciirain\s*$/i, :handle_irc_ascii_rain)
|
114
|
-
route(/^asciirain\s+(.+)/i, :handle_irc_ascii_rain,
|
113
|
+
route(/^asciirain\s*$/i, :handle_irc_ascii_rain, command: true)
|
114
|
+
route(/^asciirain\s+(.+)/i, :handle_irc_ascii_rain, command: true,
|
115
115
|
help: { '!asciirain [location]' => '60m rain chance report for [location], ascii style!'})
|
116
116
|
|
117
117
|
# don't start singing.
|
118
|
-
route(/^sunrise\s*$/i, :handle_irc_sunrise)
|
119
|
-
route(/^sunrise\s+(.+)/i, :handle_irc_sunrise,
|
118
|
+
route(/^sunrise\s*$/i, :handle_irc_sunrise, command: true)
|
119
|
+
route(/^sunrise\s+(.+)/i, :handle_irc_sunrise, command: true,
|
120
120
|
help: { '!sunrise [location]' => 'Get today\'s sunrise time for [location].'})
|
121
|
-
route(/^sunset\s*$/i, :handle_irc_sunset)
|
122
|
-
route(/^sunset\s+(.+)/i, :handle_irc_sunset,
|
121
|
+
route(/^sunset\s*$/i, :handle_irc_sunset, command: true)
|
122
|
+
route(/^sunset\s+(.+)/i, :handle_irc_sunset, command: true,
|
123
123
|
help: { '!sunset [location]' => 'Get today\'s sunset time for [location].'})
|
124
|
-
route(/^ansisun\s*$/i, :handle_irc_ansisun)
|
125
|
-
route(/^ansisun\s+(.+)/i, :handle_irc_ansisun,
|
124
|
+
route(/^ansisun\s*$/i, :handle_irc_ansisun, command: true)
|
125
|
+
route(/^ansisun\s+(.+)/i, :handle_irc_ansisun, command: true,
|
126
126
|
help: { '!ansisun [location]' => '48 hour chance-of-sun report for [location].'})
|
127
|
-
route(/^dailysun\s*$/i, :handle_irc_dailysun)
|
128
|
-
route(/^dailysun\s+(.+)/i, :handle_irc_dailysun,
|
127
|
+
route(/^dailysun\s*$/i, :handle_irc_dailysun, command: true)
|
128
|
+
route(/^dailysun\s+(.+)/i, :handle_irc_dailysun, command: true,
|
129
129
|
help: { '!ansisun [location]' => '7 day chance-of-sun report for [location].'})
|
130
|
-
route(/^asciisun\s*$/i, :handle_irc_asciisun)
|
131
|
-
route(/^asciisun\s+(.+)/i, :handle_irc_asciisun,
|
130
|
+
route(/^asciisun\s*$/i, :handle_irc_asciisun, command: true)
|
131
|
+
route(/^asciisun\s+(.+)/i, :handle_irc_asciisun, command: true,
|
132
132
|
help: { '!asciisun [location]' => '7 day chance-of-sun report for [location].'})
|
133
133
|
|
134
134
|
# Mun!
|
135
135
|
|
136
136
|
# Wind
|
137
|
-
route(/^ansiwind\s*$/i, :handle_irc_ansiwind)
|
138
|
-
route(/^ansiwind\s+(.+)/i, :handle_irc_ansiwind,
|
137
|
+
route(/^ansiwind\s*$/i, :handle_irc_ansiwind, command: true)
|
138
|
+
route(/^ansiwind\s+(.+)/i, :handle_irc_ansiwind, command: true,
|
139
139
|
help: { '!ansiwind [location]' => '24h wind speed/direction report for [location].'})
|
140
|
-
route(/^asciiwind\s*$/i, :handle_irc_ascii_wind)
|
141
|
-
route(/^asciiwind\s+(.+)/i, :handle_irc_ascii_wind,
|
140
|
+
route(/^asciiwind\s*$/i, :handle_irc_ascii_wind, command: true)
|
141
|
+
route(/^asciiwind\s+(.+)/i, :handle_irc_ascii_wind, command: true,
|
142
142
|
help: { '!asciiwind [location]' => '24h wind speed/direction report for [location], ascii style.'})
|
143
|
-
route(/^dailywind\s*$/i, :handle_irc_daily_wind)
|
144
|
-
route(/^dailywind\s+(.+)/i, :handle_irc_daily_wind,
|
143
|
+
route(/^dailywind\s*$/i, :handle_irc_daily_wind, command: true)
|
144
|
+
route(/^dailywind\s+(.+)/i, :handle_irc_daily_wind, command: true,
|
145
145
|
help: { '!dailywind [location]' => '7 day wind speed/direction report for [location].'})
|
146
146
|
|
147
147
|
# Cloud cover
|
148
|
-
route(/^asciiclouds*\s+(.+)/i, :handle_irc_asciicloud)
|
149
|
-
route(/^asciiclouds*\s*$/i, :handle_irc_asciicloud,
|
148
|
+
route(/^asciiclouds*\s+(.+)/i, :handle_irc_asciicloud, command: true)
|
149
|
+
route(/^asciiclouds*\s*$/i, :handle_irc_asciicloud, command: true,
|
150
150
|
help: { '!asciicloud [location]' => '24h cloud cover report for [location].'})
|
151
|
-
route(/^ansiclouds*\s*$/i, :handle_irc_ansicloud)
|
152
|
-
route(/^ansiclouds*\s+(.+)/i, :handle_irc_ansicloud,
|
151
|
+
route(/^ansiclouds*\s*$/i, :handle_irc_ansicloud, command: true)
|
152
|
+
route(/^ansiclouds*\s+(.+)/i, :handle_irc_ansicloud, command: true,
|
153
153
|
help: { '!ansicloud [location]' => '24h cloud cover report for [location].'})
|
154
154
|
|
155
155
|
# oooOOOoooo
|
156
|
-
route(/^ansiozone\s*$/i, :handle_irc_ansiozone)
|
157
|
-
route(/^ansiozone\s+(.+)/i, :handle_irc_ansiozone,
|
156
|
+
route(/^ansiozone\s*$/i, :handle_irc_ansiozone, command: true)
|
157
|
+
route(/^ansiozone\s+(.+)/i, :handle_irc_ansiozone, command: true,
|
158
158
|
help: { '!ansiozone [location]' => '24h ozone level report for [location].'})
|
159
159
|
|
160
160
|
# Pressure
|
161
|
-
route(/^ansipressure\s*$/i, :handle_irc_ansi_pressure)
|
162
|
-
route(/^ansipressure\s+(.+)/i, :handle_irc_ansi_pressure,
|
161
|
+
route(/^ansipressure\s*$/i, :handle_irc_ansi_pressure, command: true)
|
162
|
+
route(/^ansipressure\s+(.+)/i, :handle_irc_ansi_pressure, command: true,
|
163
163
|
help: { '!ansipressure [location]' => '48h barometric pressure report for [location].'})
|
164
|
-
route(/^ansibarometer\s*$/i, :handle_irc_ansi_pressure)
|
165
|
-
route(/^ansibarometer\s+(.+)/i, :handle_irc_ansi_pressure,
|
164
|
+
route(/^ansibarometer\s*$/i, :handle_irc_ansi_pressure, command: true)
|
165
|
+
route(/^ansibarometer\s+(.+)/i, :handle_irc_ansi_pressure, command: true,
|
166
166
|
help: { '!ansibarometer [location]' => 'Alias for !ansipressure.'})
|
167
|
-
route(/^dailypressure\s*$/i, :handle_irc_daily_pressure)
|
168
|
-
route(/^dailypressure\s+(.+)/i, :handle_irc_daily_pressure,
|
167
|
+
route(/^dailypressure\s*$/i, :handle_irc_daily_pressure, command: true)
|
168
|
+
route(/^dailypressure\s+(.+)/i, :handle_irc_daily_pressure, command: true,
|
169
169
|
help: { '!dailypressure [location]' => '7 day barometric pressure report for [location].'})
|
170
|
-
route(/^dailybarometer\s*$/i, :handle_irc_daily_pressure)
|
171
|
-
route(/^dailybarometer\s+(.+)/i, :handle_irc_daily_pressure,
|
170
|
+
route(/^dailybarometer\s*$/i, :handle_irc_daily_pressure, command: true)
|
171
|
+
route(/^dailybarometer\s+(.+)/i, :handle_irc_daily_pressure, command: true,
|
172
172
|
help: { '!dailybarometer [location]' => 'Alias for !dailypressure.'})
|
173
173
|
|
174
174
|
end
|
@@ -19,101 +19,101 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
it { is_expected.to
|
23
|
-
it { is_expected.to
|
22
|
+
it { is_expected.to route_command('forecast') }
|
23
|
+
it { is_expected.to route_command('weather') }
|
24
24
|
it { is_expected.to route('rain') }
|
25
25
|
it { is_expected.to route('snow') }
|
26
|
-
it { is_expected.to
|
27
|
-
it { is_expected.to
|
28
|
-
it { is_expected.to
|
29
|
-
it { is_expected.to
|
30
|
-
it { is_expected.to
|
31
|
-
it { is_expected.to
|
32
|
-
it { is_expected.to
|
33
|
-
it { is_expected.to
|
34
|
-
it { is_expected.to
|
35
|
-
it { is_expected.to
|
36
|
-
it { is_expected.to
|
37
|
-
it { is_expected.to
|
38
|
-
it { is_expected.to
|
39
|
-
it { is_expected.to
|
40
|
-
it { is_expected.to
|
41
|
-
it { is_expected.to
|
42
|
-
it { is_expected.to
|
43
|
-
it { is_expected.to
|
44
|
-
it { is_expected.to
|
45
|
-
it { is_expected.to
|
46
|
-
it { is_expected.to
|
47
|
-
it { is_expected.to
|
48
|
-
it { is_expected.to
|
49
|
-
it { is_expected.to
|
50
|
-
it { is_expected.to
|
51
|
-
it { is_expected.to
|
52
|
-
it { is_expected.to
|
53
|
-
it { is_expected.to
|
54
|
-
it { is_expected.to
|
55
|
-
it { is_expected.to
|
56
|
-
it { is_expected.to
|
57
|
-
it { is_expected.to
|
58
|
-
it { is_expected.to
|
59
|
-
it { is_expected.to
|
60
|
-
it { is_expected.to
|
61
|
-
it { is_expected.to
|
62
|
-
it { is_expected.to
|
63
|
-
it { is_expected.to
|
64
|
-
it { is_expected.to
|
65
|
-
it { is_expected.to
|
66
|
-
it { is_expected.to
|
67
|
-
it { is_expected.to
|
68
|
-
it { is_expected.to
|
69
|
-
it { is_expected.to
|
70
|
-
it { is_expected.to
|
71
|
-
it { is_expected.to
|
72
|
-
it { is_expected.to
|
26
|
+
it { is_expected.to route_command('ansirain') }
|
27
|
+
it { is_expected.to route_command('ansisnow') }
|
28
|
+
it { is_expected.to route_command('ansihumidity') }
|
29
|
+
it { is_expected.to route_command('ansiintensity') }
|
30
|
+
it { is_expected.to route_command('ansitemp') }
|
31
|
+
it { is_expected.to route_command('ieeetemp') }
|
32
|
+
it { is_expected.to route_command('ansiwind') }
|
33
|
+
it { is_expected.to route_command('asciiwind') }
|
34
|
+
it { is_expected.to route_command('ansisun') }
|
35
|
+
it { is_expected.to route_command('dailysun') }
|
36
|
+
it { is_expected.to route_command('asciisun') }
|
37
|
+
it { is_expected.to route_command('asciicloud') }
|
38
|
+
it { is_expected.to route_command('ansicloud') }
|
39
|
+
it { is_expected.to route_command('ansiclouds') }
|
40
|
+
it { is_expected.to route_command('asciitemp') }
|
41
|
+
it { is_expected.to route_command('asciirain') }
|
42
|
+
it { is_expected.to route_command('7day') }
|
43
|
+
it { is_expected.to route_command('weekly') }
|
44
|
+
it { is_expected.to route_command('dailyrain') }
|
45
|
+
it { is_expected.to route_command('dailysnow') }
|
46
|
+
it { is_expected.to route_command('dailytemp') }
|
47
|
+
it { is_expected.to route_command('dailyhumidity') }
|
48
|
+
it { is_expected.to route_command('7dayrain') }
|
49
|
+
it { is_expected.to route_command('weeklyrain') }
|
50
|
+
it { is_expected.to route_command('weeklysnow') }
|
51
|
+
it { is_expected.to route_command('dailywind') }
|
52
|
+
it { is_expected.to route_command('alerts') }
|
53
|
+
it { is_expected.to route_command('ansiozone') }
|
54
|
+
it { is_expected.to route_command('cond') }
|
55
|
+
it { is_expected.to route_command('condi') }
|
56
|
+
it { is_expected.to route_command('condit') }
|
57
|
+
it { is_expected.to route_command('conditi') }
|
58
|
+
it { is_expected.to route_command('conditio') }
|
59
|
+
it { is_expected.to route_command('condition') }
|
60
|
+
it { is_expected.to route_command('conditions') }
|
61
|
+
it { is_expected.to route_command('set scale f') }
|
62
|
+
it { is_expected.to route_command('set scale c') }
|
63
|
+
it { is_expected.to route_command('set scale k') }
|
64
|
+
it { is_expected.to route_command('set scale') }
|
65
|
+
it { is_expected.to route_command('sunrise') }
|
66
|
+
it { is_expected.to route_command('sunset') }
|
67
|
+
it { is_expected.to route_command('forecastallthethings') }
|
68
|
+
it { is_expected.to route_command('ansipressure') }
|
69
|
+
it { is_expected.to route_command('ansibarometer') }
|
70
|
+
it { is_expected.to route_command('dailypressure') }
|
71
|
+
it { is_expected.to route_command('dailybarometer') }
|
72
|
+
it { is_expected.to route_command('neareststorm') }
|
73
73
|
|
74
74
|
# This is where we test for regex overflow, so !weeklyrain doesn't try to get a forecast for Rain, Germany.
|
75
|
-
it { is_expected.not_to
|
76
|
-
it { is_expected.not_to
|
77
|
-
it { is_expected.not_to
|
78
|
-
it { is_expected.not_to
|
79
|
-
it { is_expected.not_to
|
80
|
-
it { is_expected.not_to
|
81
|
-
it { is_expected.not_to
|
82
|
-
it { is_expected.not_to
|
83
|
-
it { is_expected.not_to
|
84
|
-
it { is_expected.not_to
|
85
|
-
it { is_expected.not_to
|
86
|
-
it { is_expected.not_to
|
87
|
-
it { is_expected.not_to
|
88
|
-
it { is_expected.not_to
|
89
|
-
it { is_expected.not_to
|
90
|
-
it { is_expected.not_to
|
91
|
-
it { is_expected.not_to
|
92
|
-
it { is_expected.not_to
|
93
|
-
it { is_expected.not_to
|
94
|
-
it { is_expected.not_to
|
95
|
-
it { is_expected.not_to
|
96
|
-
it { is_expected.not_to
|
97
|
-
it { is_expected.not_to
|
98
|
-
it { is_expected.not_to
|
99
|
-
it { is_expected.not_to
|
100
|
-
it { is_expected.not_to
|
101
|
-
it { is_expected.not_to
|
102
|
-
it { is_expected.not_to
|
103
|
-
it { is_expected.not_to
|
104
|
-
it { is_expected.not_to
|
105
|
-
it { is_expected.not_to
|
106
|
-
it { is_expected.not_to
|
107
|
-
it { is_expected.not_to
|
108
|
-
it { is_expected.not_to
|
109
|
-
it { is_expected.not_to
|
110
|
-
it { is_expected.not_to
|
111
|
-
it { is_expected.not_to
|
112
|
-
it { is_expected.not_to
|
113
|
-
it { is_expected.not_to
|
75
|
+
it { is_expected.not_to route_command('forecastrain') }
|
76
|
+
it { is_expected.not_to route_command('weatherrain') }
|
77
|
+
it { is_expected.not_to route_command('rainrain') }
|
78
|
+
it { is_expected.not_to route_command('snowrain') }
|
79
|
+
it { is_expected.not_to route_command('ansirainrain') }
|
80
|
+
it { is_expected.not_to route_command('ansisnowrain') }
|
81
|
+
it { is_expected.not_to route_command('ansihumidityrain') }
|
82
|
+
it { is_expected.not_to route_command('ansiintensityrain') }
|
83
|
+
it { is_expected.not_to route_command('ansitemprain') }
|
84
|
+
it { is_expected.not_to route_command('ansiwindrain') }
|
85
|
+
it { is_expected.not_to route_command('asciiwindrain') }
|
86
|
+
it { is_expected.not_to route_command('ansisunrain') }
|
87
|
+
it { is_expected.not_to route_command('ansicloudrain') }
|
88
|
+
it { is_expected.not_to route_command('asciitemprain') }
|
89
|
+
it { is_expected.not_to route_command('asciirainrain') }
|
90
|
+
it { is_expected.not_to route_command('dailyrainrain') }
|
91
|
+
it { is_expected.not_to route_command('dailysnowrain') }
|
92
|
+
it { is_expected.not_to route_command('dailytemprain') }
|
93
|
+
it { is_expected.not_to route_command('dailyhumidityrain') }
|
94
|
+
it { is_expected.not_to route_command('7dayrainrain') }
|
95
|
+
it { is_expected.not_to route_command('weeklyrainrain') }
|
96
|
+
it { is_expected.not_to route_command('weeklysnowrain') }
|
97
|
+
it { is_expected.not_to route_command('dailywindrain') }
|
98
|
+
it { is_expected.not_to route_command('alertsrain') }
|
99
|
+
it { is_expected.not_to route_command('ansiozonerain') }
|
100
|
+
it { is_expected.not_to route_command('condrain') }
|
101
|
+
it { is_expected.not_to route_command('condirain') }
|
102
|
+
it { is_expected.not_to route_command('conditrain') }
|
103
|
+
it { is_expected.not_to route_command('conditirain') }
|
104
|
+
it { is_expected.not_to route_command('conditiorain') }
|
105
|
+
it { is_expected.not_to route_command('conditionrain') }
|
106
|
+
it { is_expected.not_to route_command('conditionsrain') }
|
107
|
+
it { is_expected.not_to route_command('sunriserain') }
|
108
|
+
it { is_expected.not_to route_command('sunsetrain') }
|
109
|
+
it { is_expected.not_to route_command('forecastallthethingsrain') }
|
110
|
+
it { is_expected.not_to route_command('ansipressurerain') }
|
111
|
+
it { is_expected.not_to route_command('ansibarometerrain') }
|
112
|
+
it { is_expected.not_to route_command('dailypressurerain') }
|
113
|
+
it { is_expected.not_to route_command('dailybarometerrain') }
|
114
114
|
|
115
115
|
it '!forecast' do
|
116
|
-
|
116
|
+
send_command 'forecast'
|
117
117
|
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.")
|
118
118
|
end
|
119
119
|
|
@@ -130,215 +130,215 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
130
130
|
end
|
131
131
|
|
132
132
|
it '!ansirain Paris' do
|
133
|
-
|
133
|
+
send_command 'ansirain Paris'
|
134
134
|
expect(replies.last).to include("|\u000302_❄\u000306▃\u000310▅\u000303▅\u000309▅\u000311▇\u000308▇\u000307█\u000304█\u000313█\u000302__________________________________________________\u0003|")
|
135
135
|
end
|
136
136
|
|
137
137
|
it '!ansirain return max chance' do
|
138
|
-
|
138
|
+
send_command 'ansirain Paris'
|
139
139
|
expect(replies.last).to include('max 100.0%')
|
140
140
|
end
|
141
141
|
|
142
142
|
it '!ansirain no minutes' do
|
143
143
|
allow(RestClient).to receive(:get) { File.open('spec/mock_weather_no_minute.json').read }
|
144
|
-
|
144
|
+
send_command 'ansirain'
|
145
145
|
expect(replies.last).to include('|No minute-by-minute data available.|')
|
146
146
|
end
|
147
147
|
|
148
148
|
it '!ansiintensity no minutes' do
|
149
149
|
allow(RestClient).to receive(:get) { File.open('spec/mock_weather_no_minute.json').read }
|
150
|
-
|
150
|
+
send_command 'ansiintensity'
|
151
151
|
expect(replies.last).to include('|No minute-by-minute data available.|')
|
152
152
|
end
|
153
153
|
|
154
154
|
it '!ansisnow Paris' do
|
155
|
-
|
155
|
+
send_command 'ansisnow Paris'
|
156
156
|
expect(replies.last).to include("|\u000302_❄\u000306▃\u000310▅\u000303▅\u000309▅\u000311▇\u000308▇\u000307█\u000304█\u000313█\u000302__________________________________________________\u0003|")
|
157
157
|
end
|
158
158
|
|
159
159
|
it '!ansiintensity' do
|
160
|
-
|
160
|
+
send_command 'ansiintensity'
|
161
161
|
expect(replies.last).to include("|\u000302_\u000313▅\u000310▁\u000303▃\u000309▃\u000311▃\u000308▅\u000307▅\u000304▅\u000313▅\u000302___________________________________________________\u0003|")
|
162
162
|
end
|
163
163
|
|
164
164
|
it '!ansitemp portland' do
|
165
|
-
|
165
|
+
send_command 'ansitemp portland'
|
166
166
|
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")
|
167
167
|
end
|
168
168
|
|
169
169
|
it '!ieeetemp portland' do
|
170
|
-
|
170
|
+
send_command 'ieeetemp portland'
|
171
171
|
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")
|
172
172
|
end
|
173
173
|
|
174
174
|
it '!dailytemp portland' do
|
175
|
-
|
175
|
+
send_command 'dailytemp portland'
|
176
176
|
expect(replies.last).to eq("Portland, OR 48 hr temps: 28.3°F |\u000306_▁▃\u000310▅▅▇\u000303██\u000310▇▇▅▅\u000306▅▃▃▃▃▃▁▁▁▁▁▁▁▃\u000310▅▅▇\u000303█████▇\u000310▇▇▇▅▅▅▅\u000306▅▃▃▃▃\u0003| 30.5°F Range: 28.3°F - 41.3°F")
|
177
177
|
end
|
178
178
|
|
179
179
|
it '!ansiwind portland' do
|
180
|
-
|
180
|
+
send_command 'ansiwind portland'
|
181
181
|
expect(replies.last).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")
|
182
182
|
end
|
183
183
|
|
184
184
|
it '!conditions' do
|
185
|
-
|
185
|
+
send_command 'conditions'
|
186
186
|
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|")
|
187
187
|
end
|
188
188
|
|
189
189
|
it '!alerts' do
|
190
|
-
|
190
|
+
send_command 'alerts'
|
191
191
|
expect(replies.last).to eq("http://alerts.weather.gov/cap/wwacapget.php?x=OR125178E80B44.WindAdvisory.12517D235B00OR.PQRNPWPQR.95d9377231cf71049aacb48282406c60\nhttp://alerts.weather.gov/cap/wwacapget.php?x=OR125178E7B298.SpecialWeatherStatement.12517D218640OR.PQRSPSPQR.53656f1fdba795381a7895d7e3d153f7\n")
|
192
192
|
end
|
193
193
|
|
194
194
|
it '!ansisun' do
|
195
|
-
|
195
|
+
send_command 'ansisun'
|
196
196
|
expect(replies.last).to eq("Portland, OR 48hr sun forecast |\u000308████████████████████\u000307▇▇▅\u000309▅▅▃\u000303▁_▁\u000309▃▃▃\u000303▁▁▁▁▃\u000309▃▅\u000307▇▇▇▇\u000308▇▇▇▇▇▇\u0003| max 88%")
|
197
197
|
end
|
198
198
|
|
199
199
|
it '!dailysun' do
|
200
|
-
|
200
|
+
send_command 'dailysun'
|
201
201
|
expect(replies.last).to eq("Portland, OR 8 day sun forecast |\u000308█\u000309▃\u000308▇\u000309▁_\u000307▅\u000309▃\u000307▅\u0003| max 76%")
|
202
202
|
end
|
203
203
|
|
204
204
|
it '!asciisun' do
|
205
|
-
|
205
|
+
send_command 'asciisun'
|
206
206
|
expect(replies.last).to eq("Portland, OR 48hr sun forecast |\u000308''''''''''''''''''''\u000307**~\u000309~~-\u000303._.\u000309---\u000303....-\u000309-~\u000307****\u000308******\u0003| max 88%")
|
207
207
|
end
|
208
208
|
|
209
209
|
it '!ansicloud' do
|
210
|
-
|
210
|
+
send_command 'ansicloud'
|
211
211
|
expect(replies.last).to eq('Portland, OR 24h cloud cover |___________▁▁▁▁▁▁▁▁▃▅▅▅| range 0% - 49.0%')
|
212
212
|
end
|
213
213
|
|
214
214
|
it '!asciicloud' do
|
215
|
-
|
215
|
+
send_command 'asciicloud'
|
216
216
|
expect(replies.last).to eq('Portland, OR 24h cloud cover |___________........-~~~| range 0% - 49.0%')
|
217
217
|
end
|
218
218
|
|
219
219
|
it '!asciitemp' do
|
220
|
-
|
220
|
+
send_command 'asciitemp'
|
221
221
|
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")
|
222
222
|
end
|
223
223
|
|
224
224
|
it '!asciirain' do
|
225
|
-
|
225
|
+
send_command 'asciirain'
|
226
226
|
expect(replies.last).to include("|\u000302_❄\u000306-\u000310~\u000303~\u000309~\u000311*\u000308*\u000307'\u000304'\u000313'\u000302__________________________________________________\u0003|")
|
227
227
|
end
|
228
228
|
|
229
229
|
it '!7day' do
|
230
|
-
|
230
|
+
send_command '7day'
|
231
231
|
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")
|
232
232
|
end
|
233
233
|
|
234
234
|
it '!dailyrain' do
|
235
|
-
|
235
|
+
send_command 'dailyrain'
|
236
236
|
expect(replies.last).to eq("Portland, OR 48 hr snows |\u000302_______________________❄❄❄❄▁▁▁▁▁▁▁▁▁▁▁▁▁❄❄❄❄❄❄❄❄_\u0003| max 4.0%")
|
237
237
|
end
|
238
238
|
|
239
239
|
it '!7dayrain' do
|
240
|
-
|
240
|
+
send_command '7dayrain'
|
241
241
|
expect(replies.last).to eq("Portland, OR 7day snows |\u000302_▁▁\u000306▃\u000313█\u000303▅▅\u000310▃\u0003| max 100%")
|
242
242
|
end
|
243
243
|
|
244
244
|
it '!ansiozone' do
|
245
|
-
|
245
|
+
send_command 'ansiozone'
|
246
246
|
expect(replies.last).to eq("Portland, OR ozones 357.98 |??????????◉◉◉??????????◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◉◎◎◎◎◎◎◎◎◎| 330.44 [24h forecast]")
|
247
247
|
end
|
248
248
|
|
249
249
|
it '!set scale f' do
|
250
|
-
|
250
|
+
send_command 'set scale f'
|
251
251
|
expect(replies.last).to eq("Scale set to f")
|
252
252
|
end
|
253
253
|
|
254
254
|
it '!set scale k' do
|
255
|
-
|
255
|
+
send_command 'set scale k'
|
256
256
|
expect(replies.last).to eq("Scale set to k")
|
257
257
|
end
|
258
258
|
|
259
259
|
it '!set scale already set' do
|
260
|
-
|
261
|
-
|
260
|
+
send_command 'set scale f'
|
261
|
+
send_command 'set scale f'
|
262
262
|
expect(replies.last).to eq("Scale is already set to f!")
|
263
263
|
end
|
264
264
|
|
265
265
|
it '!set scale c' do
|
266
|
-
|
266
|
+
send_command 'set scale c'
|
267
267
|
expect(replies.last).to eq("Scale set to c")
|
268
268
|
end
|
269
269
|
|
270
270
|
it '!set scale toggle' do
|
271
|
-
|
271
|
+
send_command 'set scale f'
|
272
272
|
expect(replies.last).to eq("Scale set to f")
|
273
|
-
|
273
|
+
send_command 'set scale'
|
274
274
|
expect(replies.last).to eq("Scale set to c")
|
275
|
-
|
275
|
+
send_command 'set scale'
|
276
276
|
expect(replies.last).to eq("Scale set to f")
|
277
277
|
end
|
278
278
|
|
279
279
|
it '!ansitemp in F' do
|
280
|
-
|
281
|
-
|
280
|
+
send_command 'set scale f'
|
281
|
+
send_command 'ansitemp'
|
282
282
|
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")
|
283
283
|
end
|
284
284
|
|
285
285
|
it '!ansitemp in k' do
|
286
|
-
|
287
|
-
|
286
|
+
send_command 'set scale k'
|
287
|
+
send_command 'ansitemp'
|
288
288
|
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")
|
289
289
|
end
|
290
290
|
|
291
291
|
it '!ansitemp in K' do
|
292
|
-
|
293
|
-
|
292
|
+
send_command 'set scale K'
|
293
|
+
send_command 'ansitemp'
|
294
294
|
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")
|
295
295
|
end
|
296
296
|
|
297
297
|
it '!ansitemp in C' do
|
298
|
-
|
299
|
-
|
298
|
+
send_command 'set scale c'
|
299
|
+
send_command 'ansitemp'
|
300
300
|
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")
|
301
301
|
end
|
302
302
|
|
303
303
|
it '!ansiwind in MPH' do
|
304
|
-
|
305
|
-
|
304
|
+
send_command 'set scale f'
|
305
|
+
send_command 'ansiwind'
|
306
306
|
expect(replies.last).to include("1.39 mph - 12.71 mph")
|
307
307
|
end
|
308
308
|
|
309
309
|
it '!ansiwind in KPH' do
|
310
|
-
|
311
|
-
|
310
|
+
send_command 'set scale c'
|
311
|
+
send_command 'ansiwind'
|
312
312
|
expect(replies.last).to include("2.22 kph - 20.34 kph")
|
313
313
|
end
|
314
314
|
|
315
315
|
it '!sunrise' do
|
316
|
-
|
316
|
+
send_command 'sunrise'
|
317
317
|
expect(replies.last).to include("Portland, OR sunrise: ")
|
318
318
|
end
|
319
319
|
|
320
320
|
it '!sunset' do
|
321
|
-
|
321
|
+
send_command 'sunset'
|
322
322
|
expect(replies.last).to include("Portland, OR sunset: ")
|
323
323
|
end
|
324
324
|
|
325
325
|
it '!dailywind' do
|
326
|
-
|
326
|
+
send_command 'dailywind'
|
327
327
|
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")
|
328
328
|
end
|
329
329
|
|
330
330
|
it '!ansihumidity' do
|
331
|
-
|
331
|
+
send_command 'ansihumidity'
|
332
332
|
expect(replies.last).to eq("Portland, OR 48hr humidity 67%|\u000307▇\u000308▇▇▇\u000311▅▅▅▅▅▅▅▅▅▅\u000308▇▇▇▇▇▇▇\u000307▇▇▇▇▇▇▇▇▇▇▇▇\u000304████████████████\u0003|80% range: 41%-85%")
|
333
333
|
end
|
334
334
|
|
335
335
|
it '!dailyhumidity' do
|
336
|
-
|
336
|
+
send_command 'dailyhumidity'
|
337
337
|
expect(replies.last).to eq("Portland, OR 7day humidity 58%|\u000302▇▇▇▇████\u0003|87% range 58%-93%")
|
338
338
|
end
|
339
339
|
|
340
340
|
it '!forecastallthethings' do
|
341
|
-
|
341
|
+
send_command 'forecastallthethings'
|
342
342
|
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.")
|
343
343
|
expect(replies[1]).to include("|\u000302_❄\u000306▃\u000310▅\u000303▅\u000309▅\u000311▇\u000308▇\u000307█\u000304█\u000313█\u000302__________________________________________________\u0003|")
|
344
344
|
expect(replies[2]).to include("|\u000302_\u000313▅\u000310▁\u000303▃\u000309▃\u000311▃\u000308▅\u000307▅\u000304▅\u000313▅\u000302___________________________________________________\u0003|")
|
@@ -350,43 +350,43 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
350
350
|
end
|
351
351
|
|
352
352
|
it '!ansipressure' do
|
353
|
-
|
353
|
+
send_command 'ansipressure'
|
354
354
|
expect(replies.last).to eq("Portland, OR pressure 1021.2 hPa |████▇▅▅▃▃▃▃▅▇▇▇▇▇▅▅▅▅▅▃▃▃▃▅▅▅▃▁▁▁__▁▁▃▃▅▅▅▅▅▃▁▁▁▃| 1018.31 hPa range: 1017.96-1021.2 hPa [48h forecast]")
|
355
355
|
end
|
356
356
|
|
357
357
|
it '!ansibarometer' do
|
358
|
-
|
358
|
+
send_command 'ansibarometer'
|
359
359
|
expect(replies.last).to eq("Portland, OR pressure 1021.2 hPa |████▇▅▅▃▃▃▃▅▇▇▇▇▇▅▅▅▅▅▃▃▃▃▅▅▅▃▁▁▁__▁▁▃▃▅▅▅▅▅▃▁▁▁▃| 1018.31 hPa range: 1017.96-1021.2 hPa [48h forecast]")
|
360
360
|
end
|
361
361
|
|
362
362
|
it '!dailypressure' do
|
363
|
-
|
363
|
+
send_command 'dailypressure'
|
364
364
|
expect(replies.last).to eq("Portland, OR pressure 1019.92 hPa |▅▅▃_▁▇██| 1027.26 hPa range: 1013.45-1027.26 hPa [8 day forecast]")
|
365
365
|
end
|
366
366
|
|
367
367
|
it '!dailybarometer' do
|
368
|
-
|
368
|
+
send_command 'dailybarometer'
|
369
369
|
expect(replies.last).to eq("Portland, OR pressure 1019.92 hPa |▅▅▃_▁▇██| 1027.26 hPa range: 1013.45-1027.26 hPa [8 day forecast]")
|
370
370
|
end
|
371
371
|
|
372
372
|
it '!asciiwind' do
|
373
|
-
|
373
|
+
send_command 'asciiwind'
|
374
374
|
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")
|
375
375
|
end
|
376
376
|
|
377
377
|
it '!geo' do
|
378
|
-
|
378
|
+
send_command 'geo Paris, france'
|
379
379
|
expect(replies.last).to eq('45.523452, -122.676207')
|
380
380
|
end
|
381
381
|
|
382
382
|
it '!neareststorm' do
|
383
|
-
|
383
|
+
send_command 'neareststorm'
|
384
384
|
expect(replies.last).to eq('The nearest storm is 158 mi to the S of you.')
|
385
385
|
end
|
386
386
|
|
387
387
|
it '!neareststorm with scale' do
|
388
|
-
|
389
|
-
|
388
|
+
send_command 'set scale c'
|
389
|
+
send_command 'neareststorm'
|
390
390
|
expect(replies.last).to eq('The nearest storm is 252.8 km to the S of you.')
|
391
391
|
end
|
392
392
|
|
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: 0.
|
4
|
+
version: 1.0.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-
|
11
|
+
date: 2016-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|