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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-24 02:18:45 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-24 02:18:45 +0300
commitc6860a5828fe569f6a81e2c96bb7e4a32f572a29 (patch)
treef411e0878a4ffdd5379f66354c5e81ffddad8c18 /config
parentd5437c483899b8f1d9871e9c8af1976899a87351 (diff)
Fix style issue for rubocop
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb20
1 files changed, 12 insertions, 8 deletions
diff --git a/config/routes.rb b/config/routes.rb
index a3f047e36a4..f0979eac906 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -81,13 +81,13 @@ Gitlab::Application.routes.draw do
scope path: :uploads do
# Note attachments and User/Group/Project avatars
- get ":model/:mounted_as/:id/:filename",
- to: "uploads#show",
+ get ":model/:mounted_as/:id/:filename",
+ to: "uploads#show",
constraints: { model: /note|user|group|project/, mounted_as: /avatar|attachment/, filename: /.+/ }
# Project markdown uploads
- get ":id/:secret/:filename",
- to: "projects/uploads#show",
+ get ":id/:secret/:filename",
+ to: "projects/uploads#show",
constraints: { id: /[a-zA-Z.0-9_\-]+\/[a-zA-Z.0-9_\-]+/, filename: /.+/ }
end
@@ -148,7 +148,8 @@ Gitlab::Application.routes.draw do
resources :namespaces, path: '/projects', constraints: { id: /[a-zA-Z.0-9_\-]+/ }, only: [] do
root to: 'projects#index', as: :projects
- resources(:projects, path: '/',
+ resources(:projects,
+ path: '/',
constraints: { id: /[a-zA-Z.0-9_\-]+/ },
only: [:index, :show]) do
root to: 'projects#show'
@@ -268,12 +269,15 @@ Gitlab::Application.routes.draw do
post '/preview/*id', to: 'blob#preview', constraints: { id: /.+/ }, as: 'preview_blob'
scope do
- get('/blob/*id/diff', to: 'blob#diff',
+ get('/blob/*id/diff',
+ to: 'blob#diff',
constraints: { id: /.+/, format: false },
as: :blob_diff)
- get('/blob/*id', to: 'blob#show',
+ get('/blob/*id',
+ to: 'blob#show',
constraints: { id: /.+/, format: false }, as: :blob)
- delete('/blob/*id', to: 'blob#destroy',
+ delete('/blob/*id',
+ to: 'blob#destroy',
constraints: { id: /.+/, format: false })
end