Merge branch 'rs-revert-preload-lib' into 'master'
Revert "Preload lib/" This reverts commit5511a731bc
. The original commit added this because it also enabled threadsafety, a change which was itself later reverted in66d6c80966
, but this got left behind. I don't fully understand the reasoning behind it so if I'm wrong, please tell me. My reasoning for reverting it is that it messes with Rails' (and by extension Spring's) class reloading during development. When I was working in `lib/gitlab/markdown` and had to stop and restart the server every time I made a change, I didn't know it at the time, but this was why. That was a huge pain point. If it's needed for production perhaps we could add a `if Rails.env.production?` clause around it so that it doesn't mess with development. See merge request !1758
This commit is contained in:
commit
24d139ba97
|
@ -1,3 +1,5 @@
|
|||
require 'gitlab' # Load lib/gitlab.rb as soon as possible
|
||||
|
||||
class Settings < Settingslogic
|
||||
source ENV.fetch('GITLAB_CONFIG') { "#{Rails.root}/config/gitlab.yml" }
|
||||
namespace Rails.env
|
||||
|
|
|
@ -6,8 +6,3 @@ module Gitlab
|
|||
Settings
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Load all libs for threadsafety
|
||||
#
|
||||
Dir["#{Rails.root}/lib/**/*.rb"].each { |file| require file }
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
require 'gitlab/git'
|
||||
|
||||
module Gitlab
|
||||
autoload :Satellite, 'gitlab/satellite/satellite'
|
||||
end
|
|
@ -1,4 +1,4 @@
|
|||
require 'gitlab/oauth/user'
|
||||
require 'gitlab/o_auth/user'
|
||||
|
||||
# LDAP extension for User model
|
||||
#
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
module Gitlab
|
||||
module Satellite
|
||||
autoload :DeleteFileAction, 'gitlab/satellite/files/delete_file_action'
|
||||
autoload :EditFileAction, 'gitlab/satellite/files/edit_file_action'
|
||||
autoload :FileAction, 'gitlab/satellite/files/file_action'
|
||||
autoload :NewFileAction, 'gitlab/satellite/files/new_file_action'
|
||||
|
||||
class CheckoutFailed < StandardError; end
|
||||
class CommitFailed < StandardError; end
|
||||
class PushFailed < StandardError; end
|
||||
|
|
Loading…
Reference in New Issue