acidprime/exports — pull request #1 by francois (2013-12-03 19:18:27+00:00)
Title: Fix `--resources` did not find resources with `::`

Running `puppet node exports --resources haproxy::balancermember` returned no rows. Changing capitalizations to `Haproxy::Balancermember` or `Haproxy::balancermember` did not return rows either.

By not capitalizing the resource, the caller is responsible for the correct capitalization, but also ensures we can find any resource. For example:

$ puppet node exports | grep Haproxy
carbon101.novalocal Haproxy::balancermember[carbon101-carbon]
carbon101.novalocal Haproxy::balancermember[carbon101-graphite]

But trying to find the resource using `--resources` did not work:

$ puppet node exports --resources haproxy::balancermember
Name Exports

$ puppet node exports --resources Haproxy::balancermember
Name Exports

$ puppet node exports --resources Haproxy::Balancermember
Name Exports

But resources with a single word work just fine:

$ puppet node exports --resources nagios_service | head -n 2
Name Exports
worker101.novalocal Nagios_service[check_apt worker101]
$ puppet node exports --resources Nagios_service | head -n 2
Name Exports
worker101.novalocal Nagios_service[check_apt worker101]

After removing the call to `#capitalize`, one can find any resource:

$ puppet node exports --resources nagios_service | head -n 2
Name Exports

$ puppet node exports --resources Haproxy::balancermember | head -n 2
Name Exports

$ puppet node exports --resources Nagios_service | head -n 2
Name Exports
worker101.novalocal Nagios_service[check_apt worker101]

$ puppet node exports --resources Haproxy::Balancermember | head -n 2
Name Exports
carbon101.novalocal Haproxy::balancermember[carbon101-graphite]