lib/cli/runner.rb in af-0.3.16.5 vs lib/cli/runner.rb in af-0.3.18.1
- old
+ new
@@ -96,10 +96,13 @@
opts.on('--noframework') { @options[:noframework] = true }
opts.on('--canary') { @options[:canary] = true }
# Proxying for another user, requires admin privileges
opts.on('-u PROXY') { |proxy| @options[:proxy] = proxy }
+
+ # Select infrastructure
+ opts.on('--infra INFRA') { |infra| @options[:infra] = infra }
opts.on_tail('--options') { puts "#{opts}\n"; exit }
end
instances_delta_arg = check_instances_delta!
@args = opts_parser.parse!(@args)
@@ -299,11 +302,11 @@
when 'crashlogs'
usage('af crashlogs <appname>')
set_cmd(:apps, :crashlogs, 1)
when 'push'
- usage('af push [appname] [--path PATH] [--url URL] [--instances N] [--mem] [--runtime RUNTIME] [--no-start]')
+ usage('af push [appname] [--path PATH] [--url URL] [--instances N] [--mem] [--runtime RUNTIME] [--no-start] [--infra infraname]')
if @args.size == 1
set_cmd(:apps, :push, 1)
else
set_cmd(:apps, :push, 0)
end
@@ -331,11 +334,11 @@
when 'env-del'
usage('af env-del <appname> <variable>')
set_cmd(:apps, :environment_del, 2)
when 'create-service', 'create_service'
- usage('af create-service [service] [servicename] [appname] [--name servicename] [--bind appname]')
+ usage('af create-service [service] [servicename] [appname] [--name servicename] [--bind appname] [--infra infraname]')
set_cmd(:services, :create_service) if @args.size == 0
set_cmd(:services, :create_service, 1) if @args.size == 1
set_cmd(:services, :create_service, 2) if @args.size == 2
set_cmd(:services, :create_service, 3) if @args.size == 3
@@ -454,9 +457,10 @@
VMC::Cli::Config.colorize = @options.delete(:colorize)
VMC::Cli::Config.nozip = @options.delete(:nozip)
VMC::Cli::Config.trace = @options.delete(:trace)
VMC::Cli::Config.output ||= STDOUT unless @options[:quiet]
+ VMC::Cli::Config.infra = @options[:infra]
process_aliases!
parse_command!
if @namespace && @action