[deploy] Fix URL.domain in development by correctly loading authentication providers (#10296)
This commit is contained in:
parent
0fba78a611
commit
b90bbdd87a
3 changed files with 11 additions and 10 deletions
|
|
@ -1,3 +1,12 @@
|
|||
# We require all authentication modules to make sure providers
|
||||
# are correctly preloaded and ready to be used at this point as the loading
|
||||
# order is important
|
||||
require_dependency Rails.root.join("app/services/authentication/providers/provider.rb")
|
||||
|
||||
Dir[Rails.root.join("app/services/authentication/**/*.rb")].each do |f|
|
||||
require_dependency(f)
|
||||
end
|
||||
|
||||
module Authentication
|
||||
module Providers
|
||||
# Retrieves a provider that is both available and enabled
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ module PracticalDeveloper
|
|||
config.eager_load_paths += Dir["#{config.root}/lib"]
|
||||
|
||||
# Middlewares folder is not otherwise autorequired.
|
||||
Dir["./app/middlewares/*.rb"].sort.each do |file|
|
||||
require file
|
||||
Dir["#{config.root}/app/middlewares/**/*.rb"].each do |file|
|
||||
require_dependency(file)
|
||||
end
|
||||
|
||||
config.active_job.queue_adapter = :sidekiq
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
Rails.application.config.to_prepare do
|
||||
# We require all authentication modules to make sure providers
|
||||
# are correctly preloaded and ready to be used at this point as the loading
|
||||
# order is important
|
||||
Dir[Rails.root.join("app/services/authentication/**/*.rb")].each do |f|
|
||||
require_dependency(f)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue