diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-09 14:56:02 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-09 14:56:02 +0200 |
commit | 0b5d627cd4a3f81934e7772e3558356c9dd2e3cf (patch) | |
tree | a232d232e543ef372d91d0dfffbc93985f37d982 /config/routes.rb | |
parent | 90c338a49541c95452181af9e0d0bcf9da6c51ad (diff) | |
parent | 0d610270d9634b783137bc6318eff4aa82572a7d (diff) | |
download | gitlab-ce-0b5d627cd4a3f81934e7772e3558356c9dd2e3cf.tar.gz |
Merge branch 'master' into ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/config/routes.rb b/config/routes.rb index 3a27571d62b..d484db559df 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -129,12 +129,7 @@ Gitlab::Application.routes.draw do end # Enable Grack support - mount Grack::Bundle.new({ - git_path: Gitlab.config.git.bin_path, - project_root: Gitlab.config.gitlab_shell.repos_path, - upload_pack: Gitlab.config.gitlab_shell.upload_pack, - receive_pack: Gitlab.config.gitlab_shell.receive_pack - }), at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }, via: [:get, :post] + mount Grack::AuthSpawner, at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }, via: [:get, :post] # Help get 'help' => 'help#index' @@ -203,6 +198,15 @@ Gitlab::Application.routes.draw do get :new_user_map, path: :user_map post :create_user_map, path: :user_map end + + resource :fogbugz, only: [:create, :new], controller: :fogbugz do + get :status + post :callback + get :jobs + + get :new_user_map, path: :user_map + post :create_user_map, path: :user_map + end end # @@ -305,6 +309,8 @@ Gitlab::Application.routes.draw do resources :services end + resources :labels + root to: 'dashboard#index' end @@ -510,16 +516,20 @@ Gitlab::Application.routes.draw do end end - resources :wikis, only: [:show, :edit, :destroy, :create], constraints: { id: /[a-zA-Z.0-9_\-\/]+/ } do - collection do - get :pages - put ':id' => 'wikis#update' - get :git_access - end + WIKI_SLUG_ID = { id: /[a-zA-Z.0-9_\-\/]+/ } unless defined? WIKI_SLUG_ID - member do - get 'history' - end + scope do + # Order matters to give priority to these matches + get '/wikis/git_access', to: 'wikis#git_access' + get '/wikis/pages', to: 'wikis#pages', as: 'wiki_pages' + post '/wikis', to: 'wikis#create' + + get '/wikis/*id/history', to: 'wikis#history', as: 'wiki_history', constraints: WIKI_SLUG_ID + get '/wikis/*id/edit', to: 'wikis#edit', as: 'wiki_edit', constraints: WIKI_SLUG_ID + + get '/wikis/*id', to: 'wikis#show', as: 'wiki', constraints: WIKI_SLUG_ID + delete '/wikis/*id', to: 'wikis#destroy', constraints: WIKI_SLUG_ID + put '/wikis/*id', to: 'wikis#update', constraints: WIKI_SLUG_ID end resource :repository, only: [:show, :create] do |