lita-hello 0.0.3 → 0.0.4
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/hello.rb +3 -3
- data/lita-hello.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: 630f7d59d6c566d545c8b7cfff0789c85d5f7677
|
4
|
+
data.tar.gz: 8d8e884d6049d9dd02b8754d3d573d9407b868a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34c87c8e47451f113d36c04c6ec39b7deb665e3abf9e404e36f90e49e8a2c8735c6d633bf5ed1fa747196b49b97f1d1026222cdbd94cc8965a78b0a5a845fc8e
|
7
|
+
data.tar.gz: 363a803f79b12011f2c1d0c60ec1b73ef0c703c4c5e1a1ddfadaf87223383f9ad2164c89fea6be5be5833f28c5e04eeeb4e4735c38ce2351eea9ed49de1d9b69
|
data/lib/lita/handlers/hello.rb
CHANGED
@@ -3,14 +3,14 @@ require "lita"
|
|
3
3
|
module Lita
|
4
4
|
module Handlers
|
5
5
|
class Hello < Handler
|
6
|
-
route(/(hello|hi|good morning|howdy|yo|hey)\sChangeBot/i, :
|
6
|
+
route(/(hello|hi|good morning|howdy|yo|hey)\sChangeBot/i, :say_hello)
|
7
7
|
end
|
8
8
|
|
9
|
-
def
|
9
|
+
def say_hello(response)
|
10
10
|
reply_to_name = response.user.metadata['mention_name'].nil? ?
|
11
11
|
"#{response.user.name}" :
|
12
12
|
"#{response.user.metadata['mention_name']}"
|
13
|
-
response.reply "Hello #{reply_to_name}!"
|
13
|
+
response.reply "Hello #{reply_to_name}!"
|
14
14
|
end
|
15
15
|
|
16
16
|
Lita.register_handler(Hello)
|
data/lita-hello.gemspec
CHANGED