evrone-ci-common 0.2.0.pre5 → 0.2.0.pre6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4bf4a415c501a8ed67dfe244d27461497184022e
4
- data.tar.gz: 043c7c33e4bac0a495bb96d7e5bf3b9d7c08d6a0
3
+ metadata.gz: d448d8e0e53f9547a1a94e5b1dd1adc6b00f1a04
4
+ data.tar.gz: 5db1bccc35883d77e019b6ca6f2996c88382339d
5
5
  SHA512:
6
- metadata.gz: 788eefddbf3408645b46d6af40bc01352e56d1bc0b9df95700d225cdfb43f603ce192a4cba0f03fdede1b40018b40cf49ecc336b6c0c3b1e222a97d1e742dd2f
7
- data.tar.gz: fdbabe1369b1cffc7e790d636b69a02e41b551c055bf4e6d9f407f48191ecf3f3a43341fbe157d1619cc21116b91d314b77d4298e8fba2caba2b25426bfca755
6
+ metadata.gz: d0578171d5a060b6cecc9a44dad6670a36365bc407a7467fe5f421000a089cfcd2191c8b8fa50fa36d8e24fc065a782973cddc35eaf1e3438d4c2d4278c15af7
7
+ data.tar.gz: 11acadc664a7dff01db36111650d58ab3c9e48623e2294a871bf6e55d9acba93e18d3c04a495ff3eef4e58c67898487de6ec38778f53a96b5e957d76f092cd06
@@ -1,7 +1,7 @@
1
1
  module Evrone
2
2
  module CI
3
3
  module Common
4
- VERSION = "0.2.0.pre5"
4
+ VERSION = "0.2.0.pre6"
5
5
  end
6
6
  end
7
7
  end
@@ -38,8 +38,10 @@ module Evrone
38
38
  %{ (cd '#{from}' && git checkout-index -a -f --prefix='#{to}/') }.strip
39
39
  end
40
40
 
41
- def make_fetch_command
42
- clone_cmd = "git clone -q #{src} #{path}"
41
+ def make_fetch_command(options = {})
42
+ depth = options.key?(:depth) ? options[:depth] : 50
43
+ clone_branch = " --branch=#{branch}" if branch
44
+ clone_cmd = "git clone -q --depth=#{depth}#{clone_branch} #{src} #{path}"
43
45
  checkout_cmd = "git checkout -qf #{sha}"
44
46
  fetch_cmd = "git fetch -q origin"
45
47
  cmd = %{
@@ -57,7 +57,7 @@ describe Evrone::CI::SCM::Git do
57
57
 
58
58
  it "should capture output" do
59
59
  subject
60
- expect(output).to match(Regexp.escape "$ git clone -q #{src} #{path}")
60
+ expect(output).to match(Regexp.escape "$ git clone -q --depth=50 #{src} #{path}")
61
61
  end
62
62
 
63
63
  context "twice" do
@@ -78,7 +78,7 @@ describe Evrone::CI::SCM::Git do
78
78
  context "make_fetch_command" do
79
79
  include Evrone::Common::Spawn
80
80
 
81
- let(:options) { { deploy_key: deploy_key } }
81
+ let(:options) { { deploy_key: deploy_key, branch: "master" } }
82
82
  let(:run) do
83
83
  git.open do
84
84
  spawn(git_ssh_env, git.make_fetch_command, &method(:add_to_output))
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.pre5
4
+ version: 0.2.0.pre6
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-07 00:00:00.000000000 Z
11
+ date: 2013-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evrone-common-spawn