Sha256: 16def7db89f160ac5202353c2404dd226cfd627cade4b7f605aba9e4dbc31ac7

Contents?: true

Size: 866 Bytes

Versions: 3

Compression:

Stored size: 866 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}
  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

3 entries across 3 versions & 2 rubygems

Version Path
resque-web-0.0.6 config/routes.rb
glebtv_resque_web-0.1.0 config/routes.rb
resque-web-0.0.5 config/routes.rb