Permalink
Browse files

Use Sinatra's public_folder if it exists

Fixes #421. Fixes #420.
  • Loading branch information...
1 parent 56ad1e7 commit 3080af3258ae3f14fb1a5be895a6b5b5ed6d0684 @defunkt defunkt committed Oct 21, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/resque/server.rb
View
@@ -13,7 +13,13 @@ class Server < Sinatra::Base
dir = File.dirname(File.expand_path(__FILE__))
set :views, "#{dir}/server/views"
- set :public, "#{dir}/server/public"
+
+ if respond_to? :public_folder
+ set :public_folder, "#{dir}/server/public"
+ else
+ set :public, "#{dir}/server/public"
+ end
+
set :static, true
helpers do

0 comments on commit 3080af3

Please sign in to comment.