lib/jets/booter.rb in jets-1.0.16 vs lib/jets/booter.rb in jets-1.0.17
- old
+ new
@@ -8,11 +8,27 @@
confirm_jets_project!
require_bundle_gems
Jets::Dotenv.load!
Jets.application # triggers application.setup! # autoload_paths, routes, etc
setup_db
+ app_initializers
+ turbine_initializers
@booted = true
+ end
+
+ def turbine_initializers
+ Jets::Turbine.subclasses.each do |subclass|
+ subclass.initializers.each do |label, block|
+ block.call(Jets.application)
+ end
+ end
+ end
+
+ def app_initializers
+ Dir.glob("#{Jets.root}config/initializers/**/*").each do |path|
+ load path
+ end
end
# AWS Lambda for natively supported languages prints to CloudWatch instead of
# mungling up the response. We'll redirect stdout to stderr to mimic AWS Lambda
# behavior.