This is an attempt to understand more about how the chef resource collection works and more importantly how to manipulate it with ruby code.
Chef has two phases, a compile and an execute phase. During the compile phase everything that calls a resource gets its own resource collection that is then executed sequentially. The built in methods for controlling the placement in a collection are :delayed, :immediately, :notifies and :subscribes.
A delayed resource will be placed at the end of its resource collection, immediately will be placed sequentially, a notifies will place the notified resource after the notifying resource and a subscribed resource will be placed after the resource it subscribes to.
The meat of the question is how can we override this behavior to place a resource on a resource collection that does not belong to what called the resource in the first place.
In other words, if recipe foo calls resource bar which includes resource oof how can we place resource oof onto the resource collection of recipe foo.
I don't expect a simple answer to this question and breadcrumbs are fully acceptable to me.