PageRenderTime 621ms CodeModel.GetById 19ms RepoModel.GetById 2ms app.codeStats 0ms

/config/routes.rb

https://bitbucket.org/dictav/bitbucket_issues
Ruby | 55 lines | 8 code | 8 blank | 39 comment | 0 complexity | f76e97821b8c5dde26f1f4ab9c2d9f34 MD5 | raw file
  1. BitbucketIssues::Application.routes.draw do
  2. get ':provider/auth' => redirect("/auth/%{provider}")
  3. get '/auth/:provider/callback', to: 'sessions#create', :defaults => {:format => :json}
  4. get ':provider/issues', defaults:{format:'json'}, controller:'issues', action:'index'
  5. post ':provider/issues', defaults:{format:'json'}, controller:'issues', action:'new'
  6. put ':provider/issues/:id', defaults:{format:'json'}, controller:'issues', action:'open'
  7. get ':provider/issues/:id/comments', defaults:{format:'json'}, controller:'issues', action:'comments'
  8. # The priority is based upon order of creation: first created -> highest priority.
  9. # See how all your routes lay out with "rake routes".
  10. # You can have the root of your site routed with "root"
  11. # root 'welcome#index'
  12. # Example of regular route:
  13. # get 'products/:id' => 'catalog#view'
  14. # Example of named route that can be invoked with purchase_url(id: product.id)
  15. # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
  16. # Example resource route (maps HTTP verbs to controller actions automatically):
  17. # resources :products
  18. # Example resource route with options:
  19. # resources :products do
  20. # member do
  21. # get 'short'
  22. # post 'toggle'
  23. # end
  24. #
  25. # collection do
  26. # get 'sold'
  27. # end
  28. # end
  29. # Example resource route with sub-resources:
  30. # resources :products do
  31. # resources :comments, :sales
  32. # resource :seller
  33. # end
  34. # Example resource route with more complex sub-resources:
  35. # resources :products do
  36. # resources :comments
  37. # resources :sales do
  38. # get 'recent', on: :collection
  39. # end
  40. # end
  41. # Example resource route within a namespace:
  42. # namespace :admin do
  43. # # Directs /admin/products/* to Admin::ProductsController
  44. # # (app/controllers/admin/products_controller.rb)
  45. # resources :products
  46. # end
  47. end