pivotal_reporting 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
@@ -1,6 +1,10 @@
1
1
  class PivotalTracker::Story
2
2
  def initials
3
- owned_by.split(/ /).map{|e| e[0] }.join
3
+ if story_type.to_s == 'release'
4
+ 'Releases'
5
+ else
6
+ owned_by.to_s.split(/ /).map{|e| e[0] }.join
7
+ end
4
8
  end
5
9
  end
6
10
  class PivotalReport
@@ -33,7 +37,7 @@ class PivotalReport
33
37
  def show_discussion_items
34
38
  puts "Discussion Items"
35
39
  puts ""
36
- estimates = stories.sort{|a,b| a.owned_by <=> b.owned_by }.map(&:labels).map{|e| e.to_s.split(/,/) }.flatten.map(&:strip).compact.uniq.select{|l| l =~ /^(#{POST_EST}|e\d)$/ }.sort
40
+ estimates = stories.sort{|a,b| a.owned_by.to_s <=> b.owned_by.to_s }.map(&:labels).map{|e| e.to_s.split(/,/) }.flatten.map(&:strip).compact.uniq.select{|l| l =~ /^(#{POST_EST}|e\d)$/ }.sort
37
41
  estimates.each do |est|
38
42
  set = stories_with_label(est)
39
43
  set.each do |story|
@@ -46,7 +50,7 @@ class PivotalReport
46
50
  puts "Story Bullets"
47
51
  puts ""
48
52
  lis = nil
49
- stories.sort{|a,b| a.owned_by <=> b.owned_by }.each do |story|
53
+ stories.sort{|a,b| a.owned_by.to_s <=> b.owned_by.to_s }.each do |story|
50
54
  if story.initials != lis
51
55
  lis = story.initials
52
56
  puts "#{story.initials}:"
@@ -65,7 +69,7 @@ class PivotalReport
65
69
  puts "PPU Table"
66
70
 
67
71
  categories = stories.map(&:labels).map{|e| e.to_s.split(/,/) }.flatten.map(&:strip).compact.uniq.reject{|l| l =~ /^(#{POST_EST}|e\d)$/ }.sort
68
- people = stories.map(&:owned_by).uniq.sort.map{|p| [p, p.split(/ /).first]}
72
+ people = stories.map(&:owned_by).uniq.compact.sort.map{|p| [p, p.split(/ /).first]}
69
73
  c_width = (['Total'] + categories).map(&:length).max
70
74
 
71
75
  sseen = []
@@ -87,7 +91,7 @@ class PivotalReport
87
91
  end
88
92
  set = stories_with_label(cat)
89
93
  sseen += set
90
- o << set.map(&:estimate).inject(0){|s,e| s + e }.to_s.rjust('Total '.length)
94
+ o << set.map(&:estimate).inject(0){|s,e| s + e.to_i }.to_s.rjust('Total '.length)
91
95
  o << " || "
92
96
  %w{feature bug chore}.each do |type|
93
97
  o << stories_with_label(cat, stories_for_type(type)).map(&:estimate).inject(0){|s,e| s + e }.to_s.rjust(type.length)
@@ -113,7 +117,7 @@ class PivotalReport
113
117
  o << stories_for_user(person).map(&:estimate).inject(0){|s,e| s + e }.to_s.rjust(short.length)
114
118
  o << " | "
115
119
  end
116
- o << stories.map(&:estimate).inject(0){|s,e| s + e }.to_s.rjust('Total '.length)
120
+ o << stories.map(&:estimate).inject(0){|s,e| s + e.to_i }.to_s.rjust('Total '.length)
117
121
  o << " || "
118
122
  %w{feature bug chore}.each do |type|
119
123
  o << stories_for_type(type).map(&:estimate).inject(0){|s,e| s + e }.to_s.rjust(type.length)
@@ -154,7 +158,7 @@ class PivotalReport
154
158
 
155
159
  def stories_for_user(user, set=nil)
156
160
  set ||= stories
157
- set.select{|s| s.owned_by == user }
161
+ set.select{|s| s.owned_by.to_s == user }
158
162
  end
159
163
 
160
164
  def stories_for_type(type, set=nil)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "pivotal_reporting"
8
- s.version = "1.1.0"
8
+ s.version = "1.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joshua Szmajda"]
12
- s.date = "2012-02-22"
12
+ s.date = "2012-02-27"
13
13
  s.description = "Please see the README. This tool generates some reports that could be useful if you're managing a team of developers using Pivotal Tracker"
14
14
  s.email = "joshsz@gmail.com"
15
15
  s.executables = ["pivotal_report"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivotal_reporting
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-22 00:00:00.000000000Z
12
+ date: 2012-02-27 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pivotal-tracker
16
- requirement: &26847420 !ruby/object:Gem::Requirement
16
+ requirement: &18094300 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *26847420
24
+ version_requirements: *18094300
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: jeweler
27
- requirement: &26846860 !ruby/object:Gem::Requirement
27
+ requirement: &18093780 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 1.8.3
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *26846860
35
+ version_requirements: *18093780
36
36
  description: Please see the README. This tool generates some reports that could be
37
37
  useful if you're managing a team of developers using Pivotal Tracker
38
38
  email: joshsz@gmail.com
@@ -65,7 +65,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
65
65
  version: '0'
66
66
  segments:
67
67
  - 0
68
- hash: -2710953001986084616
68
+ hash: 929324351052062
69
69
  required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  none: false
71
71
  requirements: