lita-whoami 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lita/handlers/whoami.rb +3 -1
- data/lita-whoami.gemspec +1 -1
- data/spec/lita/handlers/whoami_spec.rb +2 -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: 3d04c06a52345fed5914f36d3bd159ff96043fa0
|
4
|
+
data.tar.gz: 1f03a8757d45f60e61f0807f94843e1564f16167
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 349628b16b2276cb287411aac7d3d3e4db3e3092b4c35fccbd82c7fb42bc77213ac468b80297a5e815066edf3d14086c6d1cc53c48f0240cbc48dd0c1a96993f
|
7
|
+
data.tar.gz: e90cb8d87a6a48ac9b8792c8ae3757ac3df9ef8a6e2c20b796f86646b5d8e62e241eb361e6cd2f80f96c9627c0c8d352ac5a329e393ab49d63f05407c7012840
|
data/lib/lita/handlers/whoami.rb
CHANGED
@@ -8,7 +8,7 @@ module Lita
|
|
8
8
|
})
|
9
9
|
|
10
10
|
route(/^who ?is (\w+)/, :describe_person, command: true, help: {
|
11
|
-
"
|
11
|
+
"who is PERSON" => "Everbot will tell you who somebody is."
|
12
12
|
})
|
13
13
|
|
14
14
|
def key_for_person name
|
@@ -18,6 +18,8 @@ module Lita
|
|
18
18
|
def assign_person(chat)
|
19
19
|
name, thing = chat.matches[0]
|
20
20
|
|
21
|
+
return if name == 'who'
|
22
|
+
|
21
23
|
redis.rpush key_for_person(name), thing
|
22
24
|
|
23
25
|
chat.reply "Okay, #{name} is #{thing}!"
|
data/lita-whoami.gemspec
CHANGED
@@ -15,6 +15,7 @@ describe Lita::Handlers::Whoami, lita_handler: true do
|
|
15
15
|
expect(replies.last).to eq "Okay, taylor is a bad programmer!"
|
16
16
|
|
17
17
|
send_command("who is taylor")
|
18
|
-
|
18
|
+
expect(replies.last).to eq "taylor is a bad programmer"
|
19
|
+
expect(replies.count).to eq 2
|
19
20
|
end
|
20
21
|
end
|