From 6ddf7fcd1f39820272c848bb32a4d950f4e6bd2e Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Thu, 9 Aug 2018 17:29:02 +0200 Subject: [PATCH] Fix warnings about already initialized constants --- lib/auth/facebook_authenticator.rb | 2 +- lib/discourse.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/auth/facebook_authenticator.rb b/lib/auth/facebook_authenticator.rb index f26ce62810..01d86c7684 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 50793e334c..79be1a7464 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)),