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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ed605cdde13081275049d971e030093180a6289
4
- data.tar.gz: f5f84bfbb4351c44541160802739958d607daf70
3
+ metadata.gz: c159714c943ec7e0b51a45accb6e1c67a9750a04
4
+ data.tar.gz: df7e539861f3cf736502dc413cc656d47037e1b5
5
5
  SHA512:
6
- metadata.gz: d49dec67ce61f67e7e9dfd3cbeeda8126d17c16fb2b8c949b76062ca86b216f8a3740d02cc109214a6eefb5e9556ab68aade7bfd1a0c38a91629429707237d4d
7
- data.tar.gz: e81b0780441ecb6c1cdb11da8fc5f03787badedc74b310d6f7eae6126c154fdfd4ddffc7de80eefbc410bf5406c1d64f2d54670aed1d4f4253cadc2e199e8954
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
  [![Build Status](https://travis-ci.org/EdgarOrtegaRamirez/lita-team.svg?branch=master)](https://travis-ci.org/EdgarOrtegaRamirez/lita-team)
4
+ [![Gem Version](https://badge.fury.io/rb/lita-team.svg)](https://badge.fury.io/rb/lita-team)
4
5
  [![Coverage Status](https://coveralls.io/repos/EdgarOrtegaRamirez/lita-team/badge.svg?branch=master)](https://coveralls.io/r/EdgarOrtegaRamirez/lita-team?branch=master)
5
6
  [![Code Climate](https://codeclimate.com/github/EdgarOrtegaRamirez/lita-team/badges/gpa.svg)](https://codeclimate.com/github/EdgarOrtegaRamirez/lita-team)
6
7
  [![Security](https://hakiri.io/github/EdgarOrtegaRamirez/lita-team/master.svg)](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 <user> - add user to team
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 <user> - remove <user> from team
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 clear - clear team list
34
- Lita: <name> team empty - clear team list
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-team"
3
- spec.version = "2.0.0"
3
+ spec.version = "2.1.0"
4
4
  spec.authors = ["Edgar Ortega"]
5
5
  spec.email = ["edgarortegaramirez@gmail.com"]
6
6
  spec.description = "create and manage the members of a team with Lita"
@@ -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 "confirmed the member and displays a message" do
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 "confirmed the member and displays a message" do
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 | :love: best place | Max: 10
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
- expect(replies.last).
54
- to eq("There is no one in the testing team currently")
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 do
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
@@ -1,12 +1,17 @@
1
- <% if @team[:members].empty? %>
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: " + @team[:members].count.to_s %><%= " | " + @team[:icon] if @team[:icon] %><%= " " + @team[:location] if @team[:location] %><%= " | Max: " + @team[:limit].to_s if @team[:limit] %>
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 %>. <%= member[:name] %><%= " :point_up:" if member[:confirmed] %>
13
+ <%= "#{i + 1}. #{member[:name]}" %>
14
+ <%= " :point_up:" if member[:confirmed] %>
10
15
 
11
16
  <% end %>
12
17
  <% end %>
@@ -1,4 +1,5 @@
1
1
  <%= I18n.t("lita.handlers.team.teams_title") %>:
2
2
  <% @teams.each do |team| %>
3
+ <%= "#{team[:icon]} " if team[:icon] %>
3
4
  <%= team[:name] %> (<%= team[:members].count %> :bust_in_silhouette:)
4
5
  <% end %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-team
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgar Ortega