Commit dd711aa1 authored by Kassio Borges's avatar Kassio Borges

Fix Ruby 2.7 kwargs warnings

parent 3803fff4
......@@ -36,7 +36,7 @@ module Gitlab
}
end
@client = Client.new(credentials[:user], opts)
@client = Client.new(credentials[:user], **opts)
end
def execute
......
......@@ -65,8 +65,8 @@ module Gitlab
protected_uri_with_hostname
end
def blocked_url?(*args)
validate!(*args)
def blocked_url?(url, **kwargs)
validate!(url, **kwargs)
false
rescue BlockedUrlError
......
......@@ -12,7 +12,7 @@ RSpec.describe Gitlab::GithubImport::Importer::LfsObjectImporter do
}
end
let(:lfs_download_object) { LfsDownloadObject.new(lfs_attributes) }
let(:lfs_download_object) { LfsDownloadObject.new(**lfs_attributes) }
let(:github_lfs_object) { Gitlab::GithubImport::Representation::LfsObject.new(lfs_attributes) }
let(:importer) { described_class.new(github_lfs_object, project, nil) }
......
......@@ -15,7 +15,7 @@ RSpec.describe Gitlab::GithubImport::Importer::LfsObjectsImporter do
}
end
let(:lfs_download_object) { LfsDownloadObject.new(lfs_attributes) }
let(:lfs_download_object) { LfsDownloadObject.new(**lfs_attributes) }
describe '#parallel?' do
it 'returns true when running in parallel mode' do
......
......@@ -11,7 +11,7 @@ RSpec.describe Gitlab::JiraImport do
let_it_be(:project, reload: true) { create(:project) }
let(:additional_params) { {} }
subject { described_class.validate_project_settings!(project, additional_params) }
subject { described_class.validate_project_settings!(project, **additional_params) }
shared_examples 'raise Jira import error' do |message|
it 'returns error' do
......
......@@ -274,7 +274,7 @@ RSpec.describe Gitlab::LegacyGithubImport::Importer do
allow(project).to receive(:import_data).and_return(double(credentials: credentials))
expect(Gitlab::LegacyGithubImport::Client).to receive(:new).with(
credentials[:user],
{}
**{}
)
subject.client
......
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