Commit db87ca07 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Disable rubocop hash check for blocks

parent 4df56fc9
......@@ -247,6 +247,8 @@ 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/:action', as: 'action_legacy_build',
to: redirect { |params, req|
args = params.values_at(:namespace_id, :project_id, :id)
......@@ -263,12 +265,16 @@ constraints(ProjectUrlConstrainer.new) do
end
}
# It's a block, not a hash, disabling style check for hash
# rubocop:disable Style/AlignHash
get '/builds/:id', as: 'legacy_build',
to: redirect { |params, req|
Gitlab::Routing.url_helpers.namespace_project_job_path(
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',
to: redirect { |params, req|
Gitlab::Routing.url_helpers.namespace_project_jobs_path(
......
......@@ -501,7 +501,7 @@ feature 'Jobs', :feature do
context "when visiting old 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
before do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment