- Replace
minitest
gem withrspec
- Fancier README
- Remove unnecessary short circuit in
randomize
method
- Fix typo in contexts exception message.
- Fix updating the version in the library.
- Added contexts feature. Thanks to @apurvis.
- Add configuration and options validation.
- Add
rubocop
linter to enforce coding styles for this library. Also, fix rule violations. - Removed
attr_reader :config
that caused a warning. @bruno- - Clean up Rakefile testing cruft. @bruno-
- Use
.any?
in the:on
hash processing. @apurvis
- Require ruby 2.0+.
- Breaking Change:
on
with aHash
value now matches subclassed exceptions. Thanks @apurvis! - Remove
awesome_print
from development environment.
- Fix bug #17 due to confusing the initial try as a retry.
- Switch to
Minitest
5.6 expect syntax.
- Change required_ruby_version in gemspec to >= 1.9.3.
- Add support for ruby 1.9.3.
- Require ruby 2.0+.
- Time intervals default to randomized exponential backoff instead of fixed time intervals. The delay between retries grows with every attempt and there's a randomization factor added to each attempt.
base_interval
,max_interval
,rand_factor
, andmultiplier
are new arguments that are used to generate randomized exponential back off time intervals.interval
argument removed.- Accept
intervals
array argument to provide your own custom intervals. - Allow configurable defaults via
Retriable#configure
block. - Add ability for
:on
argument to accept aHash
where the keys are exception types and the values are a single or array ofRegexp
pattern(s) to match against exception messages for retrial. - Raise, not return, on max elapsed time.
- Check for elapsed time after next interval is calculated and it goes over the max elapsed time.
- Support early termination via
max_elapsed_time
argument.
- Change
:max_tries
back to:tries
.
- Change #retry back to #retriable. Didn't like the idea of defining a method that is also a reserved word.
- Add ability for
:on
argument to accept aHash
where the keys are exception types and the values are a single or array ofRegexp
pattern(s) to match against exception messages for retrial.
- Accept
intervals
array argument to provide your own custom intervals. - Refactor the exponential backoff code into it's own class.
- Add specs for exponential backoff, randomization, and config.
- Raise, not return, on max elapsed time.
- Check for elapsed time after next interval is calculated and it goes over the max elapsed time.
- Add specs for
max_elapsed_time
andmax_interval
.
- Require ruby 2.0+.
- Default to random exponential backoff, removes the
interval
option. Exponential backoff is configurable via arguments. - Allow configurable defaults via
Retriable#configure
block. - Change
Retriable.retriable
toRetriable.retry
. - Support early termination via
max_elapsed_time
argument.
- Fixes non kernel mode bug. Remove DSL class, move
#retriable
into Retriable module. Thanks @mkrogemann.
- By default, retriable doesn't monkey patch
Kernel
. If you want this functionality, you can `require 'retriable/core_ext/kernel'. - Upgrade minitest to 5.x.
- Refactor the DSL into it's own class.
- Allow sleep parameter to be a proc/lambda to allow for exponential backoff.
- sleep after executing the retry block, so there's no wait on the first call (molfar)
- Clean up option defaults.
- By default, rescue StandardError and Timeout::Error instead of Exception.
- Add
rake
dependency for travis-ci. - Update gemspec summary and description.
- Rewrote a lot of the code with inspiration from attempt.
- Add timeout option to the code block.
- Include in Kernel by default, but allow require 'retriable/no_kernel' to load a non kernel version.
- Renamed
:times
option to:tries
. - Renamed
:sleep
option to:interval
. - Renamed
:then
option to:on_retry
. - Removed other callbacks, you can wrap retriable in a begin/rescue/else/ensure block if you need that functionality. It avoids the need to define multiple Procs and makes the code more readable.
- Rewrote most of the README
- Forked the retryable-rb repo.
- Extend the Kernel module with the retriable method so you can use it anywhere without having to include it in every class.
- Update gemspec, Gemfile, and Raketask.
- Remove echoe dependency.