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 class OmniauthKerberosSpnegoController < ApplicationController
include KerberosSpnegoHelper include KerberosSpnegoHelper
......
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]
......
...@@ -142,9 +142,9 @@ if Gitlab::Metrics.enabled? ...@@ -142,9 +142,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)
......
...@@ -25,11 +25,11 @@ end ...@@ -25,11 +25,11 @@ end
if Gitlab.config.omniauth.enabled if Gitlab.config.omniauth.enabled
provider_names = Gitlab.config.omniauth.providers.map(&:name) provider_names = Gitlab.config.omniauth.providers.map(&:name)
require 'omniauth-kerberos' if provider_names.include?('kerberos') 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 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
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
......
require 'spec_helper' require 'spec_helper'
require 'omniauth/strategies/kerberos_spnego'
describe OmniAuth::Strategies::KerberosSpnego do describe OmniAuth::Strategies::KerberosSpnego do
subject { described_class.new(:app) } subject { described_class.new(:app) }
......
require 'spec_helper' 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(:path) { '/users/auth/kerberos_spnego/negotiate' }
let(:controller_class) { OmniauthKerberosSpnegoController } 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