bryanwb/chef-rewind — pull request #13 by hltbra (2013-10-16 16:35:59+00:00)
Title: Bugfix for off-by-1 error in ResourceCollection#delete

This fix may be temporary, since a new idea of how to implement `ResourceCollection#delete` popped up.

Andrew Gross (@andrewgross) helped me to find, debug, and write this patch, and he has a nice idea of how `unwind` should be implemented.

His idea is that we should not remove the resource from ResourceCollection, because it may have unknown side effects (as it had and thus the bugfix), and instead we should replace the resource with a fake resource, a no operation (noop) valid resource, that when triggered, does nothing.

We need to investigate that idea, but it sound great and more error-prone.

I got this bug only when notifies were involved and since I didn't have a good test case for that, I didn't find it before.

Sorry for adding a feature with a hidden bug.

Can you merge and make a new release, please?