kamui/retriable — pull request #2 by bagilevi (2012-11-09 14:19:59+00:00)
Title: Narrow exception-range with regex

You can also provide a regex pattern to further narrow down the range of
exceptions. In this example, it will retry if the exception is a Timeout::Error
or if it's a StandardError containing "HTTP":

```ruby
retriable :on => [Timeout::Error, [StandardError, /HTTP/]] do
# code here...
end
```

Note, that when you're specifying a single item, you need to nest the
exception-regex pair in an array:

```ruby
retriable :on => [[StandardError, /HTTP/]] do
# code here...
end
```