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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b854ef88947a8fdd450173bf843927067c5583d2
4
- data.tar.gz: ccfe958d214783ec4a45a943a669c26feba4b04c
3
+ metadata.gz: 35fd826e17e0a1c0f4d208328e290ad14edddfc3
4
+ data.tar.gz: c4c08ec814970a1a3dafff1ea8152a9dba3ab1af
5
5
  SHA512:
6
- metadata.gz: a97635a0d309f05e1ae1c3725c7949847678bc43cc0d9fe16b4c7841721bc40721473c7efa334ed589b76abd576cb2d9f52c69aba825d0e4fca4959f6f47fa07
7
- data.tar.gz: 762e3c3ff5cff132af5718c6250b267213bdbd33ca1cc7ac95512bb7b33e1ee404215b5224243dbc322bad94bc92cd1c640b51f955597a4729729fa46e4e04c0
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
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-yandex-domains"
3
- spec.version = "0.1.2"
3
+ spec.version = "0.1.3"
4
4
  spec.authors = ["Devico Solutions"]
5
5
  spec.email = ["info@devico.io"]
6
6
  spec.description = "Lita handler to interact with yandex domain API"
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@devico.io to maillist maillist@test.com').to(:add_subscriber).with_authorization_for(:yandex_admins) }
17
- it { is_expected.to route_command('yandex delete test@devico.io from maillist maillist@test.com').to(:remove_subscriber).with_authorization_for(:yandex_admins) }
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.2
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: 2016-12-29 00:00:00.000000000 Z
11
+ date: 2017-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita