lib/ductr.rb in ductr-0.1.2 vs lib/ductr.rb in ductr-0.2.0
- old
+ new
@@ -131,13 +131,13 @@
# Application auto loading
#
if File.directory?("#{pwd = Dir.pwd}/app")
Zeitwerk::Loader.new.tap do |loader|
loader.push_dir "#{pwd}/app"
+ loader.push_dir "#{pwd}/lib"
- loader.collapse "#{pwd}/app/jobs"
- loader.collapse "#{pwd}/app/pipelines"
- loader.collapse "#{pwd}/app/schedulers"
+ app_paths = Dir.glob("#{pwd}/app/**/**").select { |f| File.directory? f }
+ loader.collapse(app_paths)
loader.setup
end
end