summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/google_api/cloud_platform/client.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/google_api/cloud_platform/client.rb b/lib/google_api/cloud_platform/client.rb
index 36be6b7e97a..b0563fb2d69 100644
--- a/lib/google_api/cloud_platform/client.rb
+++ b/lib/google_api/cloud_platform/client.rb
@@ -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