lita-isolita 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/isolita.rb +7 -5
- data/lita-isolita.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ba9bf3be2f11190df40eb02719f4335f314aa81
|
4
|
+
data.tar.gz: 1f9b99ad773969d56d44c4cae6ea8b7fa196f0fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 782b55675cdf36692b506a546d816bd38ea9ca2e4d5dc7749070583a03824184c36d4217dff2cefc8c02d1d5e1df6c1f16f3ff48e39c07db278af35b67229ca6
|
7
|
+
data.tar.gz: d4d688a08caf7c6c7b233216f869bc02f2cbc82f9beb6d2cb6a67a5770460fc49c5c1b9c5b1d0d23794535420f7346c9e30cfe9614a25b610e596cac71154f21
|
@@ -2,18 +2,20 @@ module Lita
|
|
2
2
|
module Handlers
|
3
3
|
class Isolita < Handler
|
4
4
|
route(/^(fuck).*/i, :mind_your_manners)
|
5
|
-
route(/^(wake up|get up).*/i, :wake_up)
|
6
5
|
|
7
6
|
def mind_your_manners(response)
|
8
7
|
reply_to_name = response.user.metadata['mention_name'].nil? ?
|
9
8
|
"#{response.user.name}" :
|
10
9
|
"#{response.user.metadata['mention_name']}"
|
11
|
-
|
10
|
+
replies = [
|
11
|
+
"Mind your manners #{reply_to_name}..",
|
12
|
+
"You better wash out that dirty mouth #{reply_to_name}!",
|
13
|
+
"That is just unprofessional, #{reply_to_name}.",
|
14
|
+
"Your mother wouldn't like to hear you say that, #{reply_to_name}."
|
15
|
+
]
|
16
|
+
response.reply replies.sample
|
12
17
|
end
|
13
18
|
|
14
|
-
def wake_up(response)
|
15
|
-
system("heroku ps")
|
16
|
-
end
|
17
19
|
end
|
18
20
|
|
19
21
|
Lita.register_handler(Isolita)
|
data/lita-isolita.gemspec
CHANGED