Commit f3dd8217 authored by Jose Ernesto Suarez's avatar Jose Ernesto Suarez

bugfix

parent b912a808
...@@ -62,11 +62,11 @@ module Wedoops ...@@ -62,11 +62,11 @@ module Wedoops
file = Tempfile.new(user_id) file = Tempfile.new(user_id)
begin begin
file.write(@credentials_json) file.write(@credentials_json)
file.close
@credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( @credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
json_key_io: File.open(file), json_key_io: File.open(file),
scope: @scopes) scope: @scopes)
ensure ensure
file.close
file.unlink # deletes the temp file file.unlink # deletes the temp file
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment