remove some warnings with already declared constants

This commit is contained in:
Régis Hanol 2017-06-22 12:55:58 +02:00
parent 94a0d43f31
commit a916f6b0c8
2 changed files with 4 additions and 4 deletions

View File

@ -6,12 +6,12 @@ class GlobalSetting
end end
end end
VALID_SECRET_KEY = /^[0-9a-f]{128}$/ VALID_SECRET_KEY ||= /^[0-9a-f]{128}$/
# this is named SECRET_TOKEN as opposed to SECRET_KEY_BASE # this is named SECRET_TOKEN as opposed to SECRET_KEY_BASE
# for legacy reasons # for legacy reasons
REDIS_SECRET_KEY = 'SECRET_TOKEN' REDIS_SECRET_KEY ||= 'SECRET_TOKEN'
REDIS_VALIDATE_SECONDS = 30 REDIS_VALIDATE_SECONDS ||= 30
# In Rails secret_key_base is used to encrypt the cookie store # In Rails secret_key_base is used to encrypt the cookie store
# the cookie store contains session data # the cookie store contains session data

View File

@ -223,7 +223,7 @@ class BadgeGranter
{errors: e.message} {errors: e.message}
end end
MAX_ITEMS_FOR_DELTA = 200 MAX_ITEMS_FOR_DELTA ||= 200
def self.backfill(badge, opts=nil) def self.backfill(badge, opts=nil)
return unless SiteSetting.enable_badges return unless SiteSetting.enable_badges
return unless badge.enabled return unless badge.enabled