lib/jets/booter.rb in jets-3.0.23 vs lib/jets/booter.rb in jets-3.1.0
- old
+ new
@@ -41,11 +41,10 @@
# Shared extensions are added near the end because they require the Jets app load paths to first.
# We eager load the extensions and then use the loaded modules to extend Jets::Stack directly.
# Originally used an included hook but thats too early before app/shared/extensions is in the load_path.
def load_shared_extensions
- Jets::Autoloaders.once.preload("#{Jets.root}/app/shared/extensions")
base_path = "#{Jets.root}/app/shared/extensions"
Dir.glob("#{base_path}/**/*.rb").each do |path|
next unless File.file?(path)
class_name = path.sub("#{base_path}/", '').sub(/\.rb/,'').camelize
@@ -101,11 +100,11 @@
primary_config = primary_hash_config.configuration_hash # configuration_hash is a normal Ruby Hash
ActiveRecord::Base.establish_connection(primary_config)
end
def load_internal_turbines
- Dir.glob("#{__dir__}/internal/turbines/**/*.rb").each do |path|
- Jets::Autoloaders.once.preload(path)
+ Jets::Autoloaders.once.on_setup do
+ Jets::Mailer # only one right now
end
end
# All Turbines
def turbine_initializers