support for modular applications
This commit is contained in:
parent
996f56b5e7
commit
66030d73c5
@ -86,7 +86,7 @@ module Sinatra
|
||||
end
|
||||
|
||||
def source_url_timestamp(url)
|
||||
full_url = "#{Sinatra::Application.root}/public#{url}"
|
||||
full_url = "#{settings.root}/public#{url}"
|
||||
if File.exists? full_url
|
||||
timestamp = File.mtime(full_url).to_i
|
||||
"#{url}?#{timestamp}"
|
||||
|
@ -57,7 +57,7 @@ EOD
|
||||
end
|
||||
|
||||
def test_tags_returns_time_stamp_when_file_exists
|
||||
file_path = "#{Sinatra::Application.root}/public/bar/javascripts/summer.js"
|
||||
file_path = "#{app.settings.root}/public/bar/javascripts/summer.js"
|
||||
File.expects(:"exists?").with(file_path).returns(true)
|
||||
File.expects(:mtime).with(file_path).returns(123456789)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user