ruboty-slack_reaction_added 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruboty/slack_reaction_added.rb +1 -0
- data/lib/ruboty/slack_reaction_added/actions/permalink.rb +17 -0
- data/lib/ruboty/slack_reaction_added/extension/adapter.rb +5 -0
- data/lib/ruboty/slack_reaction_added/extension/message.rb +1 -2
- data/lib/ruboty/slack_reaction_added/extension/robot.rb +15 -0
- data/lib/ruboty/slack_reaction_added/handlers/handler.rb +17 -7
- data/lib/ruboty/slack_reaction_added/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb850ae12f6075992b75dcaff1d1f253b94785f3ebfdbe960019585630eadcaa
|
4
|
+
data.tar.gz: 11afb399849a1fe493f51cf6cdf780f2448bc970297c8a620a2624ec8633c44a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92df958b3394dfc26a5be702d1a5a0245690ba4acef4c740be3a6a4c5efdd1e104aff6a31150d1b6ea9374ff38777840f001ff754123590136de189374f89591
|
7
|
+
data.tar.gz: 3892346b27043648b126e2839f83e77332deacfe852c6aa4de5c905fa1c19a7c6bf783425feb75e727abda962e456246661e3ac664698d624d80bae940b5a77c
|
@@ -3,6 +3,7 @@ require 'ruboty/slack_reaction_added/extension/action'
|
|
3
3
|
require 'ruboty/slack_reaction_added/extension/adapter'
|
4
4
|
require 'ruboty/slack_reaction_added/extension/client'
|
5
5
|
require 'ruboty/slack_reaction_added/extension/message'
|
6
|
+
require 'ruboty/slack_reaction_added/extension/robot'
|
6
7
|
|
7
8
|
if ENV["DISABLE_DEFAULT_REACTION_HANDLERS"] != "1"
|
8
9
|
require 'ruboty/slack_reaction_added/handlers/handler.rb'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'ruboty/robot'
|
2
|
+
|
3
|
+
module Ruboty
|
4
|
+
module ReactionAddedClient
|
5
|
+
module Robot
|
6
|
+
delegate :permalink, to: :adapter
|
7
|
+
|
8
|
+
def permalink(channel_id, timestamp)
|
9
|
+
adapter.permalink(channel_id, timestamp)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
Robot.include ReactionAddedClient::Robot
|
15
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'ruboty/slack_reaction_added/actions/permalink.rb'
|
1
2
|
require 'ruboty/slack_reaction_added/actions/reaction_ping.rb'
|
2
3
|
require 'ruboty/slack_reaction_added/actions/thumbup.rb'
|
3
4
|
|
@@ -7,15 +8,21 @@ module Ruboty
|
|
7
8
|
class Handler < Ruboty::Handlers::Base
|
8
9
|
|
9
10
|
on /ping\z/,
|
10
|
-
|
11
|
-
|
12
|
-
|
11
|
+
name: 'reaction_able_ping',
|
12
|
+
description: 'ping allow reaction',
|
13
|
+
allow_reaction: true
|
13
14
|
|
14
15
|
on /.*\z/,
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
name: 'thumbup',
|
17
|
+
description: 'thumbup',
|
18
|
+
reaction_only: true,
|
19
|
+
all: true
|
20
|
+
|
21
|
+
on /.*\z/,
|
22
|
+
name: 'permalink',
|
23
|
+
description: 'permalink',
|
24
|
+
reaction_only: true,
|
25
|
+
all: true
|
19
26
|
|
20
27
|
def reaction_able_ping(message)
|
21
28
|
Ruboty::SlackReactionAdded::Actions::ReactionPing.new(message).call
|
@@ -25,6 +32,9 @@ module Ruboty
|
|
25
32
|
Ruboty::SlackReactionAdded::Actions::Thumbup.new(message).call
|
26
33
|
end
|
27
34
|
|
35
|
+
def permalink(message)
|
36
|
+
Ruboty::SlackReactionAdded::Actions::Permalink.new(message).call
|
37
|
+
end
|
28
38
|
end
|
29
39
|
end
|
30
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-slack_reaction_added
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- srz_zumix
|
@@ -142,12 +142,14 @@ files:
|
|
142
142
|
- Rakefile
|
143
143
|
- docker-compose.yml
|
144
144
|
- lib/ruboty/slack_reaction_added.rb
|
145
|
+
- lib/ruboty/slack_reaction_added/actions/permalink.rb
|
145
146
|
- lib/ruboty/slack_reaction_added/actions/reaction_ping.rb
|
146
147
|
- lib/ruboty/slack_reaction_added/actions/thumbup.rb
|
147
148
|
- lib/ruboty/slack_reaction_added/extension/action.rb
|
148
149
|
- lib/ruboty/slack_reaction_added/extension/adapter.rb
|
149
150
|
- lib/ruboty/slack_reaction_added/extension/client.rb
|
150
151
|
- lib/ruboty/slack_reaction_added/extension/message.rb
|
152
|
+
- lib/ruboty/slack_reaction_added/extension/robot.rb
|
151
153
|
- lib/ruboty/slack_reaction_added/handlers/handler.rb
|
152
154
|
- lib/ruboty/slack_reaction_added/version.rb
|
153
155
|
- ruboty-slack_reaction_added.gemspec
|