bin/contexto in contexto-0.1.1 vs bin/contexto in contexto-0.2.0
- old
+ new
@@ -9,23 +9,23 @@
require 'English'
$stderr.sync = true
options = {}
-options[:cluster] = 'sandbox'
-options[:ssh] = false
+options[:console] = false
optparse = OptionParser.new do |opts|
opts.banner = 'Usage: contexto [options]'
opts.on('-c', '--cluster CLUSTER', 'Cluster') { |v| options[:cluster] = v }
opts.on('-s', '--service SERVICE', 'Service') { |v| options[:service] = v }
opts.on('-t', '--container CONTAINER', 'Container') { |v| options[:container] = v }
- opts.on('-b', '--ssh') { options[:ssh] = true }
+ opts.on('-r', '--rake COMMAND', 'Rake command') { |v| options[:rake] = v }
+ opts.on('-b', '--console') { options[:console] = true }
end
begin
optparse.parse!
- mandatory = [:cluster]
+ mandatory = []
missing = mandatory.select { |param| options[param].nil? }
unless missing.empty?
raise OptionParser::MissingArgument.new(missing.join(', '))
end
rescue OptionParser::InvalidOption, OptionParser::MissingArgument