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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5bc0c2e451d5b95515b8fabb49a9b5434b74272f
4
- data.tar.gz: d11214d327c15303273c511fddef2dd962f71c24
3
+ metadata.gz: 0ebc88ad19870702aa2a90ad2644f6d2eeee3a12
4
+ data.tar.gz: 9fe7de3380c8067c1a9f96645363c80e91fad836
5
5
  SHA512:
6
- metadata.gz: 40697ffa50eff766402177e4899b94ad1ebe67ed16e433c905c1bd2700ef531c144be4ce0728c25ffb1171a53ab0a41b21dcfe456f5c119dfd0d50a5c9ac8f15
7
- data.tar.gz: 88f9e018d26ec1c8528165025ce1f652883dc13aeac75767c3a32b91f30c93cf71bec8c1b50212f12c08a081005ab01f6aa5f9c248a882ec4395e534068c0fdb
6
+ metadata.gz: 743aaaa6a73c9ebe532f20fbea2a184fdf3d6ecb79f3ff9a53aceca89e3f642489aba9cd62db630e8f037805051c8172b8fd622d95a8abca794ef8e3524e7365
7
+ data.tar.gz: 4251cc618255a1f832a52a5cbb5e7c8f60fad77628eb079d33ff0d0da294c5099dc690a964ccb351a2d5451fb6825f4b12206c41ff6aefe509b54e3f7ced082d
@@ -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)
@@ -1,4 +1,4 @@
1
1
  # Version
2
2
  module StashCloneTool
3
- VERSION = '1.0.4'
3
+ VERSION = '1.0.5'
4
4
  end
@@ -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.add_dependency 'colorize', '~> 0.7.7'
32
- spec.add_dependency 'highline', '~> 1.7.3'
33
- spec.add_dependency 'git', '~> 1.2.9.1'
34
- spec.add_dependency 'multiblock', '~> 0.2.1'
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
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-04-30 00:00:00.000000000 Z
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