slackbotsy 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/slackbotsy/bot.rb +7 -0
- data/lib/slackbotsy/version.rb +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: ff4258d81c83773fd3ad6a89429066f0fd5f9d40
|
4
|
+
data.tar.gz: 04e198a2f4a19d6bd71d386cded6cd8848cca672
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50daa72fc1b30f103486b71bea2a9d3511214efbf520c31862fd13029bdefdf9c9626d5d208ca10f2ed08c026cb85c11eca9dc632f8f2337c83c24417753cbdf
|
7
|
+
data.tar.gz: 116a21b432e897fe5da63022785aba10d10cd07c787da80b98ad7f217e11ff51788ebea0ab0a3b35e64ed95d3120eaba5d493e3fc82fc399beb0b8f39aba4457
|
data/lib/slackbotsy/bot.rb
CHANGED
@@ -51,6 +51,13 @@ module Slackbotsy
|
|
51
51
|
@regexes[regex] = block
|
52
52
|
end
|
53
53
|
|
54
|
+
## pass list of files containing hear statements, to be opened and evaled
|
55
|
+
def eval_scripts(*files)
|
56
|
+
files.flatten.each do |file|
|
57
|
+
self.instance_eval File.open(file).read
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
54
61
|
## check message and run blocks for any matches
|
55
62
|
def handle_item(msg)
|
56
63
|
return nil unless msg[:token] == @options['outgoing_token'] # ensure messages are for us from slack
|
data/lib/slackbotsy/version.rb
CHANGED