Skip to content

Commit

Permalink
Merge 15fbf92 into dc12124
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilkie committed Jun 26, 2015
2 parents dc12124 + 15fbf92 commit ad9821b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/googleauth/user_refresh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ def initialize(options = {})
json_key_io, scope = options.values_at(:json_key_io, :scope)
user_creds = self.class.read_json_key(json_key_io) if json_key_io
user_creds ||= {
client_id: ENV[CredentialsLoader::CLIENT_ID_VAR],
client_secret: ENV[CredentialsLoader::CLIENT_SECRET_VAR],
refresh_token: ENV[CredentialsLoader::REFRESH_TOKEN_VAR]
'client_id' => ENV[CredentialsLoader::CLIENT_ID_VAR],
'client_secret' => ENV[CredentialsLoader::CLIENT_SECRET_VAR],
'refresh_token' => ENV[CredentialsLoader::REFRESH_TOKEN_VAR]
}

super(token_credential_uri: TOKEN_CRED_URI,
Expand Down
3 changes: 3 additions & 0 deletions spec/googleauth/user_refresh_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ def cred_json_text(missing = nil)
ENV[REFRESH_TOKEN_VAR] = cred_json[:refresh_token]
ENV[ACCOUNT_TYPE_VAR] = cred_json[:type]
expect(@clz.from_env(@scope)).to_not be_nil
expect(subject.client_id).to eq(cred_json[:client_id])
expect(subject.client_secret).to eq(cred_json[:client_secret])
expect(subject.refresh_token).to eq(cred_json[:refresh_token])
end
end

Expand Down

0 comments on commit ad9821b

Please sign in to comment.