Update for Ruby 2.0/Rails 4.0 compatibility

Fixed a variety of syntax issues. Updated NET:HTTP methods with proper calling signature. Cleaned up some formatting.
Merge pull request #1 from alippert/patch-1

Update for Ruby 2.0/Rails 4.0 compatibility