artisan-core 0.0.2 → 0.0.10

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.
@@ -3,6 +3,7 @@ require "artisan/iterations/iteration_point_calculator"
3
3
  require "artisan/iterations/iterations_interactor"
4
4
  require "artisan/iterations/move_to_backlog"
5
5
  require "artisan/repository"
6
+ require "artisan/iterations/iteration_point_calculator"
6
7
 
7
8
  module Artisan
8
9
  module Iterations
@@ -34,6 +34,11 @@ module Artisan
34
34
  sum_estimates(billed)
35
35
  end
36
36
 
37
+ def billed_points_by_craftsman
38
+ totals = sum_estimates_by_craftsman(billed)
39
+ totals.keys.collect { |craftsman| {craftsman: craftsman, points: totals[craftsman]} }
40
+ end
41
+
37
42
  def estimated_points
38
43
  sum_estimates(@stories)
39
44
  end
@@ -61,6 +66,15 @@ module Artisan
61
66
  sum
62
67
  end
63
68
  end
69
+
70
+ def sum_estimates_by_craftsman(collection)
71
+ totals = Hash.new(0)
72
+ collection.each do |story|
73
+ asignee = (story.assigned_user_name.present?) ? story.assigned_user_name : "Unassigned"
74
+ totals[asignee] += story.estimate if story.estimate
75
+ end
76
+ totals
77
+ end
64
78
  end
65
79
  end
66
80
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artisan-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-20 00:00:00.000000000 Z
12
+ date: 2012-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: lazy_high_charts