Malformed arguments should raise error

Arguments which contained invalid characters, i.e. anything other than lowercase letters and dashes, were previously skipped over. This adds a check so the user will be informed of the extra arguments.
Allow integer arguments

In `create-policy`, the `max-count` variable needs to be translated into an Integer prior to submission.
Filter and format CLI output

The user experience previously suffered from a direct JSON output of what the server returns, which is hardly customizable and not very helpful. This change allows different properties to be displayed and transformed on a per-object basis.
Tabular output

This improves user experience by allowing collections/queries to be displayed as a table. The default view will be a table showing all properties ("full" view) if not specified otherwise in the views.yaml.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-43
Combine multiple arguments into a JSON array

In an attempt to remove JSON from the standard CLI interface, the user needs to construct arrays of strings. This commit allows users to use e.g. `--tag tag1 --tag tag2` to construct the JSON array `{"tag1", "tag2"}` when passed to the server.
Allow JSON object syntax `name=val`

In order to remove JSON from the `create-broker` command's `--configuration` parameter, there needs to be an alternative way to construct the JSON object that's passed to the server. The user can now provide any argument as `--argument name=value` and the client will construct the JSON object passed to the server.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-198
Show version number in client

Fixes https://tickets.puppetlabs.com/browse/RAZOR-217
Fix navigate.yaml and views.yaml
Fetch and use command argument datatypes from server

To increase the flexibility of the client, the datatype for each argument in each command should be retrieved from the server, rather than held locally. Since the `navigate.yaml` file is being deleted, the client will throw an error if the server has not updated to provide the expected datatype for each argument.

Note: This required a re-recording of the VCR specs, since it issues a second GET for detailed command information. It was a good opportunity to add `testing.md` to supply best practices with writing spec tests with VCR.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-216
Allow formatting of non-spec attributes

In cases like `razor nodes node1 tags`, navigation would previously reach the end of the navigation string and be left with just an array. With this array, it was not possible to customize the output (and was throwing an error).

This fix allows the navigation to retain the parent's spec string and store the navigation that was not consumed. It uses this by setting system attribute `+spec` inside the document. The view can then format the output as desired.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-242
Indicate available additional details

When the user ran `razor nodes node1`, it wasn't clear that the tree could be further traversed via e.g. `razor nodes node1 tags`. This adds a line at the end of the display to tell the next items that can be traversed.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-241
Adding additional details test
Hide getopt arguments from additional details
Standardize output when no items present

This standardizes the output using the phrase, "There are no items for this query." if there are no items in a list, e.g. `razor policies`.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-243
Include 'last_checkin' in the node details
Hide add'l details from command help text

The command help was erroneously including
the text used to tell the user how to dive deeper
into a collection. This hides that text.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-269
Allow spaces in names

The previous regex wasn't grouping the `--name="a b"` case properly; this rectifies that.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-257
Additional details special case

Showing additional details was failing when the results had a mixture of nested and non-nested attributes.
It was trying to compare a string and nil. This fixes that by weeding out the nils first.

Fixes https://tickets.puppetlabs.com/browse/RAZOR-270
Add Puppet Labs internal build infrastructure

This adds support for the internal Puppet Labs build infrastructure to the
client repo, allowing us to integrate shipping the gem with our normal
build tooling.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Quick fix for two small client problems:

  1) > rzr nodes node17
     failed because the array being sorted in format.rb:additonal_details
     could contain nil's
  2) > rzr nodes node13 tags new rule
     failed because format.rb:display_fields could be called with object
     being a String which does not respond to 'keys'