X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/9a9b045372a6f48420a9a6dacfde52c34ab7abce..ca5de5b4e01297b07ce3a9db45e908f15f7cda11:/lib/auth.rb diff --git a/lib/auth.rb b/lib/auth.rb index 636173928..b00df09d0 100644 --- a/lib/auth.rb +++ b/lib/auth.rb @@ -1,6 +1,7 @@ module Auth - PROVIDERS = { "None" => "", "OpenID" => "openid" } - PROVIDERS["Google"] = "google" if defined?(GOOGLE_AUTH_ID) - PROVIDERS["Facebook"] = "facebook" if defined?(FACEBOOK_AUTH_ID) - PROVIDERS["Windows Live"] = "windowslive" if defined?(WINDOWSLIVE_AUTH_ID) + PROVIDERS = { "None" => "", "OpenID" => "openid" }.tap do |providers| + providers["Google"] = "google" if defined?(GOOGLE_AUTH_ID) + providers["Facebook"] = "facebook" if defined?(FACEBOOK_AUTH_ID) + providers["Windows Live"] = "windowslive" if defined?(WINDOWSLIVE_AUTH_ID) + end.freeze end