PoseBiz/stretcher — pull request #70 by GUI (2013-10-19 18:28:10+00:00)
Title: Fix SearchResults#raw_plain so that it returns a plain ruby Hash.

Based on #61, I believe the intention was for `SearchResults#raw_plain` to return a plain ruby Hash. However, the `raw_plain` method still seems to be returning a `Hashie::Mash` object, and not a plain ruby Hash. This is due to the [mashify middleware enabled in Faraday for all the requests](https://github.com/PoseBiz/stretcher/blob/v1.21.0/lib/stretcher/server.rb#L9). This is causing all the HTTP responses to become `Hashie::Mash` objects before `SearchResults` even gets the response.

Simply disabling the mashify middleware fixes this, but also breaks a number of other specs, since other classes are expecting Hashie::Mash responses. This pull request fixes it by making the default mashification of the each response optional. It defaults to true to maintain backwards compatibility, but disables it on requests where `SearchResults` will be generated from the response. I'm not entirely sure this is the best way to fix, this, but it's the simplest way I could figure while maintaining backwards compatibility.

And for what it's worth, having the ability to access a plain ruby hash instead creating the Hashie::Mash object does yield significant speed ups when dealing with large responses, so it would be nice to have a way to skip the Mash creation as I believe `raw_plain` was intended to provide.