PageRenderTime 100ms CodeModel.GetById 37ms RepoModel.GetById 1ms app.codeStats 0ms

/config/routes.rb

https://bitbucket.org/bjfish/indexer
Ruby | 102 lines | 28 code | 21 blank | 53 comment | 0 complexity | e3c124c5fd793eaecbe9c1584541eb0b MD5 | raw file
  1. require 'resque/server'
  2. Indexer::Application.routes.draw do
  3. get "policy/tos"
  4. match "help" => "policy#help"
  5. get "policy/privacy"
  6. ActiveAdmin.routes(self)
  7. devise_for :admin_users, ActiveAdmin::Devise.config
  8. devise_scope :admin_users do
  9. mount Resque::Server.new, :at => "/resque"
  10. end
  11. authenticated :user do
  12. root :to => 'home#search'
  13. end
  14. root :to => "home#index"
  15. devise_scope :user do
  16. get '/users/auth/:provider' => 'users/omniauth_callbacks#passthru'
  17. end
  18. devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks",:registrations => "registrations" }
  19. resources :accounts do
  20. resources :account_members
  21. end
  22. resources :integrations do
  23. get 'job_status', :on => :member
  24. post 'index_now', :on => :member
  25. resources :authorizations
  26. end
  27. #match 'integrations/bitbucket' => 'integrations#bitbucket'
  28. #match 'integrations/trello' => 'integrations#trello'
  29. # match 'integrations' => 'integrations#index'#
  30. # match 'integrations/:id/add' => 'integrations#add'#
  31. # match 'integrations/:id/retrieve' => 'integrations#retrieve'#
  32. # match 'integrations/:id/job-status' => 'integrations#job_status'#
  33. #mount Resque::Server.new, :at => "/resque" #TODO Make this secure for admins
  34. get "home/search"
  35. # The priority is based upon order of creation:
  36. # first created -> highest priority.
  37. # Sample of regular route:
  38. # match 'products/:id' => 'catalog#view'
  39. # Keep in mind you can assign values other than :controller and :action
  40. # Sample of named route:
  41. # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
  42. # This route can be invoked with purchase_url(:id => product.id)
  43. # Sample resource route (maps HTTP verbs to controller actions automatically):
  44. # resources :products
  45. # Sample resource route with options:
  46. # resources :products do
  47. # member do
  48. # get 'short'
  49. # post 'toggle'
  50. # end
  51. #
  52. # collection do
  53. # get 'sold'
  54. # end
  55. # end
  56. # Sample resource route with sub-resources:
  57. # resources :products do
  58. # resources :comments, :sales
  59. # resource :seller
  60. # end
  61. # Sample resource route with more complex sub-resources
  62. # resources :products do
  63. # resources :comments
  64. # resources :sales do
  65. # get 'recent', :on => :collection
  66. # end
  67. # end
  68. # Sample resource route within a namespace:
  69. # namespace :admin do
  70. # # Directs /admin/products/* to Admin::ProductsController
  71. # # (app/controllers/admin/products_controller.rb)
  72. # resources :products
  73. # end
  74. # You can have the root of your site routed with "root"
  75. # just remember to delete public/index.html.
  76. # root :to => 'welcome#index'
  77. # See how all your routes lay out with "rake routes"
  78. # This is a legacy wild controller route that's not recommended for RESTful applications.
  79. # Note: This route will make all actions in every controller accessible via GET requests.
  80. # match ':controller(/:action(/:id))(.:format)'
  81. end