travis-ci/travis-core — pull request #1 by sethvargo (2011-11-27 03:18:44+00:00)
Title: updated to new oauth hash

This fixes the `User` model to look for the new hash that github is now using in it's payload. It no longer sends `user_info`, it's just called `info` now. Here's the primary difference:

def user_data_from_oauth(payload)
{
'name' => payload['user_info']['name'],
'email' => payload['user_info']['email'],
'login' => payload['user_info']['nickname'],
'github_id' => payload['uid'],
'github_oauth_token' => payload['credentials']['token']
}
end

... to ...

def user_data_from_oauth(payload)
{
'name' => payload['info']['name'],
'email' => payload['info']['email'],
'login' => payload['info']['nickname'],
'github_id' => payload['uid'],
'github_oauth_token' => payload['credentials']['token']
}
end