mercurial-ruby 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.5
1
+ 0.7.6
@@ -6,7 +6,7 @@ require 'time'
6
6
  #
7
7
  module Mercurial
8
8
 
9
- VERSION = '0.7.5'
9
+ VERSION = '0.7.6'
10
10
 
11
11
  class Error < RuntimeError; end
12
12
 
@@ -102,6 +102,7 @@ module Mercurial
102
102
  def stats(cmd_options={})
103
103
  raw = hg(["log -r ? --stat --template '{node}\n'", hash_id], cmd_options)
104
104
  result = raw.scan(/(\d+) files changed, (\d+) insertions\(\+\), (\d+) deletions\(\-\)$/).flatten.map{|r| r.to_i}
105
+ return {} if result.empty? # that commit has no stats
105
106
  {
106
107
  'files' => result[0],
107
108
  'additions' => result[1],
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mercurial-ruby}
8
- s.version = "0.7.5"
8
+ s.version = "0.7.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ilya Sabanin"]
12
- s.date = %q{2012-03-15}
12
+ s.date = %q{2012-10-23}
13
13
  s.description = %q{Ruby API for Mercurial DVCS.}
14
14
  s.email = %q{ilya.sabanin@gmail.com}
15
15
  s.extra_rdoc_files = [
data/test/test_commit.rb CHANGED
@@ -72,9 +72,14 @@ describe Mercurial::Commit do
72
72
  stats['total'].must_equal 91
73
73
  end
74
74
 
75
+ it "should not die when trying to return stats for a commit without stats" do
76
+ commit = @repository.commits.by_hash_id('8173f122b0d0')
77
+ commit.stats.must_equal {}
78
+ end
79
+
75
80
  it "should return IDs of it's trivial parents" do
76
81
  commit = @repository.commits.by_hash_id('bc729b15e2b5')
77
82
  commit.trivial_parents_ids.must_equal %w(bf6386c0a0ccd1282dbbe51888f52fe82b1806e3)
78
83
  end
79
-
84
+
80
85
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercurial-ruby
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 5
10
- version: 0.7.5
9
+ - 6
10
+ version: 0.7.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ilya Sabanin
@@ -15,13 +15,10 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-15 00:00:00 -04:00
18
+ date: 2012-10-23 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- type: :runtime
23
- prerelease: false
24
- name: open4
25
22
  version_requirements: &id001 !ruby/object:Gem::Requirement
26
23
  none: false
27
24
  requirements:
@@ -34,10 +31,10 @@ dependencies:
34
31
  - 0
35
32
  version: 1.3.0
36
33
  requirement: *id001
37
- - !ruby/object:Gem::Dependency
38
- type: :development
34
+ type: :runtime
35
+ name: open4
39
36
  prerelease: false
40
- name: minitest
37
+ - !ruby/object:Gem::Dependency
41
38
  version_requirements: &id002 !ruby/object:Gem::Requirement
42
39
  none: false
43
40
  requirements:
@@ -48,10 +45,10 @@ dependencies:
48
45
  - 0
49
46
  version: "0"
50
47
  requirement: *id002
51
- - !ruby/object:Gem::Dependency
52
48
  type: :development
49
+ name: minitest
53
50
  prerelease: false
54
- name: bundler
51
+ - !ruby/object:Gem::Dependency
55
52
  version_requirements: &id003 !ruby/object:Gem::Requirement
56
53
  none: false
57
54
  requirements:
@@ -64,10 +61,10 @@ dependencies:
64
61
  - 0
65
62
  version: 1.0.0
66
63
  requirement: *id003
67
- - !ruby/object:Gem::Dependency
68
64
  type: :development
65
+ name: bundler
69
66
  prerelease: false
70
- name: jeweler
67
+ - !ruby/object:Gem::Dependency
71
68
  version_requirements: &id004 !ruby/object:Gem::Requirement
72
69
  none: false
73
70
  requirements:
@@ -80,10 +77,10 @@ dependencies:
80
77
  - 4
81
78
  version: 1.6.4
82
79
  requirement: *id004
83
- - !ruby/object:Gem::Dependency
84
80
  type: :development
81
+ name: jeweler
85
82
  prerelease: false
86
- name: rcov
83
+ - !ruby/object:Gem::Dependency
87
84
  version_requirements: &id005 !ruby/object:Gem::Requirement
88
85
  none: false
89
86
  requirements:
@@ -94,10 +91,10 @@ dependencies:
94
91
  - 0
95
92
  version: "0"
96
93
  requirement: *id005
97
- - !ruby/object:Gem::Dependency
98
94
  type: :development
95
+ name: rcov
99
96
  prerelease: false
100
- name: mocha
97
+ - !ruby/object:Gem::Dependency
101
98
  version_requirements: &id006 !ruby/object:Gem::Requirement
102
99
  none: false
103
100
  requirements:
@@ -109,10 +106,10 @@ dependencies:
109
106
  - 9
110
107
  version: "0.9"
111
108
  requirement: *id006
112
- - !ruby/object:Gem::Dependency
113
109
  type: :development
110
+ name: mocha
114
111
  prerelease: false
115
- name: ruby-debug
112
+ - !ruby/object:Gem::Dependency
116
113
  version_requirements: &id007 !ruby/object:Gem::Requirement
117
114
  none: false
118
115
  requirements:
@@ -124,6 +121,9 @@ dependencies:
124
121
  - 10
125
122
  version: "0.10"
126
123
  requirement: *id007
124
+ type: :development
125
+ name: ruby-debug
126
+ prerelease: false
127
127
  description: Ruby API for Mercurial DVCS.
128
128
  email: ilya.sabanin@gmail.com
129
129
  executables: []