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>
Merge branch 'feature/master/use-packaged-artifact-in-ci-testing'
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 branch 'feature/master/use-packaged-artifact-in-ci-testing'
Fix a typo that broke the acceptance test module install...

One tiny typo, and we broke module installation.  Yay.

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