Commit c6860a58 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix style issue for rubocop

parent d5437c48
...@@ -81,13 +81,13 @@ Gitlab::Application.routes.draw do ...@@ -81,13 +81,13 @@ Gitlab::Application.routes.draw do
scope path: :uploads do scope path: :uploads do
# Note attachments and User/Group/Project avatars # Note attachments and User/Group/Project avatars
get ":model/:mounted_as/:id/:filename", get ":model/:mounted_as/:id/:filename",
to: "uploads#show", to: "uploads#show",
constraints: { model: /note|user|group|project/, mounted_as: /avatar|attachment/, filename: /.+/ } constraints: { model: /note|user|group|project/, mounted_as: /avatar|attachment/, filename: /.+/ }
# Project markdown uploads # Project markdown uploads
get ":id/:secret/:filename", get ":id/:secret/:filename",
to: "projects/uploads#show", to: "projects/uploads#show",
constraints: { id: /[a-zA-Z.0-9_\-]+\/[a-zA-Z.0-9_\-]+/, filename: /.+/ } constraints: { id: /[a-zA-Z.0-9_\-]+\/[a-zA-Z.0-9_\-]+/, filename: /.+/ }
end end
...@@ -148,7 +148,8 @@ Gitlab::Application.routes.draw do ...@@ -148,7 +148,8 @@ Gitlab::Application.routes.draw do
resources :namespaces, path: '/projects', constraints: { id: /[a-zA-Z.0-9_\-]+/ }, only: [] do resources :namespaces, path: '/projects', constraints: { id: /[a-zA-Z.0-9_\-]+/ }, only: [] do
root to: 'projects#index', as: :projects root to: 'projects#index', as: :projects
resources(:projects, path: '/', resources(:projects,
path: '/',
constraints: { id: /[a-zA-Z.0-9_\-]+/ }, constraints: { id: /[a-zA-Z.0-9_\-]+/ },
only: [:index, :show]) do only: [:index, :show]) do
root to: 'projects#show' root to: 'projects#show'
...@@ -268,12 +269,15 @@ Gitlab::Application.routes.draw do ...@@ -268,12 +269,15 @@ Gitlab::Application.routes.draw do
post '/preview/*id', to: 'blob#preview', constraints: { id: /.+/ }, as: 'preview_blob' post '/preview/*id', to: 'blob#preview', constraints: { id: /.+/ }, as: 'preview_blob'
scope do scope do
get('/blob/*id/diff', to: 'blob#diff', get('/blob/*id/diff',
to: 'blob#diff',
constraints: { id: /.+/, format: false }, constraints: { id: /.+/, format: false },
as: :blob_diff) as: :blob_diff)
get('/blob/*id', to: 'blob#show', get('/blob/*id',
to: 'blob#show',
constraints: { id: /.+/, format: false }, as: :blob) constraints: { id: /.+/, format: false }, as: :blob)
delete('/blob/*id', to: 'blob#destroy', delete('/blob/*id',
to: 'blob#destroy',
constraints: { id: /.+/, format: false }) constraints: { id: /.+/, format: false })
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment