Shopify/shopify_api — pull request #12 by odorcicd (2011-10-21 18:07:57+00:00)
Title: Add DetailedLogSubscriber to more easily debug ActiveResource requests/re

@Soleone

This returns more detailed logging to help people debug issues when using the gem and would look something like this:

```ruby
require 'logger'
ActiveResource::Base.logger = Logger.new(STDOUT)

# page is a ShopifyAPI::Page resource
page.title = ""
page.save

INFO -- : PUT http://localhost:3000/admin/pages/4.json
INFO -- : --> 422 39 (298.8ms)
INFO -- : Request:
{"page":{"handle":"page","created_at":"2011-10-19T14:10:27-04:00","body_html":"asdf","title":"","template_suffix":null,"author":"Shopify","updated_at":"2011-10-21T11:56:07-04:00","shop_id":3,"id":4,"published_at":"2011-10-19T14:10:27-04:00"}}
INFO -- : Headers: {"Authorization"=>"Basic MmQ3ZjNmODdiNmFhMzQ0MWZmNzNjNThkODJmYjg0NDE6ZGM2ZDNjOTNmOGZmM2JlZWY2OWU5YjViNjJkYmFiMjg=", "Content-Type"=>"application/json"}
INFO -- : Response:
{"errors":{"title":["can't be blank"]}}
```