monkey_king 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/monkey_king/clone_command.rb +7 -19
- data/lib/monkey_king/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce771d409b5784b567c5c7d28118975f3ce2fb7e
|
4
|
+
data.tar.gz: 0f441f92c02d808dd5e187f7a3b7d8102ca72061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3302ba366490113f4fad46d9f4d9a72d94a93ec4af610d0e37322900c57d74be514087b26a6a074980cece1ce35fd5b300de73d3cf1bba1b8b64e1ef8b64d7a
|
7
|
+
data.tar.gz: 90b24123f43f89a55b50268d0132ba626ecf6db286da4d9b195553c756120cb6916df32aebb84616b8f7248b09dc841e497b1ac56c298c94c19ae1298a791b7a
|
@@ -3,35 +3,23 @@ require 'highline/import'
|
|
3
3
|
|
4
4
|
module MonkeyKing
|
5
5
|
class CloneCommand < Mothership
|
6
|
-
option :help, :desc => "Show command usage", :alias => "-h",
|
7
|
-
:default => false
|
8
|
-
|
9
|
-
desc "Show Help"
|
10
|
-
input :command, :argument => :optional
|
11
|
-
def help
|
12
|
-
if name = input[:command]
|
13
|
-
if cmd = @@commands[name.gsub("-", "_").to_sym]
|
14
|
-
Mothership::Help.command_help(cmd)
|
15
|
-
else
|
16
|
-
unknown_command(name)
|
17
|
-
end
|
18
|
-
else
|
19
|
-
Mothership::Help.basic_help(@@commands, @@global)
|
20
|
-
end
|
21
|
-
end
|
22
6
|
|
23
7
|
desc "Clone the repo and replace secret and env annotation"
|
24
|
-
input
|
8
|
+
input :repo, :argument => true
|
9
|
+
input :dir, :argument => :splat
|
25
10
|
def clone
|
26
11
|
repo = input[:repo]
|
12
|
+
sub_dir = input[:dir]
|
13
|
+
|
27
14
|
directory = repo.split('/').last.split('.').first
|
28
15
|
parser = MonkeyKing::Parser.new
|
29
16
|
|
30
17
|
raise 'Failed to clone' unless system("git clone #{repo} #{directory}")
|
31
18
|
deployment_yaml_files = []
|
32
19
|
|
33
|
-
|
34
|
-
|
20
|
+
sub_dir.each do |d|
|
21
|
+
deployment_yaml_files += Dir.glob("#{directory}/#{d}/*.yml")
|
22
|
+
end
|
35
23
|
|
36
24
|
deployment_yaml_files.each do |file|
|
37
25
|
puts "Transforming #{file}..."
|
data/lib/monkey_king/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: monkey_king
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cloudops_hosted
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mothership
|