lib/googleauth/scope_util.rb in googleauth-0.5.1 vs lib/googleauth/scope_util.rb in googleauth-0.5.2
- old
+ new
@@ -37,11 +37,11 @@
module ScopeUtil
ALIASES = {
'email' => 'https://www.googleapis.com/auth/userinfo.email',
'profile' => 'https://www.googleapis.com/auth/userinfo.profile',
'openid' => 'https://www.googleapis.com/auth/plus.me'
- }
+ }.freeze
def self.normalize(scope)
list = as_array(scope)
list.map { |item| ALIASES[item] || item }
end
@@ -51,10 +51,10 @@
when Array
scope
when String
scope.split(' ')
else
- fail 'Invalid scope value. Must be string or array'
+ raise 'Invalid scope value. Must be string or array'
end
end
end
end
end