Permalink
Browse files

Merge pull request #9 from fl00r/master

public setting is public_folder now
  • Loading branch information...
2 parents c56656d + 02116f4 commit 2dcf09210d6b132d0ba1cb898798781892a11da0 @kematzy committed Dec 2, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/sinatra/cache/helpers.rb
@@ -580,7 +580,7 @@ def cache_page_path(path, options={})
# test if given a full path rather than relative path, otherwise join the public path to cache_dir
# and ensure it is a full path
cache_dir = (settings.cache_output_dir == File.expand_path(settings.cache_output_dir)) ?
- settings.cache_output_dir : File.expand_path("#{settings.public}/#{settings.cache_output_dir}")
+ settings.cache_output_dir : File.expand_path("#{settings.public_folder}/#{settings.cache_output_dir}")
cache_dir = cache_output_dir[0..-2] if cache_dir[-1,1] == '/'
"#{cache_dir}/#{cache_file_name(path, options)}"
end
@@ -640,7 +640,7 @@ def self.registered(app)
app.set :cache_enabled, false
app.set :cache_environment, :production
app.set :cache_page_extension, '.html'
- app.set :cache_output_dir, lambda { app.public }
+ app.set :cache_output_dir, lambda { app.public_folder }
app.set :cache_fragments_output_dir, lambda { "#{app.root}/tmp/cache_fragments" }
app.set :cache_fragments_wrap_with_html_comments, true

0 comments on commit 2dcf092

Please sign in to comment.