lib/resque_cleaner/server.rb in resque-cleaner-0.3.2 vs lib/resque_cleaner/server.rb in resque-cleaner-0.4.0
- old
+ new
@@ -6,13 +6,10 @@
module Server
def self.erb_path(filename)
File.join(File.dirname(__FILE__), 'server', 'views', filename)
end
- def self.public_path(filename)
- File.join(File.dirname(__FILE__), 'server', 'public', filename)
- end
# Pagination helper for list page.
class Paginate
attr_accessor :page_size, :page, :jobs, :url
def initialize(jobs, url, page=1, page_size=20)
@@ -197,14 +194,10 @@
post "/cleaner_stale" do
load_library
cleaner.clear_stale
redirect url_path(:cleaner)
end
-
- get /cleaner\/public\/([a-z]+\.[a-z]+)/ do
- send_file ResqueCleaner::Server.public_path(params[:captures].first)
- end
end
end
def cleaner
@@ -262,6 +255,5 @@
end
Resque::Server.class_eval do
include ResqueCleaner::Server
end
-