gitlab_clone 0.13.1 → 0.14.0
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 +4 -4
- data/bin/gitlab-clone +71 -62
- data/gitlab_clone.gemspec +2 -2
- data/lib/version +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 116f77beb52daa9eae0d5aabb67016b60a15ad2d5809395dc23899fd8498a2f3
|
4
|
+
data.tar.gz: 79a2f4d3a6a765e6dde8a227f6e8b735b2a034db279c18cd0950826c84e791a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e671acdc03eeb53640b3052ba9a11247282953ade79a812bc8112edbe020b86232b3eeeb4e08151e235721f37f11281034bb7e2b4b5da2631ab5d03e1df920ce
|
7
|
+
data.tar.gz: 3bc0521bd4caf4f2f88db604bec3a0f012c0ac5150d93c31f60edb58ae233fd8536ef26e01d3b5d6f3b8feae33f7c47752da038aba5d72c97c38f22aab562bf9
|
data/bin/gitlab-clone
CHANGED
@@ -12,76 +12,85 @@ require "slop"
|
|
12
12
|
require "httparty"
|
13
13
|
require "rainbow"
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
if ARGV[0].nil?
|
29
|
-
Gitlab.printhelp
|
30
|
-
end
|
15
|
+
class GitlabClone
|
16
|
+
def self.dothething
|
17
|
+
opts = Slop.parse do |o|
|
18
|
+
o.bool '-h', '--help', 'help'
|
19
|
+
o.bool '-c', '--clone', 'clone'
|
20
|
+
o.bool '-w', '--web', 'web'
|
21
|
+
o.bool '-l', '--list', 'list'
|
22
|
+
o.bool '-v', '--version', 'version'
|
23
|
+
o.string '-g', '--group', 'group'
|
24
|
+
o.bool '-o', '--github', 'github'
|
25
|
+
o.bool '-n', '--config', 'print config'
|
26
|
+
o.bool '-r', '--reconfigure', 'reconfigure gitlab server and token settings'
|
27
|
+
end
|
31
28
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
Setup.github_configure
|
37
|
-
end
|
38
|
-
exit
|
39
|
-
end
|
29
|
+
# If no arugments are passed, or none of approved ones, give help information
|
30
|
+
if ARGV[0].nil?
|
31
|
+
Gitlab.printhelp
|
32
|
+
end
|
40
33
|
|
34
|
+
if opts[:github] && !Setup.github_precheck
|
35
|
+
puts Rainbow("Whoops looks like you have not set your Github token yet. Would you like to do so now?").yellow
|
36
|
+
answer = STDIN.gets.chomp.downcase
|
37
|
+
if answer == "y" or answer == "yes"
|
38
|
+
Setup.github_configure
|
39
|
+
end
|
40
|
+
exit;
|
41
|
+
end
|
41
42
|
|
42
|
-
opts
|
43
|
+
if opts[:clone] && opts[:web]
|
44
|
+
puts Rainbow("\n\t############################################").red
|
45
|
+
puts Rainbow("\t You can't web clone and ssh clone").red
|
46
|
+
puts Rainbow("\t gitlab-clone -h for more information").red
|
47
|
+
puts Rainbow("\t############################################\n").red
|
48
|
+
else
|
43
49
|
|
44
|
-
if opts[:
|
45
|
-
|
46
|
-
|
47
|
-
puts Rainbow("\t gitlab-clone -h for more information").red
|
48
|
-
puts Rainbow("\t############################################\n").red
|
49
|
-
else
|
50
|
+
if opts[:github] && !opts[:group]
|
51
|
+
puts Rainbow("Github option requiers you to enter a organizational name.\n\n").red
|
52
|
+
end
|
50
53
|
|
51
|
-
if opts[:
|
52
|
-
|
53
|
-
|
54
|
+
if opts[:group]
|
55
|
+
clone_group = opts[:group]
|
56
|
+
elsif opts[:list] || opts[:github] || opts[:web] || opts[:clone]
|
57
|
+
puts Rainbow("\nNo organizational or group name was given. Using default of \"Cookbooks\"\n\n").purple.italic
|
58
|
+
clone_group = "Cookbooks"
|
59
|
+
end
|
54
60
|
|
55
|
-
if opts[:
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
end
|
61
|
+
if opts[:github]
|
62
|
+
class_to_use = Github
|
63
|
+
else
|
64
|
+
class_to_use = Gitlab
|
65
|
+
end
|
61
66
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
67
|
+
begin
|
68
|
+
if opts[:help]
|
69
|
+
Gitlab.printhelp
|
70
|
+
elsif opts[:reconfigure]
|
71
|
+
Setup.configure
|
72
|
+
elsif opts[:clone]
|
73
|
+
class_to_use.clone(0, clone_group)
|
74
|
+
elsif opts[:web]
|
75
|
+
class_to_use.clone(1, clone_group)
|
76
|
+
elsif opts[:version]
|
77
|
+
Version::version
|
78
|
+
elsif opts[:config]
|
79
|
+
Gitlab.config
|
80
|
+
elsif opts[:list]
|
81
|
+
class_to_use.list_repos(clone_group)
|
82
|
+
end
|
83
|
+
rescue
|
84
|
+
puts Rainbow("Looks like there was an issue. Please verify host and api version with \"#{File.basename($0)} -n\" to show configuration.").red.italic
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
66
88
|
end
|
67
89
|
|
68
90
|
begin
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
class_to_use.clone(0, clone_group)
|
75
|
-
elsif opts[:w]
|
76
|
-
class_to_use.clone(1, clone_group)
|
77
|
-
elsif opts[:v]
|
78
|
-
Version::version
|
79
|
-
elsif opts[:n]
|
80
|
-
Gitlab.config
|
81
|
-
elsif opts[:l]
|
82
|
-
class_to_use.list_repos(clone_group)
|
83
|
-
end
|
84
|
-
rescue
|
85
|
-
puts Rainbow("Looks like there was an issue. Please verify host and api version with \"#{File.basename($0)} -n\" to show configuration.").red.italic
|
86
|
-
end
|
91
|
+
GitlabClone.dothething
|
92
|
+
rescue Interrupt
|
93
|
+
puts Rainbow("\n\nStopping...").yellow.bright
|
94
|
+
rescue
|
95
|
+
puts Rainbow("\nUnknown options. Wanna try that again?").red.bright
|
87
96
|
end
|
data/gitlab_clone.gemspec
CHANGED
@@ -5,7 +5,7 @@ require 'version'
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'gitlab_clone'
|
7
7
|
s.version = Version::current
|
8
|
-
s.date = '2019-01-
|
8
|
+
s.date = '2019-01-30'
|
9
9
|
s.summary = "Pulls down the latest repos from a group in gitlab or a organization group in Github."
|
10
10
|
s.description = "Clones All Repos In A Gitlab Group Or Github Org."
|
11
11
|
s.authors = ["Nestor N. Camacho III"]
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = `git ls-files`.split($/)
|
14
14
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
15
15
|
s.add_dependency("git", "~> 1.2.6")
|
16
|
-
s.add_dependency("slop", "
|
16
|
+
s.add_dependency("slop", ">= 4.0.0")
|
17
17
|
s.add_dependency("httparty", "~> 0.13.1")
|
18
18
|
s.add_dependency("rainbow", "~> 3.0.0")
|
19
19
|
s.homepage = 'https://github.com/ncamacho/gitlab_clone'
|
data/lib/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.14.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab_clone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nestor N. Camacho III
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: slop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 4.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 4.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: httparty
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|