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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4da7d0c0f5efd3c66b7375cf0436b846c32cca8
4
- data.tar.gz: d37286039c6068cf220331a1f9cffebe8352af9f
3
+ metadata.gz: 4364222638a2403f76b6dd2820942e5cb45ffe29
4
+ data.tar.gz: 1c99770580f1bcec56460b976be433385ee543f9
5
5
  SHA512:
6
- metadata.gz: 184fa2d42176ae1b83201405ee45fcba74a116003117fff82a549577fffd8819acf89b303b232504a813dc205f6391b2c36c8ac3c3795c2e486729db4d98165e
7
- data.tar.gz: b2bf9cd99cb33c11fdf18d0d93f4651d7a57ba1ef302a4cfc3ffa2011eaebea3a21ee6897003679593f3dcbc973232181980f48f2da4875a6281ec0268044447
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 setup_redis_objects
133
- update_ids_to_members if ids_to_members.empty?
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
- @ids_to_members[user['id']] = 'automatic_user_ignore'
170
+ ids_to_members[user['id']] = 'automatic_user_ignore'
171
171
  else
172
- @ids_to_members[user['id']] = user['name']
172
+ ids_to_members[user['id']] = user['name']
173
173
  end
174
174
  end
175
175
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-slack-standup"
3
- spec.version = "0.10.0"
3
+ spec.version = "1.0.0"
4
4
  spec.authors = ["Sybil Deboin"]
5
5
  spec.email = ["sybil.deboin@gmail.com"]
6
6
  spec.description = "Standup feature for slack"
@@ -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 "doesn't restart the standup" do
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.10.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-02 00:00:00.000000000 Z
11
+ date: 2016-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita