lita-slack-standup 0.10.0 → 1.0.0
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/slack_standup.rb +10 -10
- data/lita-slack-standup.gemspec +1 -1
- data/spec/lita/handlers/slack_standup_spec.rb +1 -1
- 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: 4364222638a2403f76b6dd2820942e5cb45ffe29
|
4
|
+
data.tar.gz: 1c99770580f1bcec56460b976be433385ee543f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e7ad5ae7f30fcf8bc6c5f44980a247cf6eeef3a06caf9798fdf5c0e2b6b4fa4949024e13e28c5cad5d12793d41fe40460fef853ab501834a8f33ed1908a553a
|
7
|
+
data.tar.gz: 7058bd619dfb62245fb61432c43a59fc44350ad0f5baa1991e5ed6a307e3a3ec7383046b243103c47a092bdecd20278df3faa00ec3db47b3293debb48dd92d3a
|
@@ -89,8 +89,8 @@ module Lita
|
|
89
89
|
contextual_end_message
|
90
90
|
|
91
91
|
in_standup.value = 'false'
|
92
|
-
update_standup_members
|
93
92
|
update_ids_to_members
|
93
|
+
update_standup_members
|
94
94
|
end
|
95
95
|
|
96
96
|
private
|
@@ -129,15 +129,19 @@ module Lita
|
|
129
129
|
@ignored_members ||= Redis::List.new('ignored_members', redis)
|
130
130
|
end
|
131
131
|
|
132
|
-
def
|
133
|
-
|
134
|
-
update_standup_members if standup_members.empty?
|
132
|
+
def ids_to_members
|
133
|
+
@ids_to_members ||= Redis::HashKey.new('ids_to_members', redis)
|
135
134
|
end
|
136
135
|
|
137
136
|
def standup_members
|
138
137
|
@standup_members ||= Redis::HashKey.new('standup_members', redis)
|
139
138
|
end
|
140
139
|
|
140
|
+
def setup_redis_objects
|
141
|
+
update_ids_to_members if ids_to_members.empty?
|
142
|
+
update_standup_members if standup_members.empty?
|
143
|
+
end
|
144
|
+
|
141
145
|
def retrieve_channel
|
142
146
|
slack_client.channels_list['channels'].find do |channel|
|
143
147
|
"##{ channel['name'] }" == config.channel
|
@@ -159,17 +163,13 @@ module Lita
|
|
159
163
|
fill_standup_members(members_list)
|
160
164
|
end
|
161
165
|
|
162
|
-
def ids_to_members
|
163
|
-
@ids_to_members ||= Redis::HashKey.new('ids_to_members', redis, marshal: true)
|
164
|
-
end
|
165
|
-
|
166
166
|
def update_ids_to_members
|
167
167
|
ids_to_members.clear
|
168
168
|
slack_client.users_list['members'].each do |user|
|
169
169
|
if user['deleted'] or user['is_bot']
|
170
|
-
|
170
|
+
ids_to_members[user['id']] = 'automatic_user_ignore'
|
171
171
|
else
|
172
|
-
|
172
|
+
ids_to_members[user['id']] = user['name']
|
173
173
|
end
|
174
174
|
end
|
175
175
|
end
|
data/lita-slack-standup.gemspec
CHANGED
@@ -94,7 +94,7 @@ describe Lita::Handlers::SlackStandup, lita_handler: true do
|
|
94
94
|
send_message("!standup start", as: sybil, from: channel)
|
95
95
|
end
|
96
96
|
|
97
|
-
it "
|
97
|
+
it "can't launch again the standup" do
|
98
98
|
expect_any_instance_of(Slack::Web::Client).to receive(:chat_postMessage).with({:channel=>channel, :text=>"Le standup est déjà en cours.", :as_user=>true})
|
99
99
|
subject
|
100
100
|
end
|
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.
|
4
|
+
version: 1.0.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-
|
11
|
+
date: 2016-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|