Sha256: 7d0d340c5a261e4d00f57ed7c23334e6280a4d004589ce0523e895ca90d5a884
Contents?: true
Size: 621 Bytes
Versions: 2
Compression:
Stored size: 621 Bytes
Contents
require 'resque-bus' require 'resque/server' require 'erb' # MIGRATE TODO: move to resque gem # Extend ::Resque::Server to add tabs. module ResqueBus module Server def self.included(base) base.class_eval { get "/bus" do erb File.read(File.join(File.dirname(__FILE__), "server/views/bus.erb")) end post '/bus/unsubscribe' do app = Application.new(params[:name]).unsubscribe redirect u('bus') end } end end end ::Resque::Server.tabs << 'Bus' ::Resque::Server.class_eval do include ::ResqueBus::Server end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
resque-bus-0.5.8 | lib/resque_bus/server.rb |
resque-bus-0.5.7 | lib/resque_bus/server.rb |