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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
eef6f768
Commit
eef6f768
authored
May 21, 2019
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add network and graphs to legacy routes too
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
6d3f5a33
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
config/routes/project.rb
config/routes/project.rb
+1
-1
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+2
-0
No files found.
config/routes/project.rb
View file @
eef6f768
...
...
@@ -507,7 +507,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
constraints:
{
project_id:
Gitlab
::
PathRegex
.
project_route_regex
},
module: :projects
,
as: :project
)
do
Gitlab
::
Routing
.
redirect_legacy_paths
(
self
,
:settings
,
:branches
,
:tags
)
Gitlab
::
Routing
.
redirect_legacy_paths
(
self
,
:settings
,
:branches
,
:tags
,
:network
,
:graphs
)
end
end
end
spec/routing/project_routing_spec.rb
View file @
eef6f768
...
...
@@ -609,6 +609,8 @@ describe 'project routing' do
expect
(
get
(
'/gitlab/gitlabhq/-/graphs/ends-with.json'
)).
to
route_to
(
'projects/graphs#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'ends-with.json'
)
expect
(
get
(
'/gitlab/gitlabhq/-/graphs/master?format=json'
)).
to
route_to
(
'projects/graphs#show'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'master'
,
format:
'json'
)
end
it_behaves_like
'redirecting a legacy project path'
,
"/gitlab/gitlabhq/graphs/master"
,
"/gitlab/gitlabhq/-/graphs/master"
end
describe
Projects
::
ForksController
,
'routing'
do
...
...
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