lita-onewheel-downforeveryoneorjustme 0.0.0 → 0.0.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: 1e165471abd00d84e8a1b4177bb3b8d2fe4cb020
|
4
|
+
data.tar.gz: aa345735964d0e8112516c778f69964d41c9bd64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2da5b9ebd34e3a67ca5145181290b1deaf18292b600d0c37520fda9db60a51fcaee7abe26fae8a6565bdca1c3d032465b9d7bcdaf45f3d219c73f6c75385e7d6
|
7
|
+
data.tar.gz: 1cc1684c2906a456c1ecb0918df48406e92b0eed58bf6f93b1b501732edbde87fbfe5315eb7f1f59bfbb48604ee57043e2a717ecbaa47b3f739350121854ef88
|
@@ -4,8 +4,8 @@ require 'nokogiri'
|
|
4
4
|
module Lita
|
5
5
|
module Handlers
|
6
6
|
class OnewheelDownForEveryoneOrJustMe < Handler
|
7
|
-
route
|
8
|
-
route
|
7
|
+
route /^isitdown (.*)/, :down_for_everyone_or_just_me, command: true
|
8
|
+
route /^down (.*)/, :down_for_everyone_or_just_me, command: true
|
9
9
|
|
10
10
|
def down_for_everyone_or_just_me(response)
|
11
11
|
uri = 'www.downforeveryoneorjustme.com/' + response.matches[0][0]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'lita-onewheel-downforeveryoneorjustme'
|
3
|
-
spec.version = '0.0.
|
3
|
+
spec.version = '0.0.1'
|
4
4
|
spec.authors = ['Andrew Kreps']
|
5
5
|
spec.email = ['andrew.kreps@gmail.com']
|
6
6
|
spec.description = %q{Lita interface to Down for Everyone or Just Me.}
|
@@ -6,13 +6,15 @@ describe Lita::Handlers::OnewheelDownForEveryoneOrJustMe, lita_handler: true do
|
|
6
6
|
|
7
7
|
it 'will display up' do
|
8
8
|
allow(RestClient).to receive(:get) { File.open('spec/fixtures/up.html').read }
|
9
|
-
send_command '
|
9
|
+
send_command 'isitdown www.google.com'
|
10
|
+
expect(replies.count).to eq(1)
|
10
11
|
expect(replies.last).to eq('It\'s just you. http://www.google.com is up.')
|
11
12
|
end
|
12
13
|
|
13
14
|
it 'will display down' do
|
14
15
|
allow(RestClient).to receive(:get) { File.open('spec/fixtures/down.html').read }
|
15
|
-
send_command '
|
16
|
+
send_command 'isitdown www.doooooogle.com'
|
17
|
+
expect(replies.count).to eq(1)
|
16
18
|
expect(replies.last).to eq('It\'s not just you! http://www.doooooogle.com looks down from here.')
|
17
19
|
end
|
18
20
|
end
|