summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-04 18:36:22 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-04 18:36:22 +0300
commitbcc4e4dc7ed0740e92a61fc82c3c669f8f2d8d30 (patch)
tree1df3e2d68cd524af4dce107b2e4227778bb3945d /config
parent211e435ade337c968fab11c52427c172adcec99a (diff)
parente0af7cefb4c92b474d14116b40927d70c13e78cc (diff)
downloadgitlab-ce-bcc4e4dc7ed0740e92a61fc82c3c669f8f2d8d30.tar.gz
Merge branch 'gist' of https://github.com/Andrew8xx8/gitlabhq into Andrew8xx8-gist
Conflicts: Gemfile.lock app/models/ability.rb app/models/project.rb app/views/snippets/_form.html.haml db/schema.rb features/steps/shared/paths.rb spec/factories.rb spec/models/project_spec.rb
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb25
1 files changed, 18 insertions, 7 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 3609ac01891..c802c60382d 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -39,6 +39,16 @@ Gitlab::Application.routes.draw do
get 'help/workflow' => 'help#workflow'
#
+ # Global snippets
+ #
+ resources :snippets do
+ member do
+ get "raw"
+ end
+ end
+ get "/s/:username" => "snippets#user_index", as: :user_snippets, constraints: { username: /.*/ }
+
+ #
# Public namespace
#
namespace :public do
@@ -182,6 +192,14 @@ Gitlab::Application.routes.draw do
resources :graph, only: [:show], constraints: {id: /(?:[^.]|\.(?!json$))+/, format: /json/}
match "/compare/:from...:to" => "compare#show", as: "compare", via: [:get, :post], constraints: {from: /.+/, to: /.+/}
+ scope module: :projects do
+ resources :snippets do
+ member do
+ get "raw"
+ end
+ end
+ end
+
resources :wikis, only: [:show, :edit, :destroy, :create] do
collection do
get :pages
@@ -255,19 +273,12 @@ Gitlab::Application.routes.draw do
end
end
- resources :snippets do
- member do
- get "raw"
- end
- end
-
resources :hooks, only: [:index, :create, :destroy] do
member do
get :test
end
end
-
resources :team, controller: 'team_members', only: [:index]
resources :milestones, except: [:destroy]