getsentry/raven-ruby — pull request #63 by iain (2013-02-02 15:54:44+00:00)
Title: Use http_adapter configuration for setting Faraday adapter

This PR gives the user the ability to change the Faraday adapter:

``` ruby
Raven.configure do |config|
config.http_adapter = [ :em_http ]
end
```

This opens the door for:

* Using Sentry in an Eventmachine application.
* Sending requests async when using Thin, with a technique like the one [described here](http://www.jonb.org/2013/01/25/async-rails.html).
* Providing stubs for testing.

I have no idea where to put the test for it, so I improvised.

I'm also not sure about the implementation. We could also yield the faraday builder object for maximum flexibility:

``` ruby
Raven.configure do |config|
config.http_connection do |builder|
builder.adapter :em_http
end
end
```

Or just do nothing and keep on using the global adapter, so users are only able to change the adapter for every Faraday request in the app:

``` ruby
Faraday.default_adapter = :em_http
```

What do you think?