rapid7/nexpose-client — pull request #27 by mdaines-r7 (2013-01-25 21:08:38+00:00)
Title: Asset filter

Adds asset filter searching capability to the gem.

Creates a dependency on the rest-client gem. If this is not ideal, that dependency can be removed from the gemspec, and it will only cause searches to fail.

The basic search function takes the 2-3 necessary arguments. There are constants in the Search module to guide people toward using the correct values.

The search_any and search_all functions expect a mapping that roughly equates to what the search function expects. The map expects three keys, :field, :operator, and :value. I chose this approach over creating a Criterion object, but I could see arguments either way as to which is more usable.

This patch does not currently provide the constants for vAsset searches, but adding them should be trivial.