提交 f337ebc3 编写于 作者: P Prem Sichanugrist 提交者: José Valim

Add default values to output of 'rails server -h', hardcoded as Rack::Server...

Add default values to output of 'rails server -h', hardcoded as Rack::Server did since options doesn't have any data at the time of parsing arguments [#3910 status:resolved]
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
上级 af22c5b1
......@@ -11,16 +11,16 @@ def parse!(args)
opt_parser = OptionParser.new do |opts|
opts.banner = "Usage: rails server [options]"
opts.on("-p", "--port=port", Integer,
"Runs Rails on the specified port.", "Default: #{options[:Port]}") { |v| options[:Port] = v }
"Runs Rails on the specified port.", "Default: 3000") { |v| options[:Port] = v }
opts.on("-b", "--binding=ip", String,
"Binds Rails to the specified ip.", "Default: #{options[:Host]}") { |v| options[:Host] = v }
"Binds Rails to the specified ip.", "Default: 0.0.0.0") { |v| options[:Host] = v }
opts.on("-c", "--config=file", String,
"Use custom rackup configuration file") { |v| options[:config] = v }
opts.on("-d", "--daemon", "Make server run as a Daemon.") { options[:daemonize] = true }
opts.on("-u", "--debugger", "Enable ruby-debugging for the server.") { options[:debugger] = true }
opts.on("-e", "--environment=name", String,
"Specifies the environment to run this server under (test/development/production).",
"Default: #{options[:environment]}") { |v| options[:environment] = v }
"Default: development") { |v| options[:environment] = v }
opts.separator ""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册