slappy 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/slappy/client.rb +4 -4
- data/lib/slappy/listener.rb +1 -0
- data/lib/slappy/listeners/type_listener.rb +6 -0
- data/lib/slappy/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b0b9c15815b3cf1132917f497bf462ac226e8ae
|
4
|
+
data.tar.gz: 6b56d7a4a85eaac4c46e988a6e2e5728058d6658
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcba756785fa377ca2a3e65164edde9a1fea85f7ae66ac45bb5751e1a1fd5cb3372f1350e18702790ae0768d72f83add8bef188955b93e9d306a86f415c9cfe5
|
7
|
+
data.tar.gz: c27d86356d760e5a7fe3d1ea67b83b58a96758242eb2509d1e9eaf7b2a5703401df30c6b0772c8bb2d804f782c562e3cad7cab781742b5bf9d0b63510d1c5b25
|
data/README.md
CHANGED
data/lib/slappy/client.rb
CHANGED
@@ -30,9 +30,9 @@ module Slappy
|
|
30
30
|
@callbacks[:message].push Listener::TextListener.new(pattern, block)
|
31
31
|
end
|
32
32
|
|
33
|
-
def monitor(
|
34
|
-
@callbacks[
|
35
|
-
@callbacks[
|
33
|
+
def monitor(type, &block)
|
34
|
+
@callbacks[type.to_sym] ||= []
|
35
|
+
@callbacks[type.to_sym].push Listener::TypeListener.new(type, block)
|
36
36
|
end
|
37
37
|
|
38
38
|
def say(text, options = {})
|
@@ -61,7 +61,7 @@ module Slappy
|
|
61
61
|
case event_name
|
62
62
|
when :hello
|
63
63
|
listener.call
|
64
|
-
|
64
|
+
else
|
65
65
|
event = Event.new(data)
|
66
66
|
listener.call(event)
|
67
67
|
end
|
data/lib/slappy/listener.rb
CHANGED
data/lib/slappy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slappy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- wakaba260
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slack-api
|
@@ -254,6 +254,7 @@ files:
|
|
254
254
|
- lib/slappy/listeners/concerns/listenable.rb
|
255
255
|
- lib/slappy/listeners/subtype_listener.rb
|
256
256
|
- lib/slappy/listeners/text_listener.rb
|
257
|
+
- lib/slappy/listeners/type_listener.rb
|
257
258
|
- lib/slappy/messanger.rb
|
258
259
|
- lib/slappy/schedule.rb
|
259
260
|
- lib/slappy/slack_api/base.rb
|