(#14123) Puppet shouldn't explode if PATH contains ~nonexistent_user

As reported in http://bugs.debian.org/669650, when the PATH contained an
expansion for a user that doesn't exist, Puppet handled it the same way Ruby
does - to raise an exception, and explode.

Leaving aside the sanity of literal tilde in the PATH, we shouldn't explode in
that case - we should just skip that entry and carry on to the next element in
the path instead.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#14127) ssh_authorized_keys grammer fails on blank lines.

The `ssh_authorized_keys` grammer, defined for ParsedFile, is wrong about both
comments and blank lines.  Specifically, it failed in two key ways:

It failed if a comment didn't start on character one; any whitespace caused
the comment to be ignored, which is absolutely incorrect by the official
OpenSSH implementation.

It also failed because a "blank" line was defined as a line that contained one
or more whitespace characters at the start - and nothing more!

This failed in a bunch of ways, starting with assuming that a comment on a
line with leading whitespace was actually a blank line.

This change fixes both of those bugs, as well as adding appropriate tests.

(See `rsa_key_allowed_in_file` in `auth-rsa.c` for the parser, at least in the
 current as of this commit version of OpenSSH.  That is official enough for me
 to assume that everyone will behave that way ;)

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
maint: refactor integration specs for ssh_authorized_key

Replace all before blocks and instance variables with rspec let methods
and move the stubbing of File.chmod that happened in all tests to the
top to reduce code duplication.
(#14127) Add integration tests for ssh_authorized_key

Test the behaviour of the ssh_authorized key type when modifying a file
with different kind of text lines (inline comment and blank lines)
(#14173) Enforce that filebucket paths must be absolute

If you passed the filebucket a relative path, perhaps by accidentally quoting
'false', it would happily accept that and create a directory relative to the
current working directory to store content in.

This enforces that the path must be absolute, as well as failing cleanly if
multiple paths are passed.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#8778) Make '' == undef commutative in the DSL

Without this patch applied the Puppet DSL treats undef == '' as true
but '' == undef as false.  This is undesirable because the equality
operator should be commutative.

This patch fixes the problem by adding an explicit check for '' == undef
in the AST.  Without this patch applied, Puppet already has an explicit
check for undef == '' but not for '' == undef.

The spec tests are also updated by this patch to reflect the change.
Merge branch 'ticket/2.7.x/8778_equality_in_puppet_is_not_commutative' into 2.7.x

* ticket/2.7.x/8778_equality_in_puppet_is_not_commutative:
  (#8778) Make '' == undef commutative in the DSL

Reviewed-by: James Turnbull
Merge pull request #713 from daniel-pittman/bug/2.7.x/14173-filebucket-resource-should-validate-path

(#14173) Enforce that filebucket paths must be absolute
Merge pull request #700 from daniel-pittman/bug/2.7.x/14123-don't-explode-when-path-has-bad-content

Bug/2.7.x/14123 don't explode when path has bad content
Fix filebucket specs on Windows
Fix incorrect argument handling for expire in NodeExpirer

Since it takes an optional key it needs to use that key if it exists. This
also resolves an error `undefined method 'name' for #<Hash...` that could
occur when posting facts over REST if the yaml didn't have a proper name
variable. This will still fail, but at a point that gives a much better error
message.
Fix #14123 for Windows

Windows raised a different exception when a home directory doesn't exist, so
we catch that too.
Merge pull request #729 from pcarlisle/baduser-windows

Fix for ignoring nonexistent home dirs on Windows
Merge pull request #1 from stschulte/ticket/2.7.x/14127_2

Add extra testing goodness from @stschulte.
Merge pull request #701 from daniel-pittman/bug/2.7.x/14127-ssh-auth-keys-fails-on-completely-empty-line

Bug/2.7.x/14127 ssh auth keys fails on completely empty line
Merge pull request #728 from pcarlisle/maint/2.7.x/post-facts

Fix incorrect argument handling for expire in NodeExpirer
Revert "Fix incorrect argument handling for expire in NodeExpirer"

This reverts commit 1c9bec019e08ce7f53d9fb8c9e7c7b23cc7c8bca. That changeset
was based on a misunderstanding of the code. NodeExpirer#save has an instance
of Puppet::Node::Facts but is calling xpire on Puppet::Node, so it's never
appropriate to pass along the instance.
Merge branch '2.7.x'

* 2.7.x:
  Revert "Fix incorrect argument handling for expire in NodeExpirer"
  Fix #14123 for Windows
  Fix incorrect argument handling for expire in NodeExpirer
  Fix filebucket specs on Windows
  (#8778) Make '' == undef commutative in the DSL
  (#14173) Enforce that filebucket paths must be absolute
  (#14127) Add integration tests for ssh_authorized_key
  maint: refactor integration specs for ssh_authorized_key
  (#14127) ssh_authorized_keys grammer fails on blank lines.
  (#14123) Puppet shouldn't explode if PATH contains ~nonexistent_user

Conflicts:
	lib/puppet/provider/ssh_authorized_key/parsed.rb
	lib/puppet/util.rb