Instead of :infinite magic constant from now on you can just use Ruby's native infinity data type e.g. Float::INFINITY. See https://github.com/nfedyashev/retryable/commit/16f60bb09560c9470266dca8cd47c934594a67c5 This version is backwards compatible with older versions, no changes needed in your code.
Fixed typo in exception message given invalid :matching argument type #29 Thanks @msroz
No changes to the source code, only added direct Changelog link on rubygems.org for ease of use.
- :log_method param has been added for flexible logging of your retries. It is silent by default.
- :matching param from now on could be called in form of array with multiple matching conditions. This version is backwards compatible with 3.0.0
NOTE: this version is backwards compatible with 2.0.4 version unless you're running it against Ruby 1.8 version.
-
retryable can now also be configured via stored contexts.
-
Ruby 1.8 support has been dropped.
Thanks @chubchenko for refactoring and various improvements.
-
:infinite value is now available as :tries paramater. Use it for retrying your blocks infinitely until it stops failing.
-
:sleep_method parameter has been added. This can be very useful when you are working with Celluloid which implements its own version of the method sleep. Use
:sleep_method: Celluloid.method(:sleep)
in such cases.Thanks @alexcastano
- gemspec contains explicit licence option from now on(MIT)
- :not configuration option has been added for specifying exceptions when a retry should not be performed. Thanks @drunkel
- Retryable can now be configured globally via Retryable.configure block.
- Retryable can now be used without monkey patching Kernel module(use
Retryable.retryable
instead). Thanks @oppegard
- Fixed warning: assigned but unused variable - tries. Thanks @amatsuda
- New callback option(:exception_cb) to run after an rescued exception is introduced. Thanks @jondruse
- Namespace issue has been fixed. Thanks @darkhelmet
- Retryable::Version constant typo has been fixed
- Retryable.disable method has been added
- Retryable.enabled method has been added
-
:ensure retryable option add added
-
ArgumentError is raised instead of InvalidRetryableOptions in case of invalid option param for retryable block
- StandardError is now default exception for rescuing.
- became friendly to any rubygems version installed
- added :matching option + better options validation
- fixed dependencies
- added :sleep option
- stability -- Thoroughly unit-tested
- FIX -- block would run twice when
:tries
was set to0
. (Thanks for the heads-up to Tuker.)