Commit 596f23d6 authored by Stan Hu's avatar Stan Hu

Fix Ruby 2.7 deprecation warnings in app/controllers/import

In Ruby 3.0, positional arguments and keyword arguments will be
separated. Ruby 2.7 will warn for behaviors that will change in Ruby
3.0. In most cases, you can avoid the incompatibility by adding the
double splat operator. It explicitly specifies passing keyword arguments
instead of a Hash object.

Part of https://gitlab.com/gitlab-org/gitlab/-/issues/257438
parent 558c19ec
......@@ -136,7 +136,7 @@ class Import::FogbugzController < Import::BaseController
def verify_blocked_uri
Gitlab::UrlBlocker.validate!(
params[:uri],
{
**{
allow_localhost: allow_local_requests?,
allow_local_network: allow_local_requests?,
schemes: %w(http https)
......
......@@ -108,7 +108,7 @@ class Import::GithubController < Import::BaseController
@client ||= if Feature.enabled?(:remove_legacy_github_client)
Gitlab::GithubImport::Client.new(session[access_token_key])
else
Gitlab::LegacyGithubImport::Client.new(session[access_token_key], client_options)
Gitlab::LegacyGithubImport::Client.new(session[access_token_key], **client_options)
end
end
......
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