lostisland/faraday — pull request #437 by mike-bourgeous (2014-11-14 00:14:45+00:00)
Title: Allow specifying methods that bypass :retry_if on Request::Retry

This expands the `IDEMPOTENT_METHODS` functionality to allow speifying the
methods that will be retried without calling `:retry_if`. The new `:methods` option
to `Request::Retry` allows `:retry_if` to be called for every HTTP method, a user-
specified set of HTTP methods, or never.

It's likely that `:retry_if`, `IDEMPOTENT_METHODS`, and `:methods` could be
combined into a simpler API (such as by changing the `:retry_if` default value to
check for an idempotent method), but this separate approach preserves the
existing behavior if `:methods` is not specified.

Tests and documentation are included in the pull request; I ran the tests against
Ruby 2.1.3 and Ruby 1.8.7.