From 6befcbc2457f6d6eebd836adc08ee34e696588bd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 30 Sep 2009 23:49:53 -0700 Subject: unicorn_rails: undeprecate --path switch ..but keep -P deprecated. --path is still useful for testing ad-hoc changes when you don't want to commit your changes permanently to a configuration file. --- bin/unicorn_rails | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/unicorn_rails b/bin/unicorn_rails index ab9f1c0..5ed054d 100755 --- a/bin/unicorn_rails +++ b/bin/unicorn_rails @@ -78,10 +78,14 @@ opts = OptionParser.new("", 24, ' ') do |opts| options[:config_file] = File.expand_path(f) end - opts.on("-P", "--path PATH", "DEPRECATED") do |v| - warn %q{Use of --path/-P is strongly discouraged} - warn %q{Use the RAILS_RELATIVE_URL_ROOT environment variable} - warn %q{ or the 'map' directive in the rackup config instead} + opts.on("-P PATH", "DEPRECATED") do |v| + warn %q{Use of -P is ambiguous and discouraged} + warn %q{Use --path or RAILS_RELATIVE_URL_ROOT instead} + ENV['RAILS_RELATIVE_URL_ROOT'] = v + end + + opts.on("--path PATH", "Runs Rails app mounted at a specific path.", + "(default: /)") do |v| ENV['RAILS_RELATIVE_URL_ROOT'] = v end -- cgit v1.2.3-24-ge0c7