Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
28f19639
Commit
28f19639
authored
May 24, 2019
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move project routes under one scope
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c0ea4164
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
60 deletions
+58
-60
config/routes/project.rb
config/routes/project.rb
+58
-60
No files found.
config/routes/project.rb
View file @
28f19639
...
...
@@ -26,6 +26,64 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
module: :projects
,
as: :project
)
do
scope
'-'
do
get
'archive/*id'
,
constraints:
{
format:
Gitlab
::
PathRegex
.
archive_formats_regex
,
id:
/.+?/
},
to:
'repositories#archive'
,
as:
'archive'
resources
:jobs
,
only:
[
:index
,
:show
],
constraints:
{
id:
/\d+/
}
do
collection
do
resources
:artifacts
,
only:
[]
do
collection
do
get
:latest_succeeded
,
path:
'*ref_name_and_path'
,
format:
false
end
end
end
member
do
get
:status
post
:cancel
post
:unschedule
post
:retry
post
:play
post
:erase
get
:trace
,
defaults:
{
format:
'json'
}
get
:raw
get
:terminal
get
'/terminal.ws/authorize'
,
to:
'jobs#terminal_websocket_authorize'
,
constraints:
{
format:
nil
}
end
resource
:artifacts
,
only:
[]
do
get
:download
get
:browse
,
path:
'browse(/*path)'
,
format:
false
get
:file
,
path:
'file/*path'
,
format:
false
get
:raw
,
path:
'raw/*path'
,
format:
false
post
:keep
end
end
namespace
:ci
do
resource
:lint
,
only:
[
:show
,
:create
]
end
namespace
:settings
do
get
:members
,
to:
redirect
(
"%{namespace_id}/%{project_id}/project_members"
)
resource
:ci_cd
,
only:
[
:show
,
:update
],
controller:
'ci_cd'
do
post
:reset_cache
put
:reset_registration_token
end
resource
:operations
,
only:
[
:show
,
:update
]
resource
:integrations
,
only:
[
:show
]
resource
:repository
,
only:
[
:show
],
controller: :repository
do
post
:create_deploy_token
,
path:
'deploy_token/create'
post
:cleanup
end
end
end
resources
:autocomplete_sources
,
only:
[]
do
collection
do
get
'members'
...
...
@@ -267,47 +325,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
resources
:functions
,
only:
[
:index
]
end
scope
'-'
do
get
'archive/*id'
,
constraints:
{
format:
Gitlab
::
PathRegex
.
archive_formats_regex
,
id:
/.+?/
},
to:
'repositories#archive'
,
as:
'archive'
resources
:jobs
,
only:
[
:index
,
:show
],
constraints:
{
id:
/\d+/
}
do
collection
do
resources
:artifacts
,
only:
[]
do
collection
do
get
:latest_succeeded
,
path:
'*ref_name_and_path'
,
format:
false
end
end
end
member
do
get
:status
post
:cancel
post
:unschedule
post
:retry
post
:play
post
:erase
get
:trace
,
defaults:
{
format:
'json'
}
get
:raw
get
:terminal
get
'/terminal.ws/authorize'
,
to:
'jobs#terminal_websocket_authorize'
,
constraints:
{
format:
nil
}
end
resource
:artifacts
,
only:
[]
do
get
:download
get
:browse
,
path:
'browse(/*path)'
,
format:
false
get
:file
,
path:
'file/*path'
,
format:
false
get
:raw
,
path:
'raw/*path'
,
format:
false
post
:keep
end
end
namespace
:ci
do
resource
:lint
,
only:
[
:show
,
:create
]
end
end
draw
:legacy_builds
resources
:hooks
,
only:
[
:index
,
:create
,
:edit
,
:update
,
:destroy
],
constraints:
{
id:
/\d+/
}
do
...
...
@@ -443,25 +460,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end
end
scope
'-'
do
namespace
:settings
do
get
:members
,
to:
redirect
(
"%{namespace_id}/%{project_id}/project_members"
)
resource
:ci_cd
,
only:
[
:show
,
:update
],
controller:
'ci_cd'
do
post
:reset_cache
put
:reset_registration_token
end
resource
:operations
,
only:
[
:show
,
:update
]
resource
:integrations
,
only:
[
:show
]
resource
:repository
,
only:
[
:show
],
controller: :repository
do
post
:create_deploy_token
,
path:
'deploy_token/create'
post
:cleanup
end
end
end
resources
:error_tracking
,
only:
[
:index
],
controller: :error_tracking
do
collection
do
post
:list_projects
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment