lib/trinidad/command_line_parser.rb in trinidad-0.9.5 vs lib/trinidad/command_line_parser.rb in trinidad-0.9.6

- old
+ new

@@ -40,10 +40,15 @@ def options_parser @parser ||= OptionParser.new do |opts| opts.banner = 'Trinidad server default options:' opts.separator '' + 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| default_options[:environment] = v end @@ -105,10 +110,10 @@ default_options[:jruby_min_runtimes] = 1 default_options[:jruby_max_runtimes] = 1 end opts.on('-v', '--version', 'display the current version') do - puts File.read(File.join(File.dirname(__FILE__), '..', '..', 'VERSION')).chomp + puts "trinidad #{Trinidad::VERSION} (tomcat #{Trinidad::TOMCAT_VERSION})" 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)