lita-onewheel-odot-tripcheck-web-hack 0.1.0 → 0.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: b33cafe470c94f31dd12500e6c505eccdbc18da0
|
4
|
+
data.tar.gz: 8de8b36616482f2e35291f9b946bf9d8fa9333c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 321ef674edc6d45a22c80ffa8184eb559546528e1e41c17ea526d0c790cace6c6c4a19db11f63fac336090f25e0b07e2b668705ce12a415bad85eacaa6dfd175
|
7
|
+
data.tar.gz: c596be4f883bfda343b9ea642c99ea0f0ef53a1f2d0986a78cbd03763a304ee070414b0800416a40bab197575b7126e2c610efe80872af87df45b52ce68cf605
|
@@ -32,7 +32,11 @@ module Lita
|
|
32
32
|
get_cameras.keys.each do |camera_key|
|
33
33
|
Lita.logger.debug "Trying to match '#{input.downcase}' to '#{camera_key.downcase}'"
|
34
34
|
if camera_key.to_s.downcase.include? input.downcase
|
35
|
-
|
35
|
+
image = get_cameras[camera_key]
|
36
|
+
unless camera_key.to_s == 'Sandy Blvd in Hollywood'
|
37
|
+
image += "?rand=#{Time.now.to_i}123"
|
38
|
+
end
|
39
|
+
response.reply image
|
36
40
|
return # Quick exit.
|
37
41
|
end
|
38
42
|
end
|
@@ -16,4 +16,9 @@ describe Lita::Handlers::OnewheelOdotTripcheckWebHack, lita_handler: true do
|
|
16
16
|
send_command 'tripcheck'
|
17
17
|
expect(replies.last).to eq('Cameras available include: Hood River, 26 at 35, 26 at Snow Bunny, 26 at Govy, 26 at Govy Loop Rd, 26 at Frog Lake, 26 at Blue Box Pass, Sandy Blvd in Hollywood')
|
18
18
|
end
|
19
|
+
|
20
|
+
it 'will not rand sandy' do
|
21
|
+
send_command 'tripcheck sandy'
|
22
|
+
expect(replies.last).to_not include('rand=')
|
23
|
+
end
|
19
24
|
end
|