Sha256: 8324fb52b3dab3d40fd72aaf2042265f623b9d049e4bfc054f41b7becc0a9aef
Contents?: true
Size: 866 Bytes
Versions: 2
Compression:
Stored size: 866 Bytes
Contents
# Extend Resque::Server to add tabs module Resque module Plugins module Aps module Server def self.included(base) base.class_eval do get "/aps" do # Is there a better way to specify alternate template locations with sinatra? erb File.read(File.join(File.dirname(__FILE__), 'server/views/aps_applications.erb')) end get "/aps/:application_name" do # Is there a better way to specify alternate template locations with sinatra? erb File.read(File.join(File.dirname(__FILE__), 'server/views/notifications.erb')) end post "/aps/:application_name" do Resque.enqueue(Resque::Plugins::Aps::Application, params[:application_name]) redirect url("/aps") end end end Resque::Server.tabs << 'APS' end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
resque-aps-0.9.10 | lib/resque_aps/server.rb |
resque-aps-0.9.9 | lib/resque_aps/server.rb |