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
114afb00
Commit
114afb00
authored
Jun 18, 2021
by
Piotr Skorupa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add old usage_ping routes for backwards compatibility
parent
6e950edd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
config/routes/project.rb
config/routes/project.rb
+6
-0
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+10
-0
No files found.
config/routes/project.rb
View file @
114afb00
...
@@ -547,6 +547,12 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
...
@@ -547,6 +547,12 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end
end
end
end
# TODO: Deprecated. This should be removed in 14.2.
scope
:usage_ping
,
controller: :service_ping
do
post
:web_ide_clientside_preview
# rubocop:todo Cop/PutProjectRoutesUnderScope
post
:web_ide_pipelines_count
# rubocop:todo Cop/PutProjectRoutesUnderScope
end
scope
:service_ping
,
controller: :service_ping
do
scope
:service_ping
,
controller: :service_ping
do
post
:web_ide_clientside_preview
# rubocop:todo Cop/PutProjectRoutesUnderScope
post
:web_ide_clientside_preview
# rubocop:todo Cop/PutProjectRoutesUnderScope
post
:web_ide_pipelines_count
# rubocop:todo Cop/PutProjectRoutesUnderScope
post
:web_ide_pipelines_count
# rubocop:todo Cop/PutProjectRoutesUnderScope
...
...
spec/routing/project_routing_spec.rb
View file @
114afb00
...
@@ -771,6 +771,16 @@ RSpec.describe 'project routing' do
...
@@ -771,6 +771,16 @@ RSpec.describe 'project routing' do
end
end
describe
Projects
::
ServicePingController
,
'routing'
do
describe
Projects
::
ServicePingController
,
'routing'
do
describe
'deprecated routing'
do
it
'routes to service_ping#web_ide_clientside_preview'
do
expect
(
post
(
'/gitlab/gitlabhq/usage_ping/web_ide_clientside_preview'
)).
to
route_to
(
'projects/service_ping#web_ide_clientside_preview'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
end
it
'routes to service_ping#web_ide_pipelines_count'
do
expect
(
post
(
'/gitlab/gitlabhq/usage_ping/web_ide_pipelines_count'
)).
to
route_to
(
'projects/service_ping#web_ide_pipelines_count'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
end
end
it
'routes to service_ping#web_ide_clientside_preview'
do
it
'routes to service_ping#web_ide_clientside_preview'
do
expect
(
post
(
'/gitlab/gitlabhq/service_ping/web_ide_clientside_preview'
)).
to
route_to
(
'projects/service_ping#web_ide_clientside_preview'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
expect
(
post
(
'/gitlab/gitlabhq/service_ping/web_ide_clientside_preview'
)).
to
route_to
(
'projects/service_ping#web_ide_clientside_preview'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
end
end
...
...
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