schacon-git 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/git/lib.rb +4 -3
  2. metadata +2 -2
@@ -647,7 +647,7 @@ module Git
647
647
  # returns the current version of git, as an Array of Fixnums.
648
648
  def current_command_version
649
649
  output = command('version', [], false)
650
- version = output[/(\d+)\.(\d+)\.(\d+)\.(\d+)/]
650
+ version = output[/\d+\.\d+(\.\d+)+/]
651
651
  version.split('.').collect {|i| i.to_i}
652
652
  end
653
653
 
@@ -658,10 +658,11 @@ module Git
658
658
  def meets_required_version?
659
659
  current_version = self.current_command_version
660
660
  required_version = self.required_command_version
661
+
661
662
  return current_version[0] >= required_version[0] &&
662
663
  current_version[1] >= required_version[1] &&
663
- current_version[2] >= required_version[2] &&
664
- current_version[3] >= required_version[3]
664
+ (current_version[2] ? current_version[2] >= required_version[2] : true) &&
665
+ (current_version[3] ? current_version[3] >= required_version[3] : true)
665
666
  end
666
667
 
667
668
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schacon-git
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-01 00:00:00 -07:00
12
+ date: 2009-08-02 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15