slackbotsy 0.2.0 → 0.2.1
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/slackbotsy/bot.rb +3 -3
- data/lib/slackbotsy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 062cd0cf380f316730fdc5ae366b47cd9e35cfda
|
|
4
|
+
data.tar.gz: 2374192ee2136ddf0d7f0387a7a56b3d23820716
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fbf40e41c8953d45fae2d29d088b3b379aa0dd3007026692405f913ac777a539355bec3367acb25db0329dd072e9bd683088fd3bf9574b213bfc6bc66966b101
|
|
7
|
+
data.tar.gz: 4f55803b9465f2299d144617f83791fc4296bdf043d230479115386377ce8b0e4f5d212641c8811c2ca7002362733b6cabcd9debe11ecf893a63d0e9b4efedc3
|
data/lib/slackbotsy/bot.rb
CHANGED
|
@@ -10,14 +10,14 @@ module Slackbotsy
|
|
|
10
10
|
|
|
11
11
|
attr_accessor :listeners, :last_description
|
|
12
12
|
|
|
13
|
-
def initialize(options)
|
|
13
|
+
def initialize(options, &block)
|
|
14
14
|
@options = options
|
|
15
15
|
|
|
16
16
|
## use set of tokens for (more or less) O(1) lookup on multiple channels
|
|
17
17
|
@options['outgoing_token'] = Array(@options['outgoing_token']).to_set
|
|
18
18
|
@listeners = []
|
|
19
|
-
setup_incoming_webhook
|
|
20
|
-
|
|
19
|
+
setup_incoming_webhook # http connection for async replies
|
|
20
|
+
instance_eval(&block) if block_given? # run any hear statements in block
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
## setup http connection for sending async incoming webhook messages to slack
|
data/lib/slackbotsy/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slackbotsy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Richard Lister
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-10-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|