spagalloco/airbrake-api — pull request #34 by groman-me (2013-11-01 21:03:40+00:00)
Title: add Configuration#middlewares to customize middleware stack

Added a configuration option to customize used middlewares to be able to e.g. add a local cache. Here is an example of how you could initialize customized middlewares list. Notice that we can pass parameters to middleware components by specifying them in an array.

````ruby
custom_mw =
[
[FaradayMiddleware::Caching, ActiveSupport::Cache::FileStore.new(cache_path, ... ),
{ :ignore_params => %w[auth_token] } ],
Faraday::Response::Logger
]

AirbrakeAPI::Client.new(:middlewares => AirbrakeAPI::Configuration::DEFAULT_MIDDLEWARES + custom_mw)
````