Refactor GCP Client#user_agent_header to use #tap
This commit is contained in:
parent
68b43f4d9c
commit
bb80d439f4
|
|
@ -84,9 +84,9 @@ module GoogleApi
|
|||
end
|
||||
|
||||
def user_agent_header
|
||||
options = Google::Apis::RequestOptions.new
|
||||
options.header = { 'User-Agent': "GitLab/#{Gitlab::VERSION.match('(\d+\.\d+)').captures.first} (GPN:GitLab;)" }
|
||||
options
|
||||
Google::Apis::RequestOptions.new.tap do |options|
|
||||
options.header = { 'User-Agent': "GitLab/#{Gitlab::VERSION.match('(\d+\.\d+)').captures.first} (GPN:GitLab;)" }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue