deferrable_gratification
deferrable_gratification copied to clipboard
Rich declarative API extensions for Ruby Deferrables.
Removes some of the temptation to use "#transform" and "#transform_error" to acheive this effect.
This is the opposite of loop_until_success. As part of building it I extracted some of the generalisable portions of Combinators::Join into Combinators::Base.
This is the opposite of guard, selectively turning failures into successes.
Also added dependency for this version of EventMachine. Here's the EventMachine commit that added this: https://github.com/eventmachine/eventmachine/commit/e6efbd27a98e73db4140a4c971adcd1386cf630a. This also fixes a bug where you can't pass arguments to the #fail method...
Like join_successes, but preserves the failures too.
I spent a while trying to track down a bug that was masked by `DG::join_successes`. What happened was something like this: ``` ruby def operation(param) something_async(param).transform do |value| call_some_method_that_does_not_exist! #...