lita-isolita 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -3
- data/lib/lita/handlers/isolita.rb +14 -20
- 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: f2eaa07e258f1b9081008278de82aabd44218ce4
|
4
|
+
data.tar.gz: 553ae82481aba26e1ed707b5ed5a1e869e218954
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b30d18d0018d56cc6fb0593c49ebe0ba15a441a31800bb83dfeac18cbb8b752214252fe87131dfc8cf04bb498335a6908ed56ff09bf51214e01ddbc7b013c15
|
7
|
+
data.tar.gz: 88b1596de67c7f790476eef4bc18cbba4389fa3a2aec604ddf8a98e324c4637d2796c04433c464a01de2e63c2132dbbe4599c30518ecdc770d756e125ffd3849
|
data/README.md
CHANGED
@@ -12,6 +12,10 @@ gem "lita-isolita"
|
|
12
12
|
|
13
13
|
## Usage
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
*# Mind Manners*
|
16
|
+
Chris: Lita, do some fucking work
|
17
|
+
Lita: Mind your manners Chris..
|
18
|
+
|
19
|
+
*# Echo*
|
20
|
+
Chris: Lita echo Bacon ipsum dolor amet
|
21
|
+
Lita: Bacon ipsum dolor amet
|
@@ -2,14 +2,6 @@ module Lita
|
|
2
2
|
module Handlers
|
3
3
|
class Isolita < Handler
|
4
4
|
|
5
|
-
## Get the username for who's talking to Lita.
|
6
|
-
def get_reply_to_name(response)
|
7
|
-
reply_to_name = response.user.metadata['mention_name'].nil? ?
|
8
|
-
"#{response.user.name}" :
|
9
|
-
"#{response.user.metadata['mention_name']}"
|
10
|
-
end
|
11
|
-
|
12
|
-
|
13
5
|
## Mind your manners will just focus on "Fuck"
|
14
6
|
## for now until others become a problem.
|
15
7
|
route(/fuck/i, :mind_your_manners, help: {
|
@@ -17,16 +9,18 @@ module Lita
|
|
17
9
|
})
|
18
10
|
|
19
11
|
def mind_your_manners(response)
|
20
|
-
|
12
|
+
username = response.user.metadata['name'].nil? ?
|
13
|
+
"#{response.user.name}" :
|
14
|
+
"#{response.user.metadata['name']}"
|
21
15
|
|
22
16
|
mind_manners = [
|
23
|
-
"Mind your manners #{
|
24
|
-
"You better wash out that dirty mouth #{
|
25
|
-
"That is just unprofessional, #{
|
26
|
-
"Your mother wouldn't like to hear you say that, #{
|
27
|
-
"Quite the potty mouth on you, #{
|
28
|
-
"Good manners are made up of petty sacrifices, #{
|
29
|
-
"Does saying that make you more mature, #{
|
17
|
+
"Mind your manners #{username}..",
|
18
|
+
"You better wash out that dirty mouth #{username}!",
|
19
|
+
"That is just unprofessional, #{username}.",
|
20
|
+
"Your mother wouldn't like to hear you say that, #{username}.",
|
21
|
+
"Quite the potty mouth on you, #{username}..",
|
22
|
+
"Good manners are made up of petty sacrifices, #{username}.",
|
23
|
+
"Does saying that make you more mature, #{username}?",
|
30
24
|
"Rude."
|
31
25
|
]
|
32
26
|
response.reply mind_manners.sample
|
@@ -34,12 +28,12 @@ module Lita
|
|
34
28
|
|
35
29
|
|
36
30
|
|
37
|
-
route(/^(
|
38
|
-
"lita:
|
31
|
+
route(/^echo\s+(.+)/, :echo, command: true, help: {
|
32
|
+
"lita: echo TEXT" => "Echoes back TEXT"
|
39
33
|
})
|
40
34
|
|
41
|
-
def
|
42
|
-
response.
|
35
|
+
def echo(response)
|
36
|
+
response.reply "#{response.matches}"
|
43
37
|
end
|
44
38
|
|
45
39
|
end
|
data/lita-isolita.gemspec
CHANGED