class Nuke::Client::CLI
Public Class Methods
run(args)
click to toggle source
# 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