lita-group-mention 1.0.2 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da198da0e1f717aa3d96f6d9878bc7f90d6650c3
|
4
|
+
data.tar.gz: e42ca21995c5a6828c0127436f240c139eb12a2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6338618c47878a8375e05f304adb6a274246c60c49602b1c314575dd829f0c1c6222035ddc7b4d19de7b8dcaf8754d16710f83965d18019eee9a6fee121a037
|
7
|
+
data.tar.gz: 1548a43d0924add61c4864e9b8907d2253248e40661423b6a7c3d48c0bec8e76f359a4352506f8aff5626da8104983f641c81c050924476dfc79e0d45febeb50
|
@@ -3,9 +3,9 @@ module Lita
|
|
3
3
|
module Handlers
|
4
4
|
# GroupMention handler class
|
5
5
|
class GroupMention < Handler
|
6
|
-
route(/@(
|
6
|
+
route(/@([a-zA-Z0-9.\-_]+)+/, :group_mention)
|
7
7
|
route(
|
8
|
-
/^group\s+mention\s+add\s+@?(?<user
|
8
|
+
/^group\s+mention\s+add\s+@?(?<user>[a-zA-Z0-9.\-_]+)\s+to\s+@?(?<group>[a-zA-Z0-9.\-_]+)/,
|
9
9
|
:add_member,
|
10
10
|
command: true,
|
11
11
|
help: {
|
@@ -13,7 +13,7 @@ module Lita
|
|
13
13
|
}
|
14
14
|
)
|
15
15
|
route(
|
16
|
-
/^group\s+mention\s+remove\s+@?(?<user
|
16
|
+
/^group\s+mention\s+remove\s+@?(?<user>[a-zA-Z0-9.\-_]+)\s+from\s+@?(?<group>[a-zA-Z0-9.\-_]+)/,
|
17
17
|
:remove_member,
|
18
18
|
command: true,
|
19
19
|
help: {
|
@@ -21,7 +21,7 @@ module Lita
|
|
21
21
|
}
|
22
22
|
)
|
23
23
|
route(
|
24
|
-
/^group\s+mention\s+remove\s+group\s+@?(?<group
|
24
|
+
/^group\s+mention\s+remove\s+group\s+@?(?<group>[a-zA-Z0-9.\-_]+)/,
|
25
25
|
:remove_group,
|
26
26
|
command: true,
|
27
27
|
help: {
|
@@ -37,7 +37,7 @@ module Lita
|
|
37
37
|
}
|
38
38
|
)
|
39
39
|
route(
|
40
|
-
/^group\s+mention\s+show\s+group\s+@?(?<group
|
40
|
+
/^group\s+mention\s+show\s+group\s+@?(?<group>[a-zA-Z0-9.\-_]+)/,
|
41
41
|
:show_group,
|
42
42
|
command: true,
|
43
43
|
help: {
|
@@ -45,7 +45,7 @@ module Lita
|
|
45
45
|
}
|
46
46
|
)
|
47
47
|
route(
|
48
|
-
/^group\s+mention\s+show\s+user\s+@?(?<user
|
48
|
+
/^group\s+mention\s+show\s+user\s+@?(?<user>[a-zA-Z0-9.\-_]+)/,
|
49
49
|
:show_user,
|
50
50
|
command: true,
|
51
51
|
help: {
|
data/lita-group-mention.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'lita-group-mention'
|
3
|
-
spec.version = '1.
|
3
|
+
spec.version = '1.1.1'
|
4
4
|
spec.authors = ['Ben House']
|
5
5
|
spec.email = ['ben@benhouse.io']
|
6
6
|
spec.description = 'cc a list of users when a group is @mentioned'
|
@@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.metadata = { 'lita_plugin_type' => 'handler' }
|
11
11
|
|
12
12
|
spec.files = `git ls-files`.split($RS)
|
13
|
-
spec.executables = spec.files.grep(
|
14
|
-
spec.test_files = spec.files.grep(
|
13
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
14
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
15
15
|
spec.require_paths = ['lib']
|
16
16
|
|
17
17
|
spec.add_runtime_dependency 'lita', '>= 4.2'
|
@@ -85,8 +85,8 @@ describe Lita::Handlers::GroupMention, lita_handler: true do
|
|
85
85
|
context 'commands sent without @ mentions' do
|
86
86
|
include_examples 'commands' do
|
87
87
|
let(:redis) { redis_connection }
|
88
|
-
let(:chat_user) { '
|
89
|
-
let(:chat_group) { '
|
88
|
+
let(:chat_user) { 'test_user.1-0' }
|
89
|
+
let(:chat_group) { 'test_group.1-0' }
|
90
90
|
let(:command_user) { chat_user }
|
91
91
|
let(:command_group) { chat_group }
|
92
92
|
end
|
@@ -95,8 +95,8 @@ describe Lita::Handlers::GroupMention, lita_handler: true do
|
|
95
95
|
context 'commands sent with @ mentions' do
|
96
96
|
include_examples 'commands' do
|
97
97
|
let(:redis) { redis_connection }
|
98
|
-
let(:chat_user) { '
|
99
|
-
let(:chat_group) { '
|
98
|
+
let(:chat_user) { 'test_user.1-0' }
|
99
|
+
let(:chat_group) { 'test_group.1-0' }
|
100
100
|
let(:command_user) { '@' + chat_user }
|
101
101
|
let(:command_group) { '@' + chat_group }
|
102
102
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-group-mention
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben House
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
179
|
rubyforge_project:
|
180
|
-
rubygems_version: 2.
|
180
|
+
rubygems_version: 2.4.5
|
181
181
|
signing_key:
|
182
182
|
specification_version: 4
|
183
183
|
summary: add users to a group, @mention the group, and the plugin will cc each user
|