summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorSebastian Ziebell <sebastian.ziebell@asquera.de>2013-03-07 14:51:56 +0100
committerSebastian Ziebell <sebastian.ziebell@asquera.de>2013-03-07 14:51:56 +0100
commit3374027e3a4e4eb040e59294a9ced9d7886a71e2 (patch)
tree4587984396a32047a6337e7810a39633ba683545 /config/routes.rb
parent39114d259c6e4bd5bb60b18f561d06cc24e8c852 (diff)
parent9c2a6e201388e7e30987a8679ddfa65b9422a38c (diff)
downloadgitlab-ce-3374027e3a4e4eb040e59294a9ced9d7886a71e2.tar.gz
Merge branch 'master' into fixes/api, code clean up and tests fixed
Conflicts: doc/api/projects.md spec/requests/api/projects_spec.rb
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/routes.rb b/config/routes.rb
index c8e7c8ee4f8..b06fda8f85d 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -166,7 +166,7 @@ Gitlab::Application.routes.draw do
#
# Project Area
#
- resources :projects, constraints: { id: /[a-zA-Z.0-9_\-\/]+/ }, except: [:new, :create, :index], path: "/" do
+ resources :projects, constraints: { id: /(?:[a-zA-Z.0-9_\-]+\/)?[a-zA-Z.0-9_\-]+/ }, except: [:new, :create, :index], path: "/" do
member do
get "wall"
get "files"
@@ -175,10 +175,10 @@ Gitlab::Application.routes.draw do
resources :blob, only: [:show], constraints: {id: /.+/}
resources :tree, only: [:show, :edit, :update], constraints: {id: /.+/}
resources :commit, only: [:show], constraints: {id: /[[:alnum:]]{6,40}/}
- resources :commits, only: [:show], constraints: {id: /.+/}
+ resources :commits, only: [:show], constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}
resources :compare, only: [:index, :create]
resources :blame, only: [:show], constraints: {id: /.+/}
- resources :graph, only: [:show], constraints: {id: /.+/}
+ resources :graph, only: [:show], constraints: {id: /(?:[^.]|\.(?!json$))+/, format: /json/}
match "/compare/:from...:to" => "compare#show", as: "compare",
:via => [:get, :post], constraints: {from: /.+/, to: /.+/}