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
'body or position arguments are required'
end
super(args)
super(**args)
end
private
......
......@@ -22,7 +22,7 @@ module DesignManagement
end
def self.instantiate(attrs)
new(attrs).tap { |obj| obj.validate! }
new(**attrs).tap { |obj| obj.validate! }
end
# The ID, needed by GraphQL types and as part of the Lazy-fetch
......
......@@ -22,7 +22,7 @@ RSpec.describe Elastic::Latest::ProjectWikiInstanceProxy do
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
it 'uses provided repository_id' do
......@@ -30,7 +30,7 @@ RSpec.describe Elastic::Latest::ProjectWikiInstanceProxy do
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
......@@ -173,9 +173,9 @@ module Gitlab
gitaly_pages =
if load_content
gitaly_wiki_client.load_all_pages(params)
gitaly_wiki_client.load_all_pages(**params)
else
gitaly_wiki_client.list_all_pages(params)
gitaly_wiki_client.list_all_pages(**params)
end
gitaly_pages.map do |wiki_page, version|
......
......@@ -29,7 +29,7 @@ RSpec.describe Mutations::DesignManagement::Move do
next_design: next_design&.to_global_id
}.compact
mutation.resolve(args)
mutation.resolve(**args)
end
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