lita-estimate 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +5 -3
- data/lib/lita/handlers/estimate.rb +7 -4
- data/lita-estimate.gemspec +1 -1
- data/spec/lita/handlers/estimate_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0f0f5308e0f0bdb4e495f4190e284bfd8cb5592
|
4
|
+
data.tar.gz: d9b7c27c51c53077db924fe30cc5bde8d678b31a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a63e13092b246f694f1adfd0e47ed3865d0e607cd4d706006695eddc7b1b53f9e2faeec07e0848f36f6861c67bd0dc7efc22a0007a938dba8f38ad50752fa80c
|
7
|
+
data.tar.gz: 2f85cbe80deb35ecb3adf20b9b5fc8587181e3a851958f07c5df945bea778fd77e0b2ed91736ee6b88715a07fafa7b7865e0995565ad96742ee5ca4b4bd2c80e
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
# lita-estimate
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/lita-estimate.svg)](https://badge.fury.io/rb/lita-estimate)
|
3
4
|
[![Build Status](https://travis-ci.org/ingoweiss/lita-estimate.png?branch=master)](https://travis-ci.org/ingoweiss/lita-estimate)
|
4
5
|
[![Coverage Status](https://coveralls.io/repos/ingoweiss/lita-estimate/badge.png)](https://coveralls.io/r/ingoweiss/lita-estimate)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/ingoweiss/lita-estimate/badges/gpa.svg)](https://codeclimate.com/github/ingoweiss/lita-estimate)
|
5
7
|
|
6
8
|
Just a silly little Lita plugin for estimation
|
7
9
|
|
@@ -27,9 +29,9 @@ Bot> Thanks!
|
|
27
29
|
2) In team room:
|
28
30
|
|
29
31
|
Carl> @bot US123 estimates
|
30
|
-
Bot> Peter
|
31
|
-
Bot> Paula
|
32
|
-
Bot> Average
|
32
|
+
Bot> 5 (Peter)
|
33
|
+
Bot> 3 (Paula)
|
34
|
+
Bot> 4.0 (Average)
|
33
35
|
|
34
36
|
3) For more:
|
35
37
|
|
@@ -24,11 +24,10 @@ module Lita
|
|
24
24
|
response.reply("No estimates yet for #{story}")
|
25
25
|
else
|
26
26
|
lines = []
|
27
|
-
estimates.
|
28
|
-
lines << "#{
|
27
|
+
estimates.map{|dev, est| [est.to_i, dev]}.sort.each do |estimate, estimator|
|
28
|
+
lines << "#{estimate} (#{estimator})"
|
29
29
|
end
|
30
|
-
|
31
|
-
lines << "Average: #{average}"
|
30
|
+
lines << "#{average(estimates.values)} Average"
|
32
31
|
response.reply(lines.join("\n"))
|
33
32
|
end
|
34
33
|
end
|
@@ -53,6 +52,10 @@ module Lita
|
|
53
52
|
['estimate', story].join(':')
|
54
53
|
end
|
55
54
|
|
55
|
+
def average(estimates)
|
56
|
+
estimates.map(&:to_i).inject(:+).to_f / estimates.size
|
57
|
+
end
|
58
|
+
|
56
59
|
Lita.register_handler(self)
|
57
60
|
end
|
58
61
|
end
|
data/lita-estimate.gemspec
CHANGED
@@ -43,9 +43,9 @@ describe Lita::Handlers::Estimate, lita_handler: true do
|
|
43
43
|
subject.redis.hset('estimate:US123', 'Paula', '3')
|
44
44
|
send_command('US123 estimates')
|
45
45
|
expect(lines(replies.last)).to eq([
|
46
|
-
"Paula
|
47
|
-
"Peter
|
48
|
-
"
|
46
|
+
"3 (Paula)",
|
47
|
+
"5 (Peter)",
|
48
|
+
"4.0 Average"
|
49
49
|
])
|
50
50
|
end
|
51
51
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-estimate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ingo Weiss
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|