Merge branch '29389-fix-already-initialized-constants' into 'master'
Remove explicit `require` calls, and use `require_dependency` when needed Closes #29389 See merge request !9899
This commit is contained in:
commit
bdc1a55ede
5 changed files with 6 additions and 13 deletions
|
@ -1,5 +1,3 @@
|
||||||
require 'project_wiki'
|
|
||||||
|
|
||||||
class Projects::WikisController < Projects::ApplicationController
|
class Projects::WikisController < Projects::ApplicationController
|
||||||
before_action :authorize_read_wiki!
|
before_action :authorize_read_wiki!
|
||||||
before_action :authorize_create_wiki!, only: [:edit, :create, :history]
|
before_action :authorize_create_wiki!, only: [:edit, :create, :history]
|
||||||
|
|
|
@ -124,9 +124,9 @@ if Gitlab::Metrics.enabled?
|
||||||
|
|
||||||
# These are manually require'd so the classes are registered properly with
|
# These are manually require'd so the classes are registered properly with
|
||||||
# ActiveSupport.
|
# ActiveSupport.
|
||||||
require 'gitlab/metrics/subscribers/action_view'
|
require_dependency 'gitlab/metrics/subscribers/action_view'
|
||||||
require 'gitlab/metrics/subscribers/active_record'
|
require_dependency 'gitlab/metrics/subscribers/active_record'
|
||||||
require 'gitlab/metrics/subscribers/rails_cache'
|
require_dependency 'gitlab/metrics/subscribers/rails_cache'
|
||||||
|
|
||||||
Gitlab::Application.configure do |config|
|
Gitlab::Application.configure do |config|
|
||||||
config.middleware.use(Gitlab::Metrics::RackMiddleware)
|
config.middleware.use(Gitlab::Metrics::RackMiddleware)
|
||||||
|
|
|
@ -20,15 +20,12 @@ OmniAuth.config.before_request_phase do |env|
|
||||||
end
|
end
|
||||||
|
|
||||||
if Gitlab.config.omniauth.enabled
|
if Gitlab.config.omniauth.enabled
|
||||||
Gitlab.config.omniauth.providers.each do |provider|
|
provider_names = Gitlab.config.omniauth.providers.map(&:name)
|
||||||
if provider['name'] == 'kerberos'
|
require 'omniauth-kerberos' if provider_names.include?('kerberos')
|
||||||
require 'omniauth-kerberos'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
module OmniAuth
|
module OmniAuth
|
||||||
module Strategies
|
module Strategies
|
||||||
autoload :Bitbucket, Rails.root.join('lib', 'omniauth', 'strategies', 'bitbucket')
|
autoload :Bitbucket, Rails.root.join('lib', 'omni_auth', 'strategies', 'bitbucket')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
require 'gitlab/o_auth/user'
|
|
||||||
|
|
||||||
# LDAP extension for User model
|
# LDAP extension for User model
|
||||||
#
|
#
|
||||||
# * Find or create user from omniauth.auth data
|
# * Find or create user from omniauth.auth data
|
||||||
|
|
Loading…
Reference in a new issue