From f5238bbf12854667a308e634a7d6654754417a82 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 15 Aug 2013 14:19:37 -0700 Subject: [PATCH] auth: perserve original option param --- lib/google/api_client/auth/compute_service_account.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/google/api_client/auth/compute_service_account.rb b/lib/google/api_client/auth/compute_service_account.rb index 085d81bbaf..3f512f9a03 100644 --- a/lib/google/api_client/auth/compute_service_account.rb +++ b/lib/google/api_client/auth/compute_service_account.rb @@ -19,8 +19,8 @@ module Google class APIClient class ComputeServiceAccount < Signet::OAuth2::Client def fetch_access_token(options={}) - options[:connection] ||= Faraday.default_connection - response = options[:connection].get 'http://metadata/computeMetadata/v1beta1/instance/service-accounts/default/token' + connection = options[:connection] || Faraday.default_connection + response = connection.get 'http://metadata/computeMetadata/v1beta1/instance/service-accounts/default/token' Signet::OAuth2.parse_json_credentials(response.body) end end -- 2.30.2