stash-clone-tool 1.0.3 → 1.0.4

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: ca5f928d9f20a397bd92e0592ea5475536216d19
4
- data.tar.gz: b1fef42c7954760eebd688f863d6f94dafc76895
3
+ metadata.gz: 5bc0c2e451d5b95515b8fabb49a9b5434b74272f
4
+ data.tar.gz: d11214d327c15303273c511fddef2dd962f71c24
5
5
  SHA512:
6
- metadata.gz: d72823d4a24b247445ff55135dbf338b0fdce27b14dc2cde0e81fa24be04f94b6b06a452bb6bcd4485bb404bb167074562a50947c06dac11eecf4056cf63ca77
7
- data.tar.gz: c8c54d87d115b70d5c494e1dcd228d88c5fb76e2185ca0fbe4bfc621c3c13664873da5168aa758ea1ca881704fbde31282fe7526751a0b6366f263c21fbb85c8
6
+ metadata.gz: 40697ffa50eff766402177e4899b94ad1ebe67ed16e433c905c1bd2700ef531c144be4ce0728c25ffb1171a53ab0a41b21dcfe456f5c119dfd0d50a5c9ac8f15
7
+ data.tar.gz: 88f9e018d26ec1c8528165025ce1f652883dc13aeac75767c3a32b91f30c93cf71bec8c1b50212f12c08a081005ab01f6aa5f9c248a882ec4395e534068c0fdb
data/bin/stash-clone-tool CHANGED
@@ -5,6 +5,7 @@ require 'stash_clone_tool/stash_cloner'
5
5
  require 'optparse'
6
6
  require 'highline/import'
7
7
  options = {directory: '.'}
8
+ clone_options = {}
8
9
  cli = OptionParser.new do |opts|
9
10
  opts.banner = 'Usage: stash-clone-tool [options]'
10
11
  opts.on('-s', '--stash URL', 'Stash Server URL (required)') do |stash_url|
@@ -19,6 +20,9 @@ cli = OptionParser.new do |opts|
19
20
  opts.on('-d', '--directory DIRECTORY_PATH', 'Path to clone stash projects into (default: working directory).') do |directory|
20
21
  options[:directory] = directory
21
22
  end
23
+ opts.on('--depth DEPTH', 'Clone depth (assumes single branch unless --no-single-branch).') do |depth|
24
+ clone_options[:depth] = depth
25
+ end
22
26
  end.parse!
23
27
 
24
28
  fail 'Must specify Stash server URL (-s).' if options[:stash_url].nil?
@@ -30,7 +34,7 @@ options[:password] ||= ask('Password: ') { |q| q.echo = '*' }
30
34
  @last_project = nil
31
35
  cloner = StashCloneTool::StashCloner.new(options[:stash_url], options[:username], options[:password], options[:directory])
32
36
 
33
- cloner.clone_stash do |on|
37
+ cloner.clone_stash(clone_options) do |on|
34
38
  on.initialize_repository do |repository, folder|
35
39
  if @last_project != repository.project
36
40
  puts " - #{repository.project.name}...".light_yellow
@@ -15,7 +15,7 @@ module StashCloneTool
15
15
  @directory = directory
16
16
  end
17
17
 
18
- def clone_stash
18
+ def clone_stash(clone_options)
19
19
  wrapper = Multiblock.wrapper
20
20
  yield(wrapper)
21
21
  @stash.projects.each do |project|
@@ -26,7 +26,7 @@ module StashCloneTool
26
26
  if Dir.exists?(folder)
27
27
  wrapper.call(:failure, repository, 'Target already exists')
28
28
  else
29
- Git.clone(clone_link, folder)
29
+ Git.clone(clone_link, folder, clone_options)
30
30
  wrapper.call(:success, repository)
31
31
  end
32
32
  end
@@ -1,4 +1,4 @@
1
1
  # Version
2
2
  module StashCloneTool
3
- VERSION = '1.0.3'
3
+ VERSION = '1.0.4'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stash-clone-tool
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Ridgway
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-08-16 00:00:00.000000000 Z
13
+ date: 2016-04-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler