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
25c90127
Commit
25c90127
authored
May 01, 2020
by
Luke Duncalfe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated design routes
https://gitlab.com/gitlab-org/gitlab/-/issues/208256
parent
9b1270af
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
25 deletions
+7
-25
ee/changelogs/unreleased/208256-remove-deprecated-design-management-routes.yml
...sed/208256-remove-deprecated-design-management-routes.yml
+5
-0
ee/config/routes/project.rb
ee/config/routes/project.rb
+0
-14
ee/spec/features/projects/issues/design_management/user_views_design_images_spec.rb
...issues/design_management/user_views_design_images_spec.rb
+2
-2
ee/spec/routing/project_routing_spec.rb
ee/spec/routing/project_routing_spec.rb
+0
-9
No files found.
ee/changelogs/unreleased/208256-remove-deprecated-design-management-routes.yml
0 → 100644
View file @
25c90127
---
title
:
Remove deprecated route for serving full-size Design Management design files
merge_request
:
30917
author
:
type
:
removed
ee/config/routes/project.rb
View file @
25c90127
...
@@ -43,20 +43,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
...
@@ -43,20 +43,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end
end
end
end
# DEPRECATED: Remove this redirection in GitLab 13.0.
# This redirection supports old (pre-12.9) routes to Design Management raw images.
# https://gitlab.com/gitlab-org/gitlab/issues/208256
get
'/designs/:id(/*ref)'
,
as: :design
,
contraints:
{
id:
/\d+/
,
ref:
Gitlab
::
PathRegex
.
git_reference_regex
},
to:
redirect
{
|
params
|
namespace_id
,
project_id
,
id
,
ref
=
params
.
values_at
(
:namespace_id
,
:project_id
,
:id
,
:ref
)
# The :ref route segment is optional in both this route, and the route
# we redirect to (where it is called :sha).
ref_path
=
"/
#{
ref
}
"
if
ref
"
#{
namespace_id
}
/
#{
project_id
}
/-/design_management/designs/
#{
id
}#{
ref_path
}
/raw_image"
}
namespace
:design_management
do
namespace
:design_management
do
namespace
:designs
,
path:
'designs/:design_id(/:sha)'
,
constraints:
->
(
params
)
{
params
[
:sha
].
nil?
||
Gitlab
::
Git
.
commit_id?
(
params
[
:sha
])
}
do
namespace
:designs
,
path:
'designs/:design_id(/:sha)'
,
constraints:
->
(
params
)
{
params
[
:sha
].
nil?
||
Gitlab
::
Git
.
commit_id?
(
params
[
:sha
])
}
do
resource
:raw_image
,
only: :show
resource
:raw_image
,
only: :show
...
...
ee/spec/features/projects/issues/design_management/user_views_design_images_spec.rb
View file @
25c90127
...
@@ -16,7 +16,7 @@ describe 'Users views raw design image files' do
...
@@ -16,7 +16,7 @@ describe 'Users views raw design image files' do
end
end
it
'serves the latest design version when no ref is given'
do
it
'serves the latest design version when no ref is given'
do
visit
project_design_path
(
design
.
project
,
design
)
visit
project_design_
management_designs_raw_image_
path
(
design
.
project
,
design
)
expect
(
response_headers
[
Gitlab
::
Workhorse
::
SEND_DATA_HEADER
]).
to
eq
(
expect
(
response_headers
[
Gitlab
::
Workhorse
::
SEND_DATA_HEADER
]).
to
eq
(
workhorse_data_header_for_version
(
oldest_version
.
sha
)
workhorse_data_header_for_version
(
oldest_version
.
sha
)
...
@@ -24,7 +24,7 @@ describe 'Users views raw design image files' do
...
@@ -24,7 +24,7 @@ describe 'Users views raw design image files' do
end
end
it
'serves the correct design version when a ref is given'
do
it
'serves the correct design version when a ref is given'
do
visit
project_design_path
(
design
.
project
,
design
,
oldest_version
.
sha
)
visit
project_design_
management_designs_raw_image_
path
(
design
.
project
,
design
,
oldest_version
.
sha
)
expect
(
response_headers
[
Gitlab
::
Workhorse
::
SEND_DATA_HEADER
]).
to
eq
(
expect
(
response_headers
[
Gitlab
::
Workhorse
::
SEND_DATA_HEADER
]).
to
eq
(
workhorse_data_header_for_version
(
oldest_version
.
sha
)
workhorse_data_header_for_version
(
oldest_version
.
sha
)
...
...
ee/spec/routing/project_routing_spec.rb
View file @
25c90127
...
@@ -57,15 +57,6 @@ describe 'EE-specific project routing' do
...
@@ -57,15 +57,6 @@ describe 'EE-specific project routing' do
end
end
end
end
describe
'Deprecated Design management legacy paths'
do
include
RSpec
::
Rails
::
RequestExampleGroup
it
'redirects to canonical path'
do
expect
(
get
(
'/gitlab/gitlabhq/-/designs/1/c6f00aa50b80887ada30a6fe517670be9f8f9ece'
)).
to
redirect_to
(
'/gitlab/gitlabhq/-/design_management/designs/1/c6f00aa50b80887ada30a6fe517670be9f8f9ece/raw_image'
)
expect
(
get
(
'/gitlab/gitlabhq/-/designs/1'
)).
to
redirect_to
(
'/gitlab/gitlabhq/-/design_management/designs/1/raw_image'
)
end
end
describe
Projects
::
AutocompleteSourcesController
,
'routing'
do
describe
Projects
::
AutocompleteSourcesController
,
'routing'
do
it
"to #epics"
do
it
"to #epics"
do
expect
(
get
(
"/gitlab/gitlabhq/-/autocomplete_sources/epics"
)).
to
route_to
(
"projects/autocomplete_sources#epics"
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
expect
(
get
(
"/gitlab/gitlabhq/-/autocomplete_sources/epics"
)).
to
route_to
(
"projects/autocomplete_sources#epics"
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
...
...
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