Hi,
I just finished the upgrade of my app from dry-system 0.17 to master, and I have some questions
The first one is that load_paths!
is replaced by add_to_load_path
but doesn’t load the path.
load_paths!('lib')
Because of that, I have to do a trick to allow my app to work :
def self.finalize_application!
Assistant::Application.finalize!
Assistant::Application.require_from_root("lib/loot/**/*.rb")
Assistant::Application.require_from_root("apps/web/**/*.rb")
end
These load folders I want.
The second question I have is that I would love to have a different injector for each of my domains.
I use this Import = Dry::AutoInject(Application)
to use dependency injection, but I would love to have the possibility to explicitly declare an import per folder.
My app is transitioning from this architecture ROM + Dry Showcase: Part 1 - Application + Database setup - Ryan Bigg into a DDD oriented architecture.
You can see my PR here : Setup dry-system with better configuration by alex-lairan · Pull Request #1 · Cruder/Lootovore · GitHub
Thanks!