stash-clone-tool 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/stash-clone-tool +6 -2
- data/lib/stash_clone_tool/stash_cloner.rb +2 -1
- data/lib/stash_clone_tool/version.rb +1 -1
- data/stash-clone-tool.gemspec +4 -4
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ebc88ad19870702aa2a90ad2644f6d2eeee3a12
|
4
|
+
data.tar.gz: 9fe7de3380c8067c1a9f96645363c80e91fad836
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 743aaaa6a73c9ebe532f20fbea2a184fdf3d6ecb79f3ff9a53aceca89e3f642489aba9cd62db630e8f037805051c8172b8fd622d95a8abca794ef8e3524e7365
|
7
|
+
data.tar.gz: 4251cc618255a1f832a52a5cbb5e7c8f60fad77628eb079d33ff0d0da294c5099dc690a964ccb351a2d5451fb6825f4b12206c41ff6aefe509b54e3f7ced082d
|
data/bin/stash-clone-tool
CHANGED
@@ -6,6 +6,7 @@ require 'optparse'
|
|
6
6
|
require 'highline/import'
|
7
7
|
options = {directory: '.'}
|
8
8
|
clone_options = {}
|
9
|
+
exclude = []
|
9
10
|
cli = OptionParser.new do |opts|
|
10
11
|
opts.banner = 'Usage: stash-clone-tool [options]'
|
11
12
|
opts.on('-s', '--stash URL', 'Stash Server URL (required)') do |stash_url|
|
@@ -23,6 +24,9 @@ cli = OptionParser.new do |opts|
|
|
23
24
|
opts.on('--depth DEPTH', 'Clone depth (assumes single branch unless --no-single-branch).') do |depth|
|
24
25
|
clone_options[:depth] = depth
|
25
26
|
end
|
27
|
+
opts.on("--exclude AN,PS,JU", Array, "Project keys to exclude") do |list|
|
28
|
+
list.each { |key| exclude << key }
|
29
|
+
end
|
26
30
|
end.parse!
|
27
31
|
|
28
32
|
fail 'Must specify Stash server URL (-s).' if options[:stash_url].nil?
|
@@ -34,10 +38,10 @@ options[:password] ||= ask('Password: ') { |q| q.echo = '*' }
|
|
34
38
|
@last_project = nil
|
35
39
|
cloner = StashCloneTool::StashCloner.new(options[:stash_url], options[:username], options[:password], options[:directory])
|
36
40
|
|
37
|
-
cloner.clone_stash(clone_options) do |on|
|
41
|
+
cloner.clone_stash(clone_options, exclude) do |on|
|
38
42
|
on.initialize_repository do |repository, folder|
|
39
43
|
if @last_project != repository.project
|
40
|
-
puts " - #{repository.project.name}...".light_yellow
|
44
|
+
puts " - #{repository.project.name} (#{repository.project.name}...".light_yellow
|
41
45
|
@last_project = repository.project
|
42
46
|
end
|
43
47
|
puts " - #{repository.name}...".light_yellow
|
@@ -15,10 +15,11 @@ module StashCloneTool
|
|
15
15
|
@directory = directory
|
16
16
|
end
|
17
17
|
|
18
|
-
def clone_stash(clone_options)
|
18
|
+
def clone_stash(clone_options, exclude = [])
|
19
19
|
wrapper = Multiblock.wrapper
|
20
20
|
yield(wrapper)
|
21
21
|
@stash.projects.each do |project|
|
22
|
+
next if exclude.include?(project.key)
|
22
23
|
project.repositories.each do |repository|
|
23
24
|
folder = File.join(@directory, project.key, repository.slug)
|
24
25
|
wrapper.call(:initialize_repository, repository, folder)
|
data/stash-clone-tool.gemspec
CHANGED
@@ -28,8 +28,8 @@ Gem::Specification.new do |spec|
|
|
28
28
|
|
29
29
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
30
30
|
spec.add_development_dependency 'rake', '~> 10.0'
|
31
|
-
spec.
|
32
|
-
spec.
|
33
|
-
spec.
|
34
|
-
spec.
|
31
|
+
spec.add_runtime_dependency 'colorize', '~> 0.7.7'
|
32
|
+
spec.add_runtime_dependency 'highline', '~> 1.7', '>= 1.7.3'
|
33
|
+
spec.add_runtime_dependency 'git', '~> 1.2', '>= 1.2.9.1'
|
34
|
+
spec.add_runtime_dependency 'multiblock', '~> 0.2.1'
|
35
35
|
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.
|
4
|
+
version: 1.0.5
|
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: 2016-
|
13
|
+
date: 2016-05-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -59,6 +59,9 @@ dependencies:
|
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '1.7'
|
64
|
+
- - ">="
|
62
65
|
- !ruby/object:Gem::Version
|
63
66
|
version: 1.7.3
|
64
67
|
type: :runtime
|
@@ -66,6 +69,9 @@ dependencies:
|
|
66
69
|
version_requirements: !ruby/object:Gem::Requirement
|
67
70
|
requirements:
|
68
71
|
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '1.7'
|
74
|
+
- - ">="
|
69
75
|
- !ruby/object:Gem::Version
|
70
76
|
version: 1.7.3
|
71
77
|
- !ruby/object:Gem::Dependency
|
@@ -73,6 +79,9 @@ dependencies:
|
|
73
79
|
requirement: !ruby/object:Gem::Requirement
|
74
80
|
requirements:
|
75
81
|
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '1.2'
|
84
|
+
- - ">="
|
76
85
|
- !ruby/object:Gem::Version
|
77
86
|
version: 1.2.9.1
|
78
87
|
type: :runtime
|
@@ -80,6 +89,9 @@ dependencies:
|
|
80
89
|
version_requirements: !ruby/object:Gem::Requirement
|
81
90
|
requirements:
|
82
91
|
- - "~>"
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '1.2'
|
94
|
+
- - ">="
|
83
95
|
- !ruby/object:Gem::Version
|
84
96
|
version: 1.2.9.1
|
85
97
|
- !ruby/object:Gem::Dependency
|