Kernel#dependency does nothing after the Dependencies BootLoader ran
Reported by Carl Lerche | June 5th, 2008 @ 01:43 PM
If Kernel#dependency is used anytime after Merb::BootLoader::Dependencies is run, it does nothing. This is because dependency adds all the dependencies to an array that Merb::BootLoader::Dependencies iterates through and loads once.
This causes a problem if dependency is used in a before_app_loads or after_app_loads block since both are invoked after the Dependencies BootLoader is run.
The patch changes Kernel#dependency so that instead of appending directly to an array, it invokes an append_dependency method. The append_dependency automatically calls Kernel#load_dependency IF Merb::BootLoader::Dependencies already ran.
Comments and changes to this ticket
(from [75f71027c5f023eebb91023845f06262cb16a880]) Merge branch 'master' of git://github.com/wycats/merb-core
- 'master' of git://github.com/wycats/merb-core: (192 commits)
Revert partial counter and yielding.
Remove some duplication
For crying out loud.
Refactor display. WARNING: This commit might not be stable. I need to add a bunch more specs for display before I feel confident.
Make the TemplateNotFound error read better. Slight refactor of _get_layout.
Fix _template_for so it's actually readable
Added Merb::Router.reset! and Merb::Router.capture
Speedup Route URL generation
Start work on fixing contaminated cousins bug.
Changed controller inheritance of _template_root
Added the ability to use full/absolute template paths for render, display and partial views
This cannot be tested this way. It needs to be tested as a public spec (testing it privately here was a cop-out and fails when I fixed up the way dependency works).
Allows passage of query string via env["QUERY_STRING"] in tests. [#358 state:resolved]
Handles use of dependency after BootLoading. [#360 state:resolved]
properly set the session_id_key
added 2 specs for multipart formdata: (1) for checking request with IO, (2) for testing GET with content_type not erroring on multipart/form-data absence; fixed error with multipart/form-data absence.
Made Class a lot more sane.
Fix README for merb-gen app foo