lita-slack-standup 0.8.0 → 0.9.0

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: 43edfae543811ccd70d702c6931abe461b45565a
4
- data.tar.gz: d69d8432d34ea8835428a379b522e9abe8dad5f2
3
+ metadata.gz: 338d349d57654950fcebc59b784f26ce6f9ae2e0
4
+ data.tar.gz: 66ce4d083951479599860fbcbbaee10b6add3046
5
5
  SHA512:
6
- metadata.gz: cbcb30a8b4d328926eb59d13028c5438430bcc00c549c49f788531cea77bccd8d12a015d3deb611bfc37567005824a2fb848fb0cdd3ccc843ab4b831c90846ff
7
- data.tar.gz: 953ac35712b9e6a8811ec273fa4e94b42e97848533d82360f9c4ebc073182c3ce2905c2bcce40c696e44913bd59c55296bcbf0e6ca3a87023c2967c39b0b2516
6
+ metadata.gz: 8bd47e27d5db1dd72c68f7b053c691b3073c76fe2e0d10630bde89c25611e8ba0ecca46d33adb48147cac012684ce78822bbbf0e582881ea8c76873205d4fd82
7
+ data.tar.gz: 1a5863614bd506f32ac9c1d4ff18a567ec63bd8e071332a9990ec828427a20f00cb29e32545f5abec3ac1754ee5817c4c3f6a5485e8e61f36c8c2d93e7b8bd6a
@@ -120,7 +120,9 @@ module Lita
120
120
  def fill_standup_members(members_list)
121
121
  members_list.each do |user_id|
122
122
  name = ids_to_members[user_id]
123
- standup_members[name] = '' unless ignored_members.include?(name)
123
+ unless ignored_members.include?(name) or name == 'automatic_user_ignore'
124
+ standup_members[name] = ''
125
+ end
124
126
  end
125
127
  end
126
128
 
@@ -137,7 +139,11 @@ module Lita
137
139
  def update_ids_to_members
138
140
  ids_to_members.clear
139
141
  slack_client.users_list['members'].each do |user|
140
- @ids_to_members[user['id']] = user['name']
142
+ if user['deleted'] or user['is_bot']
143
+ @ids_to_members[user['id']] = 'automatic_user_ignore'
144
+ else
145
+ @ids_to_members[user['id']] = user['name']
146
+ end
141
147
  end
142
148
  end
143
149
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-slack-standup"
3
- spec.version = "0.8.0"
3
+ spec.version = "0.9.0"
4
4
  spec.authors = ["Sybil Deboin"]
5
5
  spec.email = ["sybil.deboin@gmail.com"]
6
6
  spec.description = "Standup feature for slack"
@@ -17,11 +17,11 @@ describe Lita::Handlers::SlackStandup, lita_handler: true do
17
17
 
18
18
  stub_request(:post, "https://slack.com/api/users.list").
19
19
  with(:headers => header).
20
- to_return(:status => 200, :body => '{"ok": true,"members":[{"id":"A","name":"sybil"}, {"id":"B","name":"zaratan"}]}', :headers => {})
20
+ to_return(:status => 200, :body => '{"ok": true,"members":[{"id":"A","name":"sybil"}, {"id":"B","name":"zaratan"},{"id":"C","name":"deleted", "deleted":true,"is_bot":false},{"id":"D","name":"bot","deleted":false,"is_bot":true},{"id":"E","name":"deleted_bot","deleted":true,"is_bot":true},{"id":"F","name":"dummy","deleted":false,"is_bot":false}]}', :headers => {})
21
21
 
22
22
  stub_request(:post, "https://slack.com/api/channels.list").
23
23
  with(:headers => header).
24
- to_return(:status => 200, :body => '{"ok":true,"channels":[{"id":"C","name":"jambot-test","members":["B","A"],"num_members":2}]}', :headers => {})
24
+ to_return(:status => 200, :body => '{"ok":true,"channels":[{"id":"CHAN","name":"jambot-test","members":["B","A","C","D","E"],"num_members":5}]}', :headers => {})
25
25
 
26
26
  stub_request(:post, "https://slack.com/api/chat.postMessage").
27
27
  with(:body => {"as_user"=>"true", "channel"=>"#jambot-test", "text"=>"Hello <!channel> ! Le standup va commencer :)", "token"=>nil},:headers => header).
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-slack-standup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sybil Deboin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-01 00:00:00.000000000 Z
11
+ date: 2016-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita