Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

public setting is public_folder now #9

Merged
merged 1 commit into from Dec 2, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/sinatra/cache/helpers.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down