summaryrefslogtreecommitdiff
path: root/config/initializers
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-04-15 17:35:40 +0200
committerRémy Coutable <remy@rymai.me>2016-05-10 11:51:19 +0200
commit5589dcf8db0daf2235158724f6b18115a9abfa42 (patch)
treef1a2a196fc0edeed55944612345fe98e936d933c /config/initializers
parent6da3388569b3bf31ac72663a4c13dba83d064356 (diff)
downloadgitlab-ce-5589dcf8db0daf2235158724f6b18115a9abfa42.tar.gz
Fix a few places where autoloading would fail
- Fix naming of API::CommitStatuses - Ensure we use require_dependency instead of require - Ensure the namespace is right in lib/api/api.rb, otherwise, we might require Grape::API::Helpers which defines the `#params` method. This is to avoid requiring a file multiple times and getting an "Already initialized constant" error. Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/1_settings.rb2
-rw-r--r--config/initializers/5_backend.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 8db2c05fe45..23c8cea038a 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -1,4 +1,4 @@
-require 'gitlab' # Load lib/gitlab.rb as soon as possible
+require_dependency Rails.root.join('lib/gitlab') # Load Gitlab as soon as possible
class Settings < Settingslogic
source ENV.fetch('GITLAB_CONFIG') { "#{Rails.root}/config/gitlab.yml" }
diff --git a/config/initializers/5_backend.rb b/config/initializers/5_backend.rb
index 80d641d73a3..e026151a032 100644
--- a/config/initializers/5_backend.rb
+++ b/config/initializers/5_backend.rb
@@ -1,11 +1,11 @@
# GIT over HTTP
-require Rails.root.join("lib", "gitlab", "backend", "grack_auth")
+require_dependency Rails.root.join('lib/gitlab/backend/grack_auth')
# GIT over SSH
-require Rails.root.join("lib", "gitlab", "backend", "shell")
+require_dependency Rails.root.join('lib/gitlab/backend/shell')
# GitLab shell adapter
-require Rails.root.join("lib", "gitlab", "backend", "shell_adapter")
+require_dependency Rails.root.join('lib/gitlab/backend/shell_adapter')
required_version = Gitlab::VersionInfo.parse(Gitlab::Shell.version_required)
current_version = Gitlab::VersionInfo.parse(Gitlab::Shell.new.version)