Skip to content

A platform for community discussion. Free, open, simple.

Fix warnings about already initialized constants

Gerhard Schlager6ddf7fcd1f39
diff --git a/lib/auth/facebook_authenticator.rb b/lib/auth/facebook_authenticator.rb
index f26ce628104..01d86c76842 100644
--- a/lib/auth/facebook_authenticator.rb
+++ b/lib/auth/facebook_authenticator.rb
@@ -1,6 +1,6 @@
class Auth::FacebookAuthenticator < Auth::Authenticator
- AVATAR_SIZE = 480
+ AVATAR_SIZE ||= 480
def name
"facebook"
diff --git a/lib/discourse.rb b/lib/discourse.rb
index 50793e334c7..79be1a74644 100644
--- a/lib/discourse.rb
+++ b/lib/discourse.rb
@@ -211,7 +211,7 @@ module Discourse
end
end
- BUILTIN_AUTH = [
+ BUILTIN_AUTH ||= [
Auth::AuthProvider.new(authenticator: Auth::FacebookAuthenticator.new, frame_width: 580, frame_height: 400),
Auth::AuthProvider.new(authenticator: Auth::GoogleOAuth2Authenticator.new, frame_width: 850, frame_height: 500),
Auth::AuthProvider.new(authenticator: Auth::OpenIdAuthenticator.new("yahoo", "https://me.yahoo.com", 'enable_yahoo_logins', trusted: true)),