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
db87ca07
Commit
db87ca07
authored
May 18, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable rubocop hash check for blocks
parent
4df56fc9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
config/routes/project.rb
config/routes/project.rb
+6
-0
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+1
-1
No files found.
config/routes/project.rb
View file @
db87ca07
...
@@ -247,6 +247,8 @@ constraints(ProjectUrlConstrainer.new) do
...
@@ -247,6 +247,8 @@ constraints(ProjectUrlConstrainer.new) do
end
end
end
end
# It's a block, not a hash, disabling style check for hash
# rubocop:disable Style/AlignHash
get
'/builds/:id/:action'
,
as:
'action_legacy_build'
,
get
'/builds/:id/:action'
,
as:
'action_legacy_build'
,
to:
redirect
{
|
params
,
req
|
to:
redirect
{
|
params
,
req
|
args
=
params
.
values_at
(
:namespace_id
,
:project_id
,
:id
)
args
=
params
.
values_at
(
:namespace_id
,
:project_id
,
:id
)
...
@@ -263,12 +265,16 @@ constraints(ProjectUrlConstrainer.new) do
...
@@ -263,12 +265,16 @@ constraints(ProjectUrlConstrainer.new) do
end
end
}
}
# It's a block, not a hash, disabling style check for hash
# rubocop:disable Style/AlignHash
get
'/builds/:id'
,
as:
'legacy_build'
,
get
'/builds/:id'
,
as:
'legacy_build'
,
to:
redirect
{
|
params
,
req
|
to:
redirect
{
|
params
,
req
|
Gitlab
::
Routing
.
url_helpers
.
namespace_project_job_path
(
Gitlab
::
Routing
.
url_helpers
.
namespace_project_job_path
(
params
[
:namespace_id
],
params
[
:project_id
],
params
[
:id
])
params
[
:namespace_id
],
params
[
:project_id
],
params
[
:id
])
}
}
# It's a block, not a hash, disabling style check for hash
# rubocop:disable Style/AlignHash
get
'/builds'
,
as:
'legacy_builds'
,
get
'/builds'
,
as:
'legacy_builds'
,
to:
redirect
{
|
params
,
req
|
to:
redirect
{
|
params
,
req
|
Gitlab
::
Routing
.
url_helpers
.
namespace_project_jobs_path
(
Gitlab
::
Routing
.
url_helpers
.
namespace_project_jobs_path
(
...
...
spec/features/projects/jobs_spec.rb
View file @
db87ca07
...
@@ -501,7 +501,7 @@ feature 'Jobs', :feature do
...
@@ -501,7 +501,7 @@ feature 'Jobs', :feature do
context
"when visiting old URL"
do
context
"when visiting old URL"
do
let
(
:trace_job_url
)
do
let
(
:trace_job_url
)
do
trace_namespace_project_job_path
(
project
.
namespace
,
project
,
build
,
format: :json
)
trace_namespace_project_job_path
(
project
.
namespace
,
project
,
build
,
format: :json
)
end
end
before
do
before
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