Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorHannes Rosenögger <123haynes@gmail.com>2015-01-19 23:37:20 +0300
committerHannes Rosenögger <123haynes@gmail.com>2015-01-24 20:51:16 +0300
commit70c44a0da2bdeead90a99fe79e7c047d38b8ca5c (patch)
treed72df8e0b92754d5dd2e629a09d55695808e36d2 /config
parent42bac7f9f27b0e8fb113e452fc2106882262172d (diff)
Fix tests, merge conflicts, some minor issues and make the project avatar feature mergable
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb44
1 files changed, 22 insertions, 22 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 32378665c94..3ee4f07ec72 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -10,8 +10,8 @@ Gitlab::Application.routes.draw do
#
# Search
#
- get 'search' => "search#show"
- get 'search/autocomplete' => "search#autocomplete", as: :search_autocomplete
+ get 'search' => 'search#show'
+ get 'search/autocomplete' => 'search#autocomplete', as: :search_autocomplete
# API
API::API.logger Rails.logger
@@ -20,9 +20,9 @@ Gitlab::Application.routes.draw do
# Get all keys of user
get ':username.keys' => 'profiles/keys#get_keys' , constraints: { username: /.*/ }
- constraint = lambda { |request| request.env["warden"].authenticate? and request.env['warden'].user.admin? }
+ constraint = lambda { |request| request.env['warden'].authenticate? and request.env['warden'].user.admin? }
constraints constraint do
- mount Sidekiq::Web, at: "/admin/sidekiq", as: :sidekiq
+ mount Sidekiq::Web, at: '/admin/sidekiq', as: :sidekiq
end
# Enable Grack support
@@ -46,10 +46,10 @@ Gitlab::Application.routes.draw do
#
resources :snippets do
member do
- get "raw"
+ get 'raw'
end
end
- get "/s/:username" => "snippets#user_index", as: :user_snippets, constraints: { username: /.*/ }
+ get '/s/:username' => 'snippets#user_index', as: :user_snippets, constraints: { username: /.*/ }
#
# Github importer area
@@ -72,12 +72,12 @@ Gitlab::Application.routes.draw do
end
resources :groups, only: [:index]
- root to: "projects#trending"
+ root to: 'projects#trending'
end
# Compatibility with old routing
- get 'public' => "explore/projects#index"
- get 'public/projects' => "explore/projects#index"
+ get 'public' => 'explore/projects#index'
+ get 'public/projects' => 'explore/projects#index'
#
# Attachments serving
@@ -122,7 +122,7 @@ Gitlab::Application.routes.draw do
resource :application_settings, only: [:show, :update]
- root to: "dashboard#index"
+ root to: 'dashboard#index'
end
#
@@ -163,7 +163,7 @@ Gitlab::Application.routes.draw do
#
# Dashboard Area
#
- resource :dashboard, controller: "dashboard", only: [:show] do
+ resource :dashboard, controller: 'dashboard', only: [:show] do
member do
get :projects
get :issues
@@ -194,12 +194,12 @@ Gitlab::Application.routes.draw do
devise_for :users, controllers: { omniauth_callbacks: :omniauth_callbacks, registrations: :registrations , passwords: :passwords, sessions: :sessions, confirmations: :confirmations }
devise_scope :user do
- get "/users/auth/:provider/omniauth_error" => "omniauth_callbacks#omniauth_error", as: :omniauth_error
+ get '/users/auth/:provider/omniauth_error' => 'omniauth_callbacks#omniauth_error', as: :omniauth_error
end
#
# Project Area
#
- resources :projects, constraints: { id: /[a-zA-Z.0-9_\-]+\/[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
put :transfer
post :archive
@@ -220,6 +220,7 @@ Gitlab::Application.routes.draw do
# Cannot be GET to differentiate from GET paths that end in preview.
post :preview, on: :member
end
+ resource :avatar, only: [:show, :destroy]
resources :new_tree, only: [:show, :update], constraints: {id: /.+/}, path: 'new'
resources :commit, only: [:show], constraints: {id: /[[:alnum:]]{6,40}/}
resources :commits, only: [:show], constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}
@@ -237,7 +238,7 @@ Gitlab::Application.routes.draw do
resources :snippets, constraints: {id: /\d+/} do
member do
- get "raw"
+ get 'raw'
end
end
@@ -249,7 +250,7 @@ Gitlab::Application.routes.draw do
end
member do
- get "history"
+ get 'history'
end
end
@@ -258,7 +259,7 @@ Gitlab::Application.routes.draw do
resource :repository, only: [:show, :create] do
member do
- get "archive", constraints: { format: Gitlab::Regex.archive_formats_regex }
+ get 'archive', constraints: { format: Gitlab::Regex.archive_formats_regex }
end
end
@@ -281,13 +282,13 @@ Gitlab::Application.routes.draw do
resources :refs, only: [] do
collection do
- get "switch"
+ get 'switch'
end
member do
# tree viewer logs
- get "logs_tree", constraints: { id: Gitlab::Regex.git_reference_regex }
- get "logs_tree/:path" => "refs#logs_tree",
+ get 'logs_tree', constraints: { id: Gitlab::Regex.git_reference_regex }
+ get 'logs_tree/:path' => 'refs#logs_tree',
as: :logs_file,
constraints: {
id: Gitlab::Regex.git_reference_regex,
@@ -354,11 +355,10 @@ Gitlab::Application.routes.draw do
end
end
- resource :avatar, only: [:show, :destroy]
end
end
- get ':id' => "namespaces#show", constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}
+ get ':id' => 'namespaces#show', constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}
- root to: "dashboard#show"
+ root to: 'dashboard#show'
end