puppetlabs/puppetdb — pull request #716 by cprice404 (2013-10-21 19:37:53+00:00)
Title: Fix `nodes` REST API to use correct version of wrapped queries

When the `v2/nodes` endpoint was being used
to wrap facts/resources queries, it was inadvertently using
v3 of those. This PR separates the code and tests out so that
they each have their own explicit codepath, and adds tests
that cover this issue (relating to `sourcefile` vs `file`, etc.,
on the wrapped `resources` query).