Commit 0e5d59c4 authored by Robert Speicher's avatar Robert Speicher

Merge branch '29389-fix-already-initialized-constants-ee' into 'master'

[EE] Remove explicit `require` calls, and use `require_dependency` when needed

See merge request !1413
parents 823aabf6 7543873a
require 'omniauth/strategies/kerberos_spnego'
class OmniauthKerberosSpnegoController < ApplicationController
include KerberosSpnegoHelper
......
require 'project_wiki'
class Projects::WikisController < Projects::ApplicationController
before_action :authorize_read_wiki!
before_action :authorize_create_wiki!, only: [:edit, :create, :history]
......
......@@ -142,9 +142,9 @@ if Gitlab::Metrics.enabled?
# These are manually require'd so the classes are registered properly with
# ActiveSupport.
require 'gitlab/metrics/subscribers/action_view'
require 'gitlab/metrics/subscribers/active_record'
require 'gitlab/metrics/subscribers/rails_cache'
require_dependency 'gitlab/metrics/subscribers/action_view'
require_dependency 'gitlab/metrics/subscribers/active_record'
require_dependency 'gitlab/metrics/subscribers/rails_cache'
Gitlab::Application.configure do |config|
config.middleware.use(Gitlab::Metrics::RackMiddleware)
......
......@@ -25,11 +25,11 @@ end
if Gitlab.config.omniauth.enabled
provider_names = Gitlab.config.omniauth.providers.map(&:name)
require 'omniauth-kerberos' if provider_names.include?('kerberos')
require 'omniauth/strategies/kerberos_spnego' if provider_names.include?('kerberos_spnego')
require_dependency 'omni_auth/strategies/kerberos_spnego' if provider_names.include?('kerberos_spnego')
end
module OmniAuth
module Strategies
autoload :Bitbucket, Rails.root.join('lib', 'omniauth', 'strategies', 'bitbucket')
autoload :Bitbucket, Rails.root.join('lib', 'omni_auth', 'strategies', 'bitbucket')
end
end
require 'gitlab/o_auth/user'
# LDAP extension for User model
#
# * Find or create user from omniauth.auth data
......
require 'spec_helper'
require 'omniauth/strategies/kerberos_spnego'
describe OmniAuth::Strategies::KerberosSpnego do
subject { described_class.new(:app) }
......
require 'spec_helper'
require 'omniauth/strategies/kerberos_spnego'
describe 'OmniAuth Kerberos SPNEGO', lib: true do
describe 'OmniAuth Kerberos SPNEGO' do
let(:path) { '/users/auth/kerberos_spnego/negotiate' }
let(:controller_class) { OmniauthKerberosSpnegoController }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment