lita-team 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -4
- data/lita-team.gemspec +1 -1
- data/spec/lita/handlers/confirm_member_spec.rb +4 -4
- data/spec/lita/handlers/list_team_spec.rb +8 -4
- data/spec/lita/handlers/list_teams_spec.rb +4 -2
- data/templates/list_team.erb +10 -5
- data/templates/list_teams.erb +1 -0
- 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: c159714c943ec7e0b51a45accb6e1c67a9750a04
|
4
|
+
data.tar.gz: df7e539861f3cf736502dc413cc656d47037e1b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e977acfcd2bfe35b4efeaf119f2a43c5b73017e5763140ab0293a4256aebb057b90485a9cdaaf66c3e605ed62974663331c073c1f2ab3e298d407ab750ad632
|
7
|
+
data.tar.gz: 5db9dbb32b2fbd055ff5aab315f81bab45aca45953d8c363751916c9d145b3853471a04c9517ad7b950477d9159446448b10e9a0076c2bed13bd17a290a942dd
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# lita-team
|
2
2
|
|
3
3
|
[](https://travis-ci.org/EdgarOrtegaRamirez/lita-team)
|
4
|
+
[](https://badge.fury.io/rb/lita-team)
|
4
5
|
[](https://coveralls.io/r/EdgarOrtegaRamirez/lita-team?branch=master)
|
5
6
|
[](https://codeclimate.com/github/EdgarOrtegaRamirez/lita-team)
|
6
7
|
[](https://hakiri.io/github/EdgarOrtegaRamirez/lita-team/master)
|
@@ -21,15 +22,22 @@ gem 'lita-team'
|
|
21
22
|
Lita: create <name> team - create team called <name>
|
22
23
|
Lita: delete <name> team - delete team called <name>
|
23
24
|
Lita: remove <name> team - delete team called <name>
|
25
|
+
Lita: block <name> team - block team called <name>
|
26
|
+
Lita: unblock <name> team - unblock team called <name>
|
24
27
|
Lita: list teams - list all teams
|
28
|
+
Lita: <name> team clear - clear team list
|
29
|
+
Lita: <name> team empty - clear team list
|
25
30
|
Lita: <name> team +1 - add me to team
|
26
31
|
Lita: <name> team add me - add me to team
|
27
|
-
Lita: <name> team add <
|
32
|
+
Lita: <name> team add <member> - add member to team
|
28
33
|
Lita: <name> team -1 - remove me from team
|
29
34
|
Lita: <name> team remove me - remove me from team
|
30
|
-
Lita: <name> team remove <
|
35
|
+
Lita: <name> team remove <member> - remove member from team
|
36
|
+
Lita: <name> team confirm me - confirm attendance
|
37
|
+
Lita: <name> team remove <member> - confirm member attendance
|
31
38
|
Lita: <name> team list - list the people in the team
|
32
39
|
Lita: <name> team show - list the people in the team
|
33
|
-
Lita: <name> team
|
34
|
-
Lita: <name> team
|
40
|
+
Lita: <name> team set limit <value> - update team members limit
|
41
|
+
Lita: <name> team set location <value> - update team location
|
42
|
+
Lita: <name> team set icon <value> - update team icon
|
35
43
|
```
|
data/lita-team.gemspec
CHANGED
@@ -41,8 +41,8 @@ describe Lita::Handlers::ConfirmMember,
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
context "there is a member in the team" do
|
45
|
-
it "
|
44
|
+
context "there is a unconfirmed member in the team" do
|
45
|
+
it "confirmes the member and displays a message" do
|
46
46
|
send_command "create testing team"
|
47
47
|
send_command "testing team add john"
|
48
48
|
send_command "testing team add james"
|
@@ -52,8 +52,8 @@ describe Lita::Handlers::ConfirmMember,
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
-
context "there are two or more members in the team" do
|
56
|
-
it "
|
55
|
+
context "there are two or more unconfirmed members in the team" do
|
56
|
+
it "confirmes the member and displays a message" do
|
57
57
|
send_command "create testing team"
|
58
58
|
send_command "testing team add john"
|
59
59
|
send_command "testing team add mel"
|
@@ -24,8 +24,8 @@ describe Lita::Handlers::ListTeam,
|
|
24
24
|
send_command "update testing team set location best place"
|
25
25
|
send_command "testing team list"
|
26
26
|
reply = <<-OUTPUT
|
27
|
-
testing
|
28
|
-
:bust_in_silhouette: 1 | :
|
27
|
+
:love: testing
|
28
|
+
:bust_in_silhouette: 1 | :round_pushpin: best place | Max: 10
|
29
29
|
1. melissa
|
30
30
|
OUTPUT
|
31
31
|
expect(replies.last).to eq(reply)
|
@@ -50,8 +50,12 @@ OUTPUT
|
|
50
50
|
it "shows a message" do
|
51
51
|
send_command "create testing team"
|
52
52
|
send_command "testing team list"
|
53
|
-
|
54
|
-
|
53
|
+
reply = <<-OUTPUT
|
54
|
+
testing
|
55
|
+
:bust_in_silhouette: 0
|
56
|
+
There is no one in the testing team currently
|
57
|
+
OUTPUT
|
58
|
+
expect(replies.last).to eq(reply)
|
55
59
|
end
|
56
60
|
end
|
57
61
|
|
@@ -2,16 +2,18 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe Lita::Handlers::ListTeams,
|
4
4
|
lita_handler: true,
|
5
|
-
additional_lita_handlers: Lita::Handlers::CreateTeam
|
5
|
+
additional_lita_handlers: [Lita::Handlers::CreateTeam,
|
6
|
+
Lita::Handlers::UpdateTeam] do
|
6
7
|
describe "list teams" do
|
7
8
|
it "list all teams" do
|
8
9
|
send_command "create testing team"
|
10
|
+
send_command "testing team set icon :movie_camera:"
|
9
11
|
send_command "create qa team"
|
10
12
|
send_command "list teams"
|
11
13
|
reply = <<-OUTPUT
|
12
14
|
Teams:
|
13
15
|
qa (0 :bust_in_silhouette:)
|
14
|
-
testing (0 :bust_in_silhouette:)
|
16
|
+
:movie_camera: testing (0 :bust_in_silhouette:)
|
15
17
|
OUTPUT
|
16
18
|
expect(replies.last).to eq(reply)
|
17
19
|
end
|
data/templates/list_team.erb
CHANGED
@@ -1,12 +1,17 @@
|
|
1
|
-
|
2
|
-
<%= I18n.t('lita.handlers.team.empty', team_name: @team[:name]) %>
|
3
|
-
<% else %>
|
1
|
+
<%= "#{@team[:icon]} " if @team[:icon] %>
|
4
2
|
<%= @team[:name] %>
|
5
3
|
|
6
|
-
<%= ":bust_in_silhouette:
|
4
|
+
<%= ":bust_in_silhouette: #{@team[:members].count}" %>
|
5
|
+
<%= " | :round_pushpin: " + @team[:location] if @team[:location] %>
|
6
|
+
<%= " | Max: " + @team[:limit].to_s if @team[:limit] %>
|
7
7
|
|
8
|
+
<% if @team[:members].empty? %>
|
9
|
+
<%= I18n.t("lita.handlers.team.empty", team_name: @team[:name]) %>
|
10
|
+
|
11
|
+
<% else %>
|
8
12
|
<% @team[:members].each_with_index do |(key, member), i| %>
|
9
|
-
<%= i + 1
|
13
|
+
<%= "#{i + 1}. #{member[:name]}" %>
|
14
|
+
<%= " :point_up:" if member[:confirmed] %>
|
10
15
|
|
11
16
|
<% end %>
|
12
17
|
<% end %>
|
data/templates/list_teams.erb
CHANGED