pronto 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bdfd3ca32c39d7eee0bafdfea6e2337d992423cb
4
- data.tar.gz: a377ae8053e27964ae982f698c69c422793889a3
3
+ metadata.gz: 0bc03d47044e614765fdb291066cf44aac7f6c76
4
+ data.tar.gz: ae8b22913e762688ce93085b4a9b6544e98668e0
5
5
  SHA512:
6
- metadata.gz: d9e119e18814aaacc95a9b103008d61c98b33c6b2cdef9bfb63cd9e11389f96f5f3cc8847b1b005c04fe5045e8e3b6622dd95f7aa9beab39476500f004e72c72
7
- data.tar.gz: 7ab05bcb00fc1a26f959392018de3a9bf20d8f132d9d6d0b9f2ca1998a89c0b1af367c6056ba2a346348a45c1c0c1ef8fa947e75c4ad99c31f9c7a735abe74f1
6
+ metadata.gz: a8b46b058f9f24e776ed49b042e1732cd3dafabd55a8c16580cdfa51ffbfe3e9f1c2b74a5075469acb43d70dd4be2b03a7a08ec704182df20e2c16e791ccccb6
7
+ data.tar.gz: 427cddf924889b41d684c0ce2fb05056bb970c26dc0058ed296d22b2c025bfdfbe09bcf03318b537a6f6f6ba5c70f5c899863cf4524c3a59670f454d152e67fa
@@ -18,14 +18,14 @@ module Pronto
18
18
  end
19
19
 
20
20
  def show_commit(sha)
21
- return [] unless sha
21
+ return empty_patches(sha) unless sha
22
22
 
23
23
  commit = @repo.lookup(sha)
24
- return [] if commit.parents.count != 1
24
+ return empty_patches(sha) if commit.parents.count != 1
25
25
 
26
26
  # TODO: Rugged does not seem to support diffing against multiple parents
27
27
  diff = commit.diff(reverse: true)
28
- return [] if diff.nil?
28
+ return empty_patches(sha) if diff.nil?
29
29
 
30
30
  Patches.new(self, sha, diff.patches)
31
31
  end
@@ -52,6 +52,10 @@ module Pronto
52
52
 
53
53
  private
54
54
 
55
+ def empty_patches(sha)
56
+ Patches.new(self, sha, [])
57
+ end
58
+
55
59
  def merge_base(commit)
56
60
  @repo.merge_base(commit, head)
57
61
  end
@@ -1,3 +1,3 @@
1
1
  module Pronto
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mindaugas Mozūras
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-26 00:00:00.000000000 Z
11
+ date: 2014-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged