Sha256: 1e32c8886e0c7b2b1cd7366ec6bd88bcf9ba2cda337c38e69254c17fffd4e935

Contents?: true

Size: 656 Bytes

Versions: 5

Compression:

Stored size: 656 Bytes

Contents

# Extend Resque::Server to add tabs
module ResqueAps
  
  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
        
      end

    end

    Resque::Server.tabs << 'APS'

  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
resque-aps-0.9.4 lib/resque_aps/server.rb
resque-aps-0.9.3 lib/resque_aps/server.rb
resque-aps-0.9.2 lib/resque_aps/server.rb
resque-aps-0.9.1 lib/resque_aps/server.rb
resque-aps-0.9.0 lib/resque_aps/server.rb