diff options
author | Vinnie Okada <vokada@mrvinn.com> | 2015-03-21 18:03:35 +0300 |
---|---|---|
committer | Vinnie Okada <vokada@mrvinn.com> | 2015-03-21 18:03:35 +0300 |
commit | f5e65e2e508269ff7c18318526ba01f8e7d83951 (patch) | |
tree | dd834b066dc51de87139d69ea042e0bdfd69334d /config/routes.rb | |
parent | cc29ce491786d631586c3b0d0da310b8b790a673 (diff) | |
parent | 6cf189f0a92772b9174f913e7c74a4889d54e9a6 (diff) |
Merge branch 'master' into markdown-tags
Merge updated CHANGELOG entries
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/config/routes.rb b/config/routes.rb index e65ef30afb7..03b4a32a9dd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -198,7 +198,10 @@ Gitlab::Application.routes.draw do end get 'u/:username/calendar' => 'users#calendar', as: :user_calendar, - constraints: { username: /(?:[^.]|\.(?!atom$))+/, format: /atom/ } + constraints: { username: /.*/ } + + get 'u/:username/calendar_activities' => 'users#calendar_activities', as: :user_calendar_activities, + constraints: { username: /.*/ } get '/u/:username' => 'users#show', as: :user, constraints: { username: /(?:[^.]|\.(?!atom$))+/, format: /atom/ } @@ -239,7 +242,7 @@ Gitlab::Application.routes.draw do resources :group_members, only: [:index, :create, :update, :destroy] do delete :leave, on: :collection end - + resource :avatar, only: [:destroy] resources :milestones, only: [:index, :show, :update] end @@ -315,14 +318,6 @@ Gitlab::Application.routes.draw do as: :tree ) end - resource :avatar, only: [:show, :destroy] - - resources :commit, only: [:show], constraints: { id: /[[:alnum:]]{6,40}/ } do - get :branches, on: :member - end - - resources :commits, only: [:show], constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ } - resources :compare, only: [:index, :create] scope do get( @@ -333,8 +328,24 @@ Gitlab::Application.routes.draw do ) end - resources :network, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } - resources :graphs, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } do + scope do + get( + '/commits/*id', + to: 'commits#show', + constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ }, + as: :commits + ) + end + + resource :avatar, only: [:show, :destroy] + resources :commit, only: [:show], constraints: { id: /[[:alnum:]]{6,40}/ } do + get :branches, on: :member + end + + resources :compare, only: [:index, :create] + resources :network, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } + + resources :graphs, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ } do member do get :commits end |