Commit 0e7df7e4 authored by Imre Farkas's avatar Imre Farkas

Merge branch '257438-group-knowledge-deprecation-warnings' into 'master'

Fix Ruby 2.7 deprecation warnings in design management and wikis

See merge request gitlab-org/gitlab!44043
parents dce382cc c6963641
...@@ -28,7 +28,7 @@ module Mutations ...@@ -28,7 +28,7 @@ module Mutations
'body or position arguments are required' 'body or position arguments are required'
end end
super(args) super(**args)
end end
private private
......
...@@ -22,7 +22,7 @@ module DesignManagement ...@@ -22,7 +22,7 @@ module DesignManagement
end end
def self.instantiate(attrs) def self.instantiate(attrs)
new(attrs).tap { |obj| obj.validate! } new(**attrs).tap { |obj| obj.validate! }
end end
# The ID, needed by GraphQL types and as part of the Lazy-fetch # The ID, needed by GraphQL types and as part of the Lazy-fetch
......
...@@ -22,7 +22,7 @@ RSpec.describe Elastic::Latest::ProjectWikiInstanceProxy do ...@@ -22,7 +22,7 @@ RSpec.describe Elastic::Latest::ProjectWikiInstanceProxy do
expect(subject.class).to receive(:elastic_search_as_wiki_page).with('foo', expected_params) expect(subject.class).to receive(:elastic_search_as_wiki_page).with('foo', expected_params)
subject.elastic_search_as_wiki_page('foo', params) subject.elastic_search_as_wiki_page('foo', **params)
end end
it 'uses provided repository_id' do it 'uses provided repository_id' do
...@@ -30,7 +30,7 @@ RSpec.describe Elastic::Latest::ProjectWikiInstanceProxy do ...@@ -30,7 +30,7 @@ RSpec.describe Elastic::Latest::ProjectWikiInstanceProxy do
expect(subject.class).to receive(:elastic_search_as_wiki_page).with('foo', params) expect(subject.class).to receive(:elastic_search_as_wiki_page).with('foo', params)
subject.elastic_search_as_wiki_page('foo', params) subject.elastic_search_as_wiki_page('foo', **params)
end end
end end
end end
...@@ -173,9 +173,9 @@ module Gitlab ...@@ -173,9 +173,9 @@ module Gitlab
gitaly_pages = gitaly_pages =
if load_content if load_content
gitaly_wiki_client.load_all_pages(params) gitaly_wiki_client.load_all_pages(**params)
else else
gitaly_wiki_client.list_all_pages(params) gitaly_wiki_client.list_all_pages(**params)
end end
gitaly_pages.map do |wiki_page, version| gitaly_pages.map do |wiki_page, version|
......
...@@ -29,7 +29,7 @@ RSpec.describe Mutations::DesignManagement::Move do ...@@ -29,7 +29,7 @@ RSpec.describe Mutations::DesignManagement::Move do
next_design: next_design&.to_global_id next_design: next_design&.to_global_id
}.compact }.compact
mutation.resolve(args) mutation.resolve(**args)
end end
shared_examples "resource not available" do shared_examples "resource not available" 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