summaryrefslogtreecommitdiff
path: root/config/application.rb
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/application.rb
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/application.rb')
-rw-r--r--config/application.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/config/application.rb b/config/application.rb
index b33e57f5fcd..cba80f38f1f 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -1,13 +1,13 @@
require File.expand_path('../boot', __FILE__)
require 'rails/all'
-require 'devise'
-I18n.config.enforce_available_locales = false
+
Bundler.require(:default, Rails.env)
-require_relative '../lib/gitlab/redis'
module Gitlab
class Application < Rails::Application
+ require_dependency Rails.root.join('lib/gitlab/redis')
+
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
@@ -21,10 +21,10 @@ module Gitlab
# This is a nice reference article on autoloading/eager loading:
# http://blog.arkency.com/2014/11/dont-forget-about-eager-load-when-extending-autoload
config.eager_load_paths.push(*%W(#{config.root}/lib
+ #{config.root}/app/models/ci
#{config.root}/app/models/hooks
- #{config.root}/app/models/concerns
- #{config.root}/app/models/project_services
- #{config.root}/app/models/members))
+ #{config.root}/app/models/members
+ #{config.root}/app/models/project_services))
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.