cloudhead/cradle — pull request #201 by sgmentzer (2013-02-01 05:11:03+00:00)
Title: Fix Couchdb response metadata handling

If a Couchdb document contains a key named `results`, `rows`, or `uuids`, Cradle will crash or silently fail if you use the get() method to retrieve it. This is because Cradle attempts to detect the type of Couchdb response by the presence of a key with one of these names. Since the Couchdb GET response puts all the document keys into the same "namespace" as its metadata for other responses, a collision is inevitable.

This patch takes the presence of an `_id` key in the response as the signal that it's a document, in which case all the keys are part of the document and not metadata.

Patch also adds fields with metadata names to test data.