Commit c6963641 authored by Markus Koller's avatar Markus Koller

Fix Ruby 2.7 deprecation warnings in design management and wikis

Part of https://gitlab.com/gitlab-org/gitlab/-/issues/257438
parent 5f5ff212
......@@ -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