3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/ey_enzyme/old_cli.rb', line 3
def self.run(args)
new_args = []
opts = OptionParser.new do |opts|
opts.version = "0.0.1"
opts.banner = "Usage: ey-recipes[-flag] [argument]"
opts.define_head "ey-recipes: running recipes..."
opts.separator '*'*80
opts.on("-c CONFIG", "--config CONFIG", "Use config file") do |config|
end
opts.on("--deploy-main ENV", "Run main recipes") do |env_name|
new_args << "--main"
end
opts.on("-d ENV", "--deploy ENV", "Run custom recipes") do |env_name|
new_args << "--custom"
end
end
opts.parse!(args)
if new_args.any?
CLI.run(new_args)
else
$stderr.puts opts
end
end
|