提交 af63e4a2 编写于 作者: V Vijay Dev

Make text consistent in help text of rails server and console commands.

上级 54cf7c54
......@@ -14,16 +14,16 @@ def parse_arguments(arguments)
OptionParser.new do |opt|
opt.banner = "Usage: rails console [environment] [options]"
opt.on('-s', '--sandbox', 'Rollback database modifications on exit.') { |v| options[:sandbox] = v }
opt.on('-s', '--sandbox', 'Rollbacks database modifications on exit.') { |v| options[:sandbox] = v }
opt.on("-e", "--environment=name", String,
"Specifies the environment to run this console under (test/development/production).",
"Default: development") { |v| options[:environment] = v.strip }
opt.on("--debugger", 'Enable the debugger.') do |v|
opt.on("--debugger", 'Enables the debugger.') do |v|
if RUBY_VERSION < '2.0.0'
options[:debugger] = v
else
puts "=> Notice: debugger option is ignored since ruby 2.0 and " \
"it will be removed in future versions"
puts "=> Notice: debugger option is ignored since Ruby 2.0 and " \
"it will be removed in future versions."
end
end
opt.parse!(arguments)
......
......@@ -20,20 +20,20 @@ def parse!(args)
def option_parser(options)
OptionParser.new do |opts|
opts.banner = "Usage: rails server [mongrel, thin, etc] [options]"
opts.banner = "Usage: rails server [Mongrel, Thin etc] [options]"
opts.on("-p", "--port=port", Integer,
"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: 0.0.0.0") { |v| options[:Host] = v }
opts.on("-b", "--binding=IP", String,
"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 the debugger") do
"Uses a custom rackup configuration.") { |v| options[:config] = v }
opts.on("-d", "--daemon", "Runs server as a Daemon.") { options[:daemonize] = true }
opts.on("-u", "--debugger", "Enables the debugger.") do
if RUBY_VERSION < '2.0.0'
options[:debugger] = true
else
puts "=> Notice: debugger option is ignored since ruby 2.0 and " \
"it will be removed in future versions"
puts "=> Notice: debugger option is ignored since Ruby 2.0 and " \
"it will be removed in future versions."
end
end
opts.on("-e", "--environment=name", String,
......@@ -45,7 +45,7 @@ def option_parser(options)
opts.separator ""
opts.on("-h", "--help", "Show this help message.") { puts opts; exit }
opts.on("-h", "--help", "Shows this help message.") { puts opts; exit }
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册