lib/trinidad/command_line_parser.rb in trinidad-0.9.10 vs lib/trinidad/command_line_parser.rb in trinidad-0.9.11
- old
+ new
@@ -45,32 +45,32 @@
opts.on('-d', '--dir WEB_APP_DIRECTORY', 'Web app directory path',
"default: #{Dir.pwd}") do |v|
default_options[:web_app_dir] = v
end
- opts.on('-e', '--env ENVIRONMENT', 'Rails environment',
- "default: #{default_options[:environment]}") do |v|
+ opts.on('-e', '--env ENVIRONMENT', 'Rails environment',
+ "default: #{default_options[:environment]}") do |v|
default_options[:environment] = v
end
- opts.on('-p', '--port PORT', 'Port to bind to',
- "default: #{default_options[:port]}") do |v|
+ opts.on('-p', '--port PORT', 'Port to bind to',
+ "default: #{default_options[:port]}") do |v|
default_options[:port] = v
end
- opts.on('-c', '--context CONTEXT_PATH', 'The application context path',
- "default: #{default_options[:context_path]}") do |v|
+ opts.on('-c', '--context CONTEXT_PATH', 'The application context path',
+ "default: #{default_options[:context_path]}") do |v|
default_options[:context_path] = v
end
- opts.on('--lib', '--jars LIBS_DIR', 'Directory containing jars used by the application',
- "default: #{default_options[:libs_dir]}") do |v|
+ opts.on('--lib', '--jars LIBS_DIR', 'Directory containing jars used by the application',
+ "default: #{default_options[:libs_dir]}") do |v|
default_options[:libs_dir] = v
end
- opts.on('--classes', '--classes CLASSES_DIR', 'Directory containing classes used by the application',
- "default: #{default_options[:classes_dir]}") do |v|
+ opts.on('--classes', '--classes CLASSES_DIR', 'Directory containing classes used by the application',
+ "default: #{default_options[:classes_dir]}") do |v|
default_options[:classes_dir] = v
end
opts.on('-s', '--ssl [SSL_PORT]', 'Enable secure socket layout',
"default port: #{default_options[:ssl_port]}") do |v|
@@ -79,11 +79,11 @@
end
opts.on('-a', '--ajp [AJP_PORT]', 'Enable ajp connections',
"default port: #{default_options[:ajp_port]}") do |v|
ajp_port = v.nil? ? default_options.delete(:ajp_port) : v.to_i
- default_options[:ajp] = {:port => ajp_port}
+ default_options[:ajp] = {:port => ajp_port}
end
opts.on('-f', '--config [CONFIG_FILE]', 'Configuration file',
"default: #{default_options[:config]}") do |file|
default_options[:config] = 'config/trinidad.yml'
@@ -124,9 +124,13 @@
exit
end
opts.on('-l', '--load EXTENSION_NAME', 'load options for a given extension') do |name|
Trinidad::Extensions.configure_options_extensions({name => {}}, opts, default_options)
+ end
+
+ opts.on('--apps', '--apps APPS_BASE_DIR', 'applications base directory') do |path|
+ default_options[:apps_base] = path
end
opts.on('-h', '--help', 'display the help') do
puts opts
exit