Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 } | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
vijaydev
Author
Member
|
||
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) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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]" | ||
This comment has been minimized.
Sorry, something went wrong.
soundarapandian
|
||
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 | ||
|
Apart from "rollbacks" not being a word, I think the previous spelling is superior.. options don't do things, they request/nominate behaviours of the command.
(Contrast "specifies", which does describe what the option is doing.)