git-branch_stats 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module BranchStats
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -65,6 +65,7 @@ module Git
65
65
 
66
66
 
67
67
  def self.analyze(branch = `git rev-parse --abbrev-ref HEAD`.strip)
68
+ warnings = []
68
69
  # Get all commits that are only visible for this HEAD (branch).
69
70
  # List commits, without merges, of HEAD, that are not any ref from other branches
70
71
  branches = `git branch`.split(/\n/)
@@ -88,7 +89,8 @@ module Git
88
89
  `git rev-parse --verify --quiet #{diff_origin}`
89
90
  if $?.to_i > 0
90
91
  diff_origin = independent_commits.last
91
- puts "WARN: Branch has independent commits since the first commit of the repo, stats will be skewed (can't run stats *before* the first commit)"
92
+
93
+ warnings.push "WARN: Branch has independent commits since the first commit of the repo, stats will be skewed (can't run stats *before* the first commit)"
92
94
  # In this case, exclude the last commit (since it won't be included in the stats)
93
95
  commit_count = commit_count - 1
94
96
  end
@@ -124,7 +126,8 @@ module Git
124
126
  :deletions => total_deletions,
125
127
  :files_changed => change_count,
126
128
  :language_stats => language_stats,
127
- :emails => emails
129
+ :emails => emails,
130
+ :warnings => warnings
128
131
  }
129
132
  end
130
133
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-branch_stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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: 2013-05-13 00:00:00.000000000 Z
12
+ date: 2013-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: github-linguist
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  version: '0'
63
63
  requirements: []
64
64
  rubyforge_project:
65
- rubygems_version: 1.8.24
65
+ rubygems_version: 1.8.25
66
66
  signing_key:
67
67
  specification_version: 3
68
68
  summary: Git branch statistics