diff --git a/lib/google/api_client/auth/file_storage.rb b/lib/google/api_client/auth/file_storage.rb index 1562bedf8..b3d017166 100644 --- a/lib/google/api_client/auth/file_storage.rb +++ b/lib/google/api_client/auth/file_storage.rb @@ -29,12 +29,10 @@ module Google # class FileStorage - attr_accessor :storage, - :path + attr_accessor :storage def initialize(path) - @path = path - store = Google::APIClient::FileStore.new(@path) + store = Google::APIClient::FileStore.new(path) @storage = Google::APIClient::Storage.new(store) @storage.authorize end @@ -54,8 +52,7 @@ module Google # Optional authorization instance. If not provided, the authorization # already associated with this instance will be written. def write_credentials(auth=nil) - self.authorization = auth unless auth.nil? - storage.write_credentials(self.authorization) + storage.write_credentials(auth) end end end diff --git a/lib/google/api_client/auth/installed_app.rb b/lib/google/api_client/auth/installed_app.rb index 1fd262e7c..bdbb655d5 100644 --- a/lib/google/api_client/auth/installed_app.rb +++ b/lib/google/api_client/auth/installed_app.rb @@ -32,12 +32,12 @@ module Google # client.authorization = flow.authorize # class InstalledAppFlow - + RESPONSE_BODY = <<-HTML