7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/nuke/client/cli.rb', line 7
def self.run args
OptionParser.new do |parser|
parser.banner = <<-Banner.gsub(/^\s+\|/,'')
|Usage:
| nuker push <url>/projects/<project-name> <features-dir>
| nuker destroy <url>/projects/<project-name>
Banner
end.parse(args)
command, url, *features = ARGV
case command
when "push" then Command.new(url).push Parser.parse(features)
when "destroy" then Command.new(url).destroy
else
abort "Please use --help for a listing of valid options"
end
rescue Nuke::FeatureParseException
puts "Couldn't parse features."
end
|