From 13708cb8f4e2eee2d5687617750f02af50c18ef1 Mon Sep 17 00:00:00 2001 From: Jochen Schalanda Date: Sun, 13 Feb 2011 16:55:27 +0100 Subject: [PATCH] Fixes bug #665 - Set option 'bind' or 'host' depending on Sinatra version. --- lib/sinatra-patch.rb | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/sinatra-patch.rb b/lib/sinatra-patch.rb index 3afcf9e..4f221cf 100644 --- a/lib/sinatra-patch.rb +++ b/lib/sinatra-patch.rb @@ -10,6 +10,10 @@ module Sinatra set options handler = detect_rack_handler handler_name = handler.name.gsub(/.*::/, '') + + # Hack to cope with renamed options in Sinatra 1.0.a + bind = host if VERSION == '1.0.a' + puts "Starting Foreman Proxy on #{port} using #{handler_name}" unless handler_name =~/cgi/i if SETTINGS.daemon -- 1.7.4