mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
add description to command line options, reorder them as in readme
This commit is contained in:
parent
cd685585b7
commit
179981df7b
1 changed files with 5 additions and 5 deletions
|
@ -13,11 +13,11 @@ module Sinatra
|
||||||
if run? && ARGV.any?
|
if run? && ARGV.any?
|
||||||
require 'optparse'
|
require 'optparse'
|
||||||
OptionParser.new { |op|
|
OptionParser.new { |op|
|
||||||
op.on('-x') { set :lock, true }
|
op.on('-p port', 'set the port (default is 4567)') { |val| set :port, Integer(val) }
|
||||||
op.on('-e env') { |val| set :environment, val.to_sym }
|
op.on('-o addr', 'set the host (default is 0.0.0.0)') { |val| set :bind, val }
|
||||||
op.on('-s server') { |val| set :server, val }
|
op.on('-e env', 'set the environment (default is development)') { |val| set :environment, val.to_sym }
|
||||||
op.on('-p port') { |val| set :port, Integer(val) }
|
op.on('-s server', 'specify rack server/handler (default is thin)') { |val| set :server, val }
|
||||||
op.on('-o addr') { |val| set :bind, val }
|
op.on('-x', 'turn on the mutex lock (default is off)') { set :lock, true }
|
||||||
}.parse!(ARGV.dup)
|
}.parse!(ARGV.dup)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue