diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-19 00:09:27 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-19 00:09:27 +0000 |
commit | 77d15aff0eaa7dd8a8ce988436a502c5ab6bb55b (patch) | |
tree | 7e5a828e67a98dbb3b7eb1f73b569d15bbcf0f45 /config/settings.rb | |
parent | 8b5c2a4525819c6b18f422b4baa0f6568286909b (diff) | |
download | gitlab-ce-77d15aff0eaa7dd8a8ce988436a502c5ab6bb55b.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/settings.rb')
-rw-r--r-- | config/settings.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/config/settings.rb b/config/settings.rb index a9e91ce22d7..144a068ef2a 100644 --- a/config/settings.rb +++ b/config/settings.rb @@ -3,6 +3,12 @@ require 'settingslogic' require 'digest/md5' +# We can not use `Rails.root` here, as this file might be loaded without the +# full Rails environment being loaded. We can not use `require_relative` either, +# as Rails uses `load` for `require_dependency` (used when loading the Rails +# environment). This could then lead to this file being loaded twice. +require_dependency File.expand_path('../lib/gitlab', __dir__) + class Settings < Settingslogic source ENV.fetch('GITLAB_CONFIG') { Pathname.new(File.expand_path('..', __dir__)).join('config/gitlab.yml') } namespace ENV.fetch('GITLAB_ENV') { Rails.env } |