Skip to content

Instantly share code, notes, and snippets.

require 'sinatra/base'
class ResqueWeb < Sinatra::Base
require 'resque/server'
use Rack::ShowExceptions
# Set the AUTH env variable to your basic auth password to protect Resque.
AUTH_PASSWORD = ENV['AUTH']
if AUTH_PASSWORD
Resque::Server.use Rack::Auth::Basic do |username, password|
# RAILSLOVE.com template
#
# with help and ideas from:
# http://gist.github.com/33337 By Peter Cooper
# http://github.com/jeremymcanally/rails-templates/tree/master/suspenders.rb Suspenders by Thoughtbot Nathan Esquenazi
if yes?("symlink local rails copy to vendor?")
path = ask("what's the directory of your local rails copy?")
inside('vendor') { run "ln -s #{path} rails" }