git-delta 0.3.0 → 0.3.1

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.
@@ -50,7 +50,9 @@ module Git
50
50
  def git_log
51
51
  extra = Array(extra_args).join(' ')
52
52
  extra << "--author=#{`git config user.email`.strip}" unless extra.include? '--author='
53
- `git log --oneline --shortstat --no-merges #{extra} -- #{file_filter}`
53
+ cmd = "git log --oneline --shortstat --no-merges #{extra} -- #{file_filter}"
54
+ # p cmd
55
+ `#{cmd}`
54
56
  end
55
57
 
56
58
  def file_filter
@@ -66,7 +68,7 @@ module Git
66
68
 
67
69
  def self.parse_log(log)
68
70
  log.lines.each_slice(2).map do |commit, changes|
69
- _, plus, minus = *changes.match(/.*changed,\s*(\d+ insertions\(\+\),?\s*)?(\d+ deletions\(\-\))?/)
71
+ _, plus, minus = *changes.match(/.*changed,\s*(\d+ insertions?\(\+\),?\s*)?(\d+ deletions?\(\-\))?/)
70
72
  [commit.chomp, plus.to_i, -minus.to_i]
71
73
  end
72
74
  end
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Delta
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-delta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
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-02-12 00:00:00.000000000 Z
12
+ date: 2013-04-11 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Calculate the number of lines added/subtracted in a git directory
15
15
  email:
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  version: '0'
52
52
  requirements: []
53
53
  rubyforge_project:
54
- rubygems_version: 1.8.24
54
+ rubygems_version: 1.8.25
55
55
  signing_key:
56
56
  specification_version: 3
57
57
  summary: Calculate the number of lines added/subtracted in a git directory