chriskite/anemone — pull request #46 by brutuscat (2012-02-01 11:44:21+00:00)
Title: Use openuri

I did a few changes to use OpenURI instead of Net::Http class.

I was having some issues in ruby 1.9 because the default behavior of net:Http is to force all strings as ASCII:8-bit. So instead of re-implement the wheel I instead used OpenURI who does have an implementation for this and other stuff like:

* Easier Redirect handling (see my code)
* Out of the box Proxy configuration
* Extremely well tested code because it's a core-lib.

You can see several other options that could be forwarded to this class here: https://github.com/ruby/ruby/blob/trunk/lib/open-uri.rb#L94
And charset/encoding implementation here: https://github.com/ruby/ruby/blob/trunk/lib/open-uri.rb#L421

Please let me know what you think ;)