Skip to content

Commit

Permalink
add :server_settings to pass options to :server, merges sinatra#431
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
  • Loading branch information
metakeule authored and rkh committed Mar 15, 2012
1 parent 732d5b9 commit 9a2fa48
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/sinatra/base.rb
Expand Up @@ -1351,9 +1351,10 @@ def quit!(server, handler_name)
# with the constructed handler once we have taken the stage.
def run!(options={})
set options
handler = detect_rack_handler
handler_name = handler.name.gsub(/.*::/, '')
handler.run self, :Host => bind, :Port => port do |server|
handler = detect_rack_handler
handler_name = handler.name.gsub(/.*::/, '')
server_settings = settings.respond_to?(:server_settings) ? settings.server_settings : {}
handler.run self, server_settings.merge(:Port => port, :Host => bind) do |server|
unless handler_name =~ /cgi/i
$stderr.puts "== Sinatra/#{Sinatra::VERSION} has taken the stage " +
"on #{port} for #{environment} with backup from #{handler_name}"
Expand Down

0 comments on commit 9a2fa48

Please sign in to comment.