diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-04-24 16:43:41 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-04-24 19:32:06 +0200 |
commit | 575302c1b94984cc8e96e71b8ab606e69283ec67 (patch) | |
tree | 3bfe467cffc2fd084e2ec604dc770a5c050879e3 | |
parent | 17ffd9987310b7f944d0fef7519fc9e22572ebc5 (diff) | |
download | gitlab-ce-575302c1b94984cc8e96e71b8ab606e69283ec67.tar.gz |
Do not preload settings
-rw-r--r-- | config/initializers/1_settings.rb | 2 | ||||
-rw-r--r-- | config/initializers/2_gitlab.rb | 1 | ||||
-rw-r--r-- | config/settings.rb (renamed from lib/settings.rb) | 0 | ||||
-rw-r--r-- | lib/gitlab.rb | 1 | ||||
-rw-r--r-- | spec/fast_spec_helper.rb | 3 |
5 files changed, 4 insertions, 3 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 9b00ae459a3..575f27d1ea9 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -1,4 +1,4 @@ -require_dependency File.expand_path('../../lib/gitlab', __dir__) # Load Gitlab as soon as possible +require_relative '../settings' # Default settings Settings['ldap'] ||= Settingslogic.new({}) diff --git a/config/initializers/2_gitlab.rb b/config/initializers/2_gitlab.rb new file mode 100644 index 00000000000..1d2ab606a63 --- /dev/null +++ b/config/initializers/2_gitlab.rb @@ -0,0 +1 @@ +require_relative '../../lib/gitlab' diff --git a/lib/settings.rb b/config/settings.rb index 69d637761ea..69d637761ea 100644 --- a/lib/settings.rb +++ b/config/settings.rb diff --git a/lib/gitlab.rb b/lib/gitlab.rb index 0a167104bf4..9c9368a4f8d 100644 --- a/lib/gitlab.rb +++ b/lib/gitlab.rb @@ -1,4 +1,3 @@ -require_dependency 'settings' require_dependency 'gitlab/popen' module Gitlab diff --git a/spec/fast_spec_helper.rb b/spec/fast_spec_helper.rb index f28268b0754..978113a08a4 100644 --- a/spec/fast_spec_helper.rb +++ b/spec/fast_spec_helper.rb @@ -9,7 +9,8 @@ unless Object.respond_to?(:require_dependency) end end -# Defines Gitlab and Gitlab.config which are at the center of the app +# Defines Settings and Gitlab.config which are at the center of the app +require_relative '../config/settings' require_relative '../lib/gitlab' unless defined?(Gitlab.config) require_relative 'support/rspec' |