lita-slack-standup 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/lita/handlers/slack_standup.rb +6 -6
- data/lita-slack-standup.gemspec +1 -1
- data/locales/en.yml +1 -1
- data/locales/fr.yml +1 -1
- data/spec/lita/handlers/slack_standup_spec.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89112ea2047b1056586a00ba012d2512df53e655
|
4
|
+
data.tar.gz: 73e7b3aed31e7f7a3dc1ad27ee2cbe3e574771c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4b60e34957088fb7216d253e3b96c07dee1a843b3f139c86b88cf060b41685c06e77380cb16cb359538f01c2e774b8446f3b3e87f2714a1bb256b2b6e1f85c8
|
7
|
+
data.tar.gz: 1ae64a78fb0e9c86564f5ef8594aaa3be5a23ec74ada631a9c6aae047527739b45f6afbfb0a19f515834075181d523a20c724d31d13c6e61ee74a311f8bd242b
|
data/README.md
CHANGED
@@ -28,5 +28,6 @@ end
|
|
28
28
|
- !standup ignore <some user> : ignores an user for the standups
|
29
29
|
- !standup unignore <some user> : unignores an user
|
30
30
|
- !standup list : lists all ignored users
|
31
|
+
- !standup end : ends the current standup
|
31
32
|
|
32
33
|
The standup stops when everyone has done his report or has been skipped.
|
@@ -86,8 +86,9 @@ module Lita
|
|
86
86
|
route(/^standup\s+end$/, :standup_end, command: true, help: {t("help.end_cmd") => t("help.end_description")})
|
87
87
|
|
88
88
|
def standup_end(message=nil)
|
89
|
-
|
89
|
+
return unless end_check?
|
90
90
|
|
91
|
+
send_message(config.channel,t("sentence.end_standup"))
|
91
92
|
in_standup.value = 'false'
|
92
93
|
update_ids_to_members
|
93
94
|
update_standup_members
|
@@ -106,12 +107,11 @@ module Lita
|
|
106
107
|
in_standup.value == 'true'
|
107
108
|
end
|
108
109
|
|
109
|
-
def
|
110
|
-
if in_standup.value
|
111
|
-
send_message(config.channel,t("sentence.
|
112
|
-
else
|
113
|
-
send_message(config.channel, t("sentence.clear_objects"))
|
110
|
+
def end_check?
|
111
|
+
if in_standup.value != 'true'
|
112
|
+
send_message(config.channel, t("sentence.end_forbidden"))
|
114
113
|
end
|
114
|
+
in_standup.value == 'true'
|
115
115
|
end
|
116
116
|
|
117
117
|
def standup_check?
|
data/lita-slack-standup.gemspec
CHANGED
data/locales/en.yml
CHANGED
@@ -30,4 +30,4 @@ en:
|
|
30
30
|
standup_fill: "Standup done in live."
|
31
31
|
already_started: "The standup is already started."
|
32
32
|
end_standup: "That's it ! It's all good for today. Thanks everyone :)"
|
33
|
-
|
33
|
+
end_forbidden: "There is no ongoing standup."
|
data/locales/fr.yml
CHANGED
@@ -30,4 +30,4 @@ fr:
|
|
30
30
|
standup_fill: "Standup fait en live."
|
31
31
|
already_started: "Le standup est déjà en cours."
|
32
32
|
end_standup: "Et voilà ! C'est bon pour aujourd'hui. Merci tout le monde :)"
|
33
|
-
|
33
|
+
end_forbidden: "Aucun standup en cours."
|
@@ -40,8 +40,8 @@ describe Lita::Handlers::SlackStandup, lita_handler: true do
|
|
40
40
|
to_return(:status => 200, :body => '{"ok": true,"channel": "C","message": "Et voilà ! C\'est bon pour aujourd\'hui. Merci tout le monde :)"}', :headers => {})
|
41
41
|
|
42
42
|
stub_request(:post, "https://slack.com/api/chat.postMessage").
|
43
|
-
with(:body => {"as_user"=>"true", "channel"=>"#jambot-test", "text"=>"Aucun standup en cours.
|
44
|
-
to_return(:status => 200, :body => '{"ok": true,"channel": "C","message": "Aucun standup en cours.
|
43
|
+
with(:body => {"as_user"=>"true", "channel"=>"#jambot-test", "text"=>"Aucun standup en cours.", "token"=>nil},:headers => header).
|
44
|
+
to_return(:status => 200, :body => '{"ok": true,"channel": "C","message": "Aucun standup en cours."}', :headers => {})
|
45
45
|
|
46
46
|
stub_request(:post, "https://slack.com/api/chat.postMessage").
|
47
47
|
with(:body => {"as_user"=>"true", "channel"=>"#jambot-test", "text"=>"La commande n'est pas disponible en dehors d'un standup.", "token"=>nil},:headers => header).
|
@@ -233,7 +233,7 @@ describe Lita::Handlers::SlackStandup, lita_handler: true do
|
|
233
233
|
context "outside the standup" do
|
234
234
|
it "clears the objects" do
|
235
235
|
|
236
|
-
expect_any_instance_of(Slack::Web::Client).to receive(:chat_postMessage).with({:channel=>channel, :text=>"Aucun standup en cours.
|
236
|
+
expect_any_instance_of(Slack::Web::Client).to receive(:chat_postMessage).with({:channel=>channel, :text=>"Aucun standup en cours.", :as_user=>true})
|
237
237
|
subject
|
238
238
|
end
|
239
239
|
end
|