From 8d80a5d97eeb1fd2bf066a74586401060a5b7d7a Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 7 Mar 2017 16:00:51 -0500 Subject: [PATCH] add some explicit scoping to help avoid erratic failure in test --- lib/auth/google_oauth2_authenticator.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/auth/google_oauth2_authenticator.rb b/lib/auth/google_oauth2_authenticator.rb index 9b01a80681d..2dfc69da5cd 100644 --- a/lib/auth/google_oauth2_authenticator.rb +++ b/lib/auth/google_oauth2_authenticator.rb @@ -8,20 +8,20 @@ class Auth::GoogleOAuth2Authenticator < Auth::Authenticator session_info = parse_hash(auth_hash) google_hash = session_info[:google] - result = Auth::Result.new + result = ::Auth::Result.new result.email = session_info[:email] result.email_valid = session_info[:email_valid] result.name = session_info[:name] result.extra_data = google_hash - user_info = GoogleUserInfo.find_by(google_user_id: google_hash[:google_user_id]) + user_info = ::GoogleUserInfo.find_by(google_user_id: google_hash[:google_user_id]) result.user = user_info.try(:user) if !result.user && !result.email.blank? && result.email_valid result.user = User.find_by_email(result.email) if result.user - GoogleUserInfo.create({user_id: result.user.id}.merge(google_hash)) + ::GoogleUserInfo.create({user_id: result.user.id}.merge(google_hash)) end end