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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a48cd5adc2e2ee1dc11a581760a775d1955fdf21
4
- data.tar.gz: c3214e917c9883b0bedf335a74e2b1f66e925bdd
3
+ metadata.gz: 8ba20882ed0c72497ad65e88ca2afe9003c46a60
4
+ data.tar.gz: 3c27b790c0862c894a95f9707ab522fa3988be80
5
5
  SHA512:
6
- metadata.gz: a301664e5e94aee837e217ac7a94e6a2d131a0fa5b7580c26cebbc445d34dc044afd4acea8590046e486c70419a3d13bfa4ca27d1a83649717e9e75a1385074c
7
- data.tar.gz: d00316f0b90ea0a7ad40792ac98995a72f6ac027ac6d9b559f083daea294879e9e3c3a1e66e48b827cab5cbb357946e5566134374c36f56819df50d0a4e962fc
6
+ metadata.gz: eeea40bdf321061becc49103e829436c9c31ab77be419a7ae0a56bd9ffdb66d4142465ed376a35a672353a6219b1f6dbb26a999780b2f4b6e7d4d43430e850f3
7
+ data.tar.gz: 57ee29abf9be33e9ae6e1b1d7af1f24ac40bf927323e2e23505de79f28116fdcd1da6a71a72bd29c06c29506db06a10aa23ca37d3fb509fc846fb2968aa4be42
@@ -1,7 +1,7 @@
1
1
  module Evrone
2
2
  module CI
3
3
  module Common
4
- VERSION = "0.2.0.pre1"
4
+ VERSION = "0.2.0.pre3"
5
5
  end
6
6
  end
7
7
  end
@@ -34,7 +34,9 @@ module Evrone
34
34
  end
35
35
 
36
36
  def make_fetch_command
37
- %{ (test -d #{path} || git clone -q #{src} #{path}) && cd #{path} && git checkout -qf #{sha} }.strip
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
@@ -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) {|o| puts o }
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 eq "(test -d #{path} || git clone -q #{src} #{path}) && cd #{path} && git checkout -qf #{sha}" }
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) {|o| puts o }
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.pre1
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-03 00:00:00.000000000 Z
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