Sija/garb — pull request #6 by codingluke (2012-11-06 18:12:57+00:00)
Title: Added em-synchrony to work excellent with Eventmachine

Hi Sija
I figured out, sometimes the response time from google analytics is really long. I figured out a way to make a nonblocking API with Sinatra::Synchrony http://kyledrake.net/sinatra-synchrony/. To be fully nonblocking, HTTP Request have to be made this way https://github.com/igrigorik/em-synchrony. So I forked your gem an added the ability to connect in a nonblocking way.

I just extended the gem. If you use it like usual, everything still works as expected. New is the ability to make a nonblocking request.

EM.synchrony do
results = Model.results :nonblocking => true
end

When the option :nonblocking is set to true, the data response connection is made with EM::HttpRequest.

If you like it, you can merge it in you fork too.

PS: I was busy so there are no new testcases!