lib/sinatra/main.rb in sinatra-2.0.8.1 vs lib/sinatra/main.rb in sinatra-2.1.0

- old
+ new

@@ -2,14 +2,14 @@ ParamsConfig = {} if ARGV.any? require 'optparse' parser = OptionParser.new { |op| - op.on('-p port', 'set the port (default is 4567)') { |val| ParamsConfig[:port] = Integer(val) } - op.on('-s server', 'specify rack server/handler (default is thin)') { |val| ParamsConfig[:server] = val } - op.on('-q', 'turn on quiet mode (default is off)') { ParamsConfig[:quiet] = true } - op.on('-x', 'turn on the mutex lock (default is off)') { ParamsConfig[:lock] = true } - op.on('-e env', 'set the environment (default is development)') do |val| + op.on('-p port', 'set the port (default is 4567)') { |val| ParamsConfig[:port] = Integer(val) } + op.on('-s server', 'specify rack server/handler') { |val| ParamsConfig[:server] = val } + op.on('-q', 'turn on quiet mode (default is off)') { ParamsConfig[:quiet] = true } + op.on('-x', 'turn on the mutex lock (default is off)') { ParamsConfig[:lock] = true } + op.on('-e env', 'set the environment (default is development)') do |val| ENV['RACK_ENV'] = val ParamsConfig[:environment] = val.to_sym end op.on('-o addr', "set the host (default is (env == 'development' ? 'localhost' : '0.0.0.0'))") do |val| ParamsConfig[:bind] = val