- Removed the `pt.add_p_item` from get_line_number
- Added policy_table_clean for running a fetch_all_objects on policy_table
-- This will automatically clean stale versions and is low impact as this collection only is supposed to store one copy.
-- This will fix existing installs immediately with stale entries.
Merge pull request #236 from lynxbat/master

Fix for issue #235 - removes incorrect policy_table insert and implements cleanup method to repair existing installs.
Added two new parameters to the Razor configuration (mk_gem_mirror_uri and mk_gemlist_uri) to support installation of gems within Microkernel instances from an external gem mirror.  Also added code to supplement the existing Razor configuration (as is taken from an existing Razor configuration file) with default values for any parameters that are not defined in that Razor configuration file.  This will ensure that these new parameters are available on any system, even systems with an existing Razor configuration file that does not include them.  This will also have the effect of providing a potential fix for the issues raised in the discussion of (Issue #183)[https://github.com/puppetlabs/Razor/pull/183] around how best to deal with a "partial" configuration file.
Merge pull request #240 from tjmcs/tb/add_external_gem_mirror_for_mk

Adds support for use of a gem mirror (internal or external) by the Microkernel
Set HOME to current user homedir to help out Net::SSH

If HOME is not set in the environment, the Ruby Net::SSH gem ends up causing
problems by setting it to `.` - which leads to other parts of Ruby failing in
horrible ways.

Since `ENV['HOME']` isn't actually *required* to be set, and various places
like Puppet starting a service, or other launchers, and Ruby does explode in
exciting ways if it isn't ... we set it to something useful.

By "useful" I mean: if we are on Win32, and have their HOMEPATH and possibly
HOMEDRIVE set, use those to point to the home directory.  That is going to
point to a fairly sensible location by default.

On Unix, where that isn't set, we grab the pwent for the current process EUID,
and set the HOME value to the home directory of that user.  That is the
closest to "right" I can identify, since it pretty directly mirrors what
login(1) would do in the same circumstance.

This closes #239, by ensuring that we have a more sensible (and absolute) path
available at all times.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Include an error message with InvalidUUID error.

This fixes a syntax error raised when a bad UUID is passed to `image remove`,
triggered by not passing a textual message to the error object at create.

This fixes #141.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Fix a misnamed variable in debug error handling.

The CLI used `exception` rather than `e` for the object captured in the rescue
block - which didn't work well.  This fixes that.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Merge pull request #248 from daniel-pittman/bug/master/141-syntax-error-removing-invalid-image

Syntax error when removing invalid image
Merge pull request #245 from daniel-pittman/bug/master/239-razor-broker-fails-due-to-net-ssh-home-bug

Set HOME to current user homedir to help out Net::SSH
Use upstream Puppet module artifact in acceptance tests

The acceptance tests for Razor installed the module from our forge; this was a
good simulation of the direct user experience, but didn't match our desired
path: we really wanted to be able to test against the latest module at
all times.

This updates the acceptance suite to work hand-in-hand with our Jenkins
infrastructure to test using a module file built in the upstream
job, automatically.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Merge pull request #253 from daniel-pittman/feature/master/use-packaged-artifact-in-ci-testing

Use upstream Puppet module artifact in acceptance tests
Use workspace root when running acceptance tests

The acceptance suite doesn't run tests from the workspace root; we need to
respect that and use the absolute path when running the test.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Merge pull request #254 from daniel-pittman/feature/master/use-packaged-artifact-in-ci-testing

Use workspace root when running acceptance tests
Work around Puppet Module Tool limitations

The Puppet module tool is unable to install a local module that is not present
on the forge, because it depends entirely on remote dependency resolution but
does not send local data to the remote server.

This works around that by forcibly installing the module without dependencies,
then installing every missing module from the remote forge with a script.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Merge pull request #255 from daniel-pittman/feature/master/use-packaged-artifact-in-ci-testing

Work around Puppet Module Tool limitations
Debug acceptance test environment failures...

The previous change is not quite working, and since we can't locally test the
suite we need to debug this in situ...

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Merge pull request #256 from daniel-pittman/feature/master/use-packaged-artifact-in-ci-testing

Debug acceptance test environment failures...
Debug acceptance test environment failures...

The previous change is not quite working, and since we can't locally test the
suite we need to debug this in situ...

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Merge pull request #257 from daniel-pittman/feature/master/use-packaged-artifact-in-ci-testing

Debug acceptance test environment failures...
Work around Puppet Module Tool limitations

The Puppet module tool is unable to install a local module that is not present
on the forge, because it depends entirely on remote dependency resolution but
does not send local data to the remote server.

This works around that by forcibly installing the module without dependencies,
then installing every missing module from the remote forge with a script.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>