evrone-ci-common 0.2.0.pre1 → 0.2.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/evrone/ci/common/version.rb +1 -1
- data/lib/evrone/ci/scm/git.rb +3 -1
- data/spec/lib/scm/git_spec.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ba20882ed0c72497ad65e88ca2afe9003c46a60
|
4
|
+
data.tar.gz: 3c27b790c0862c894a95f9707ab522fa3988be80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eeea40bdf321061becc49103e829436c9c31ab77be419a7ae0a56bd9ffdb66d4142465ed376a35a672353a6219b1f6dbb26a999780b2f4b6e7d4d43430e850f3
|
7
|
+
data.tar.gz: 57ee29abf9be33e9ae6e1b1d7af1f24ac40bf927323e2e23505de79f28116fdcd1da6a71a72bd29c06c29506db06a10aa23ca37d3fb509fc846fb2968aa4be42
|
data/lib/evrone/ci/scm/git.rb
CHANGED
@@ -34,7 +34,9 @@ module Evrone
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def make_fetch_command
|
37
|
-
|
37
|
+
clone_cmd = "git clone -q #{src} #{path}"
|
38
|
+
checkout_cmd = "git checkout -qf #{sha}"
|
39
|
+
%{ (test -d #{path} || ( echo $ #{clone_cmd} && #{clone_cmd} ) ) && cd #{path} && echo $ #{checkout_cmd} && #{checkout_cmd} }.strip
|
38
40
|
end
|
39
41
|
|
40
42
|
def commit_info
|
data/spec/lib/scm/git_spec.rb
CHANGED
@@ -60,10 +60,11 @@ describe Evrone::CI::SCM::Git do
|
|
60
60
|
|
61
61
|
context "make_fetch_command" do
|
62
62
|
include Evrone::Common::Spawn
|
63
|
+
|
63
64
|
let(:env) { {'GIT_SSH' => git.git_ssh.location.path} }
|
64
65
|
let(:run) do
|
65
66
|
git.git_ssh.open do
|
66
|
-
spawn(env, git.make_fetch_command)
|
67
|
+
spawn(env, git.make_fetch_command, &method(:add_to_output))
|
67
68
|
end
|
68
69
|
end
|
69
70
|
subject { git.make_fetch_command }
|
@@ -72,7 +73,7 @@ describe Evrone::CI::SCM::Git do
|
|
72
73
|
run
|
73
74
|
end
|
74
75
|
|
75
|
-
it { should
|
76
|
+
it { should be }
|
76
77
|
|
77
78
|
it "should be success" do
|
78
79
|
expect(run).to eq 0
|
@@ -89,7 +90,7 @@ describe Evrone::CI::SCM::Git do
|
|
89
90
|
context "twice" do
|
90
91
|
it "should be" do
|
91
92
|
code = git.git_ssh.open do
|
92
|
-
spawn(env, git.make_fetch_command)
|
93
|
+
spawn(env, git.make_fetch_command, &method(:add_to_output))
|
93
94
|
end
|
94
95
|
expect(code).to eq 0
|
95
96
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evrone-ci-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.
|
4
|
+
version: 0.2.0.pre3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Galinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evrone-common-spawn
|