monkey_king 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ff695582cc29fa310eb02dc8bc5d8dc9518c62c
4
- data.tar.gz: 2a2beb9d73d6ca7a9edb9d75ca7f0cc7e06bf5ad
3
+ metadata.gz: ce771d409b5784b567c5c7d28118975f3ce2fb7e
4
+ data.tar.gz: 0f441f92c02d808dd5e187f7a3b7d8102ca72061
5
5
  SHA512:
6
- metadata.gz: 9a104e25f735889136e69d302db996b6fe1fde7dd6df47c56dfb0ce39e89a8e16e37676ecc6c3f75ebc1351c47f0ab326654b582dfb5b47224a27e95c7e8e1e3
7
- data.tar.gz: 849b6f2cda8bd03030fc3180cd39e68873fb2594123295fce400b6bdd362edc6a53dad9f88db4d5fb5d33ece79422a8cf29b85ac3d99b62c61e8e876770d9d69
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(:repo) { ask("Input the github repo of a existing deployment") }
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
- deployment_yaml_files += Dir.glob("#{directory}/deployments/*.yml")
34
- deployment_yaml_files += Dir.glob("#{directory}/bosh-init/*.yml")
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}..."
@@ -1,3 +1,3 @@
1
1
  module MonkeyKing
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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.2
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-23 00:00:00.000000000 Z
11
+ date: 2016-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mothership