Commit 57f52e00 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'kassio/ruby-2.7-importer-kwargs' into 'master'

Fix Ruby 2.7 kwargs warnings

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