halorgium / rack-client

A client wrapper around a rack app or live-http
http://halorgium.github.com/rack-client
MIT License
99 stars 28 forks source link

Sync API support for em-http under Ruby 1.9 (via em-synchrony) #9

Closed igrigorik closed 13 years ago

igrigorik commented 13 years ago

Ran into some issues while playing with rack-client + added sync API support for Ruby 1.9 users.

Ex: https://gist.github.com/802391

benburkert commented 13 years ago

sorry for the delayed response, i will try to get to this over the weekend. thanks for the patches!

benburkert commented 13 years ago

I separated the em-synchrony code into it's own adapter that doesn't require em-synchrony/http, which monkey patches em-http. thoughts?

https://github.com/halorgium/rack-client/compare/em-synchrony

igrigorik commented 13 years ago

Works for me. In practice I do find that I end up using both sync and async even while using em-synchrony (it aliases the async method to "aget", "apost", etc), having said that, not sure if thats relevant in this specific instance.