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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4364222638a2403f76b6dd2820942e5cb45ffe29
4
- data.tar.gz: 1c99770580f1bcec56460b976be433385ee543f9
3
+ metadata.gz: 89112ea2047b1056586a00ba012d2512df53e655
4
+ data.tar.gz: 73e7b3aed31e7f7a3dc1ad27ee2cbe3e574771c7
5
5
  SHA512:
6
- metadata.gz: 9e7ad5ae7f30fcf8bc6c5f44980a247cf6eeef3a06caf9798fdf5c0e2b6b4fa4949024e13e28c5cad5d12793d41fe40460fef853ab501834a8f33ed1908a553a
7
- data.tar.gz: 7058bd619dfb62245fb61432c43a59fc44350ad0f5baa1991e5ed6a307e3a3ec7383046b243103c47a092bdecd20278df3faa00ec3db47b3293debb48dd92d3a
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
- contextual_end_message
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 contextual_end_message
110
- if in_standup.value == 'true'
111
- send_message(config.channel,t("sentence.end_standup"))
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?
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-slack-standup"
3
- spec.version = "1.0.0"
3
+ spec.version = "1.0.1"
4
4
  spec.authors = ["Sybil Deboin"]
5
5
  spec.email = ["sybil.deboin@gmail.com"]
6
6
  spec.description = "Standup feature for slack"
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
- clear_objects: "We're not during standup. The saved standups have been erased and the users list updated."
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
- clear_objects: "Aucun standup en cours. Les standups enregistrés ont été supprimés et la liste des utilisateurs mise à jour."
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. Les standups enregistrés ont été supprimés et la liste des utilisateurs mise à jour.", "token"=>nil},:headers => header).
44
- to_return(:status => 200, :body => '{"ok": true,"channel": "C","message": "Aucun standup en cours. Les standups enregistrés ont été supprimés et la liste des utilisateurs mise à jour."}', :headers => {})
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. Les standups enregistrés ont été supprimés et la liste des utilisateurs mise à jour.", :as_user=>true})
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-slack-standup
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sybil Deboin