allow non-bundled tilt to be loaded
Tries to require 'tilt' before falling back on the bundled version - 'sinatra/tilt'. This should result in any tilt on the $LOAD_PATH overriding the bundled version.
This commit is contained in:
parent
5d228993e3
commit
c4263e2945
|
@ -3,9 +3,15 @@ require 'time'
|
|||
require 'uri'
|
||||
require 'rack'
|
||||
require 'rack/builder'
|
||||
require 'tilt'
|
||||
require 'sinatra/showexceptions'
|
||||
|
||||
# require tilt if available; fall back on bundled version.
|
||||
begin
|
||||
require 'tilt'
|
||||
rescue LoadError
|
||||
require 'sinatra/tilt'
|
||||
end
|
||||
|
||||
module Sinatra
|
||||
VERSION = '0.10.1'
|
||||
|
||||
|
|
Loading…
Reference in New Issue