diff options
author | Matija Čupić <matteeyah@gmail.com> | 2017-12-04 13:43:45 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2017-12-04 13:43:45 +0100 |
commit | bb80d439f4bbb37032a2ee2d35ee5eab7594de7d (patch) | |
tree | 6c5bfd4a8057a5f479a99741b42e74f40e4fc9f4 /lib/google_api | |
parent | 68b43f4d9c5dbc2d8264e5cadb7417e21ac0ed27 (diff) | |
download | gitlab-ce-bb80d439f4bbb37032a2ee2d35ee5eab7594de7d.tar.gz |
Refactor GCP Client#user_agent_header to use #tap
Diffstat (limited to 'lib/google_api')
-rw-r--r-- | lib/google_api/cloud_platform/client.rb | 6 |
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 |