mortar 0.4.3 → 0.4.4

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.
@@ -35,9 +35,9 @@ module Mortar
35
35
  if has_git
36
36
  git_version = git_version_output.split(" ")[2]
37
37
  versions = git_version.split(".")
38
- is_ok_version = versions[0].to_i >= 1 &&
39
- versions[1].to_i >= 7 &&
40
- versions[2].to_i >= 7
38
+ is_ok_version = versions[0].to_i >= 2 ||
39
+ ( versions[0].to_i == 1 && versions[1].to_i >= 8 ) ||
40
+ ( versions[0].to_i == 1 && versions[1].to_i == 7 && versions[2].to_i >= 7)
41
41
  end
42
42
  has_git && is_ok_version
43
43
  end
@@ -248,4 +248,4 @@ module Mortar
248
248
  end
249
249
  end
250
250
  end
251
- end
251
+ end
@@ -16,5 +16,5 @@
16
16
 
17
17
  module Mortar
18
18
  # see http://semver.org/
19
- VERSION = "0.4.3"
19
+ VERSION = "0.4.4"
20
20
  end
@@ -26,15 +26,25 @@ module Mortar
26
26
 
27
27
  context "has_git?" do
28
28
  it "returns false with no git installed" do
29
- mock(@git).run_cmd("git --version").returns("-bash: git: command not found")
29
+ mock(@git).run_cmd("git --version").returns(["-bash: git: command not found",-1])
30
30
  @git.has_git?.should be_false
31
31
  end
32
32
 
33
33
  it "returns false with unsupported git version" do
34
- mock(@git).run_cmd("git --version").returns("git version 1.7.6")
34
+ mock(@git).run_cmd("git --version").returns(["git version 1.7.6",0])
35
35
  @git.has_git?.should be_false
36
36
  end
37
37
 
38
+ it "returns true with supported git version 2.0.0" do
39
+ mock(@git).run_cmd("git --version").returns(["git version 2.0.0", 0])
40
+ @git.has_git?.should be_true
41
+ end
42
+
43
+ it "returns true with supported git version 1.8.0" do
44
+ mock(@git).run_cmd("git --version").returns(["git version 1.8.0", 0])
45
+ @git.has_git?.should be_true
46
+ end
47
+
38
48
  it "returns false with unsupported git version" do
39
49
  @git.has_git?.should be_true
40
50
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mortar
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 3
10
- version: 0.4.3
9
+ - 4
10
+ version: 0.4.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mortar Data
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-11-27 00:00:00 Z
18
+ date: 2012-11-28 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: mortar-api-ruby