lita-yandex-domains 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/yandex_domains.rb +14 -0
- data/lita-yandex-domains.gemspec +1 -1
- data/locales/en.yml +3 -0
- data/spec/lita/handlers/yandex_domains_spec.rb +3 -2
- 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: 35fd826e17e0a1c0f4d208328e290ad14edddfc3
|
4
|
+
data.tar.gz: c4c08ec814970a1a3dafff1ea8152a9dba3ab1af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d535e43df6e26f9fdd454246b034c06c88c30c98b2aa0b4a953bf575359a89f53814e653cfc221cc50ddc96d2405a0729cf45795e89ec858cff539ee3de5020d
|
7
|
+
data.tar.gz: c25d5de9f9b420971df0a678cd78a6229ceb36a9c5f01088786429799c3f03afefbb443e57898eae31079f3ccec860ead5298dfc7ac133b2e1edfbd59782fe1c
|
@@ -89,6 +89,15 @@ module Lita
|
|
89
89
|
}
|
90
90
|
)
|
91
91
|
|
92
|
+
route(
|
93
|
+
/^yandex\sshow\ssubscribers\sfor\smaillist\s#{MAILLIST_PATTERN}$/,
|
94
|
+
:show_subscribers,
|
95
|
+
command: true,
|
96
|
+
help: {
|
97
|
+
t('help.show_subscribers.syntax') => t('help.show_subscribers.desc')
|
98
|
+
}
|
99
|
+
)
|
100
|
+
|
92
101
|
def create_email(response)
|
93
102
|
email = response.match_data['email']
|
94
103
|
domain = email.split('@').last
|
@@ -153,6 +162,11 @@ module Lita
|
|
153
162
|
response.reply(message)
|
154
163
|
end
|
155
164
|
|
165
|
+
def show_subscribers(response)
|
166
|
+
maillist = response.match_data['maillist']
|
167
|
+
message = yandex_client.subscription_sublist(config.domain, maillist)
|
168
|
+
response.reply(message)
|
169
|
+
end
|
156
170
|
|
157
171
|
Lita.register_handler(self)
|
158
172
|
|
data/lita-yandex-domains.gemspec
CHANGED
data/locales/en.yml
CHANGED
@@ -9,6 +9,9 @@ en:
|
|
9
9
|
show_maillists:
|
10
10
|
syntax: yandex show all maillists
|
11
11
|
desc: Show all maillists
|
12
|
+
show_subscribers:
|
13
|
+
syntax: yandex show subscribers for maillist <email>
|
14
|
+
desc: Show subcribers for maillist
|
12
15
|
create_email:
|
13
16
|
syntax: yandex create email <email>
|
14
17
|
desc: Create new email with random generated password
|
@@ -13,8 +13,9 @@ describe Lita::Handlers::YandexDomains, lita_handler: true do
|
|
13
13
|
it { is_expected.to route_command('yandex create maillist maillist@test.com').to(:create_maillist).with_authorization_for(:yandex_admins) }
|
14
14
|
it { is_expected.to route_command('yandex delete maillist maillist@test.com').to(:delete_maillist).with_authorization_for(:yandex_admins) }
|
15
15
|
it { is_expected.to route_command('yandex show all maillists').to(:show_all_maillists) }
|
16
|
-
it { is_expected.to route_command('yandex add test@
|
17
|
-
it { is_expected.to route_command('yandex delete test@
|
16
|
+
it { is_expected.to route_command('yandex add test@test.io to maillist maillist@test.com').to(:add_subscriber).with_authorization_for(:yandex_admins) }
|
17
|
+
it { is_expected.to route_command('yandex delete test@test.io from maillist maillist@test.com').to(:remove_subscriber).with_authorization_for(:yandex_admins) }
|
18
|
+
it { is_expected.to route_command('yandex show subscribers for maillist subscription@test.io').to(:show_subscribers) }
|
18
19
|
end
|
19
20
|
|
20
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-yandex-domains
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Devico Solutions
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|