Sha256: aaacff5ff79863bbb1a563af1df2eb4c735ab79574135ae42ab23583ba463cca

Contents?: true

Size: 916 Bytes

Versions: 2

Compression:

Stored size: 916 Bytes

Contents

# Match IDs with dots in them
id_pattern = /[^\/]+/

ResqueWeb::Engine.routes.draw do

  ResqueWeb::Plugins.plugins.each do |p|
    mount p::Engine => p.engine_path
  end

  resource  :overview,  :only => [:show], :controller => :overview
  resources :working,   :only => [:index]
  resources :queues,    :only => [:index,:show,:destroy], :constraints => {:id => id_pattern} do
    member do
      put 'clear' 
    end
  end
  resources :workers,   :only => [:index,:show], :constraints => {:id => id_pattern}
  resources :failures,  :only => [:show,:index,:destroy] do
    member do
      put 'retry'
    end
    collection do
      put 'retry_all'
      delete 'destroy_all'
    end
  end

  get '/stats' => "stats#index"
  get '/stats/:action',     :controller => :stats
  get '/stats/:action/:id', :controller => :stats, :constraints => {:id => id_pattern}, :as => :statistic

  root :to => 'overview#show'

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
resque-web-0.0.8 config/routes.rb
resque-web-0.0.7 config/routes.rb