Ticket #10674: add_prefix_option_to_script_server_for_mongrel.patch
| File add_prefix_option_to_script_server_for_mongrel.patch, 1.3 kB (added by Lytol, 8 months ago) |
|---|
-
railties/lib/commands/servers/mongrel.rb
old new 13 13 :ip => "0.0.0.0", 14 14 :environment => (ENV['RAILS_ENV'] || "development").dup, 15 15 :detach => false, 16 :debugger => false 16 :debugger => false, 17 :prefix => nil 17 18 } 18 19 19 20 ARGV.clone.options do |opts| 20 21 opts.on("-p", "--port=port", Integer, "Runs Rails on the specified port.", "Default: 3000") { |v| OPTIONS[:port] = v } 21 22 opts.on("-b", "--binding=ip", String, "Binds Rails to the specified ip.", "Default: 0.0.0.0") { |v| OPTIONS[:ip] = v } 23 opts.on("-P", "--prefix=path", String, "Runs Rails app with a URL prefix (path).", "Default: none") { |v| OPTIONS[:prefix] = v } 22 24 opts.on("-d", "--daemon", "Make server run as a Daemon.") { OPTIONS[:detach] = true } 23 25 opts.on("-u", "--debugger", "Enable ruby-debugging for the server.") { OPTIONS[:debugger] = true } 24 26 opts.on("-e", "--environment=name", String, … … 41 43 "-e", OPTIONS[:environment], 42 44 "-P", "#{RAILS_ROOT}/tmp/pids/mongrel.pid" 43 45 ] 46 parameters << "--prefix=#{OPTIONS[:prefix]}" unless OPTIONS[:prefix].blank? 44 47 45 48 if OPTIONS[:detach] 46 49 `mongrel_rails #{parameters.join(" ")} -d`