From 51dd6e051414b07beccbf6cbd3decdb49926858f Mon Sep 17 00:00:00 2001 From: sjljrvis Date: Tue, 29 Dec 2020 19:04:15 +0530 Subject: [PATCH] [Fixing] User agent in BQ constructor --- lib/big_query/client.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/big_query/client.rb b/lib/big_query/client.rb index 7849653..7601940 100644 --- a/lib/big_query/client.rb +++ b/lib/big_query/client.rb @@ -15,8 +15,10 @@ class Client def initialize(opts = {}) @client = Google::APIClient.new( :application_name => 'BigQuery ruby app', - :application_version => BigQuery::VERSION + :application_version => BigQuery::VERSION, ) + @client.user_agent = @client.user_agent.gsub("\n", "") + key = Google::APIClient::PKCS12.load_key(File.open(opts['key'], 'rb'), "notasecret"