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: f2a1e573ef6bee8af4cefd2469266ca1a6cf01bb
4
- data.tar.gz: 36679c5941657ff451711d88430907a81dc3f290
3
+ metadata.gz: b33cafe470c94f31dd12500e6c505eccdbc18da0
4
+ data.tar.gz: 8de8b36616482f2e35291f9b946bf9d8fa9333c6
5
5
  SHA512:
6
- metadata.gz: 72db08debf89f064ad3d827e33e4092889eacec44bddeb53e469a0c8c2ff84e62858b528a412fb4ff3c4e2b269968d1483acdfa166c0f448fe750605bdc86e0d
7
- data.tar.gz: '009f3c9ae6f85581b0eeda9ca55de8b458352660b22f26450474ad3f87f970bffe56e025634f09ccd426461f07144ca8a8445a9a186173c9a902c213070c0978'
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
- response.reply "#{get_cameras[camera_key]}?rand=#{Time.now.to_i}123"
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-odot-tripcheck-web-hack'
3
- spec.version = '0.1.0'
3
+ spec.version = '0.1.1'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = %q{ODOT Tripcheck Cameras}
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-odot-tripcheck-web-hack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps