diff options
author | Matija Čupić <matteeyah@gmail.com> | 2017-12-04 01:59:29 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2017-12-04 01:59:29 +0100 |
commit | 04c6d102616b48c95b09656efc720c7dfdc99d8a (patch) | |
tree | f1d00c50ada38750cdeee719ca22697406d7b240 /lib | |
parent | 50c8bd6350ebfd8d35deb2a1b41eb36e193d1a14 (diff) | |
download | gitlab-ce-04c6d102616b48c95b09656efc720c7dfdc99d8a.tar.gz |
Use RequestOptions in GCP Client user_agent_header
Diffstat (limited to 'lib')
-rw-r--r-- | lib/google_api/cloud_platform/client.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/google_api/cloud_platform/client.rb b/lib/google_api/cloud_platform/client.rb index 615cd7dc60a..15401057903 100644 --- a/lib/google_api/cloud_platform/client.rb +++ b/lib/google_api/cloud_platform/client.rb @@ -84,7 +84,9 @@ module GoogleApi end def user_agent_header - { 'User-Agent': "GitLab/#{Gitlab::VERSION.match('(\d+\.\d+)').captures.first} (GPN:GitLab;)" } + options = Google::Apis::RequestOptions.new + options.header = { 'User-Agent': "GitLab/#{Gitlab::VERSION.match('(\d+\.\d+)').captures.first} (GPN:GitLab;)" } + options end end end |