(#PUP-1046) Add spec test for skeleton for generated modules

This patch adds a simple spec test to ensure that by including the
class with default values for all the parameters, that the class is
contained within the catalog.
(#FORGE-38) Add Rakefile to skeleton for generated modules

This patch adds a simple Rakefile that provides rake tasks `lint` for
puppet-lint, `validate` for validation of manifests, templates, and ruby
files, and the tasks provided by the puppetlabs_spec_helper.
(PUP-1586) allow managing existing cronjobs without caring for command

When the catalog contains a cron resource that does not specify a value
for the command property, the transaction would fail with the cryptic
error message 'no command, somehow' under certain conditions.

This error is spurious. Generally, it's quite allowable to manage a subset
of cron properties that does not include the command. Fixed by removing
the devfail invocation. The command property is now handled just like
the 'special' property.
(PUP-1586) remove obsolete unit test

The cron type unit test titled "it should require a command when adding
a new entry" did not quite do what it said. What it actually tested was
that the type would raise an exception when an empty command should-value
was accessed.

This can be safely removed, as PUP-1587 will implement a more sensible
protection against the creation of cronjobs that lack a command, including
a working integration test.
(PUP-1587) crontab: make sure that invalid crontabs aren't written out

It is permissible to manage cron entries and not manage the command
property. However, if the entry doesn't exist on the target system yet,
puppet should not try to create it.

In other words, a cron resource without a should value for the command
property can only be synced to a valid state if the corresponding resource
on the target system has a valid command value already.

cron { "foo": minute => 1 }

is alright with an existing crontab of

 # Puppet Name: foo
 * * * * * /some/command

but not with a crontab not yet containing the entry named 'foo'.

This change prevents the sync operation in the error scenario.
(maint) Use git mirrors for puppet/hiera/facter installation

The git server and fork used to construct git urls for installation
projects via beaker was previously hard set to be github.com and
puppetlabs.  While we continue to default to these values, this commit
allows them to be set globally or per installed project via environment
variables so that we can take advantage of internal and local git
mirrors and daemons.
(PUP-1840) Add an sha256 checksum type to Puppet::Util::Checksums

Without this patch applied, Puppet doesn't know how to perform
checksums of files using the SHA-256 algorithm. This precludes Puppet
from being useful on hosts configured for compliance with U.S. Federal
Information Processing Standard (FIPS) 140-2.

The SHA-2 family of algorithms is recommended for use by the
U.S. National Institute of Standards and Technology (NIST) in FIPS
140-2; SHA-256 is the algorithm from this family having the shortest
output.

This patch makes SHA-256 available for use as a checksum algorithm by
other parts of Puppet, alongside MD5 and SHA-1.
(PUP-1210) Error if missing password info on OSX 10.8

When managing passwords on OSX versions >= 10.8 the password needs to
hashed using PBKDF2. PBKDF2 uses a salt and a number of iterations,
which the puppet user type supports (specifically for this), and are
critical parts of the password storage. Many users seem to have been
tripped up by this change (since no other systems that are managed do
this, including older versions of OSX) and created user accounts that
were unable to be logged into.

This causes the provider to fail on >= 10.8 if any one or two of the
salt, iterations, or password are missing. This should provide better
guidance and error messages for users in this situation.
(PUP-1210) Provide clear guidance on OSX passwords

This tries to make clear what properties need to be used when managing
passwords on OS X >= 10.8, since it is very different from other
providers.
(PUP-1944) Fix issue with manifest being a directory when initializing

The issue was that Puppet manages files and directories mentioned in
settings (to set the correct owner and mode). The :manifest setting
was a :file settings type and this did not work well when the :manifest
was a reference to an existing directory ("cannot change a directory to
a file") and the puppet master refused to start.

This commit changes this by introducing a new settings type;
:file_or_directory that manages the path as a directory if it exists or
if the path ends with slash (/ or \).
(PUP-2017) Change TupleType size to mean total number of entries

The TupleType was implemented so that the size constraint only
applied to the last type. This was difficult to work with. It is
far better if the size constraint works the same way as for an
array, only that the types can be different per index. Thus a size
constraint of 2,3 for the tuple types t1, t2, t3 means that t1, and t2
are required and t3 is optional. If the size range is > the number of
types, the last type repeats.

Conflicts:
	lib/puppet/pops/types/types.rb
Merge pull request #2459 from hlindberg/pup-2017_tuple-type-size-constraint

(PUP-2017) Change TupleType size to mean total number of entries
(PUP-1596) Expand all paths when creating directory environments

When reading EnvironmentConf settings, relative paths were prepended
with the directory environment path. This commit ensures that we also
expand the paths properly so that they are absolute on both Windows and
Posix platforms.
Merge pull request #2460 from jpartlow/feature/master/pup-1596-expand-paths-for-env-on-windows

(PUP-1596) Expand all paths when creating environments
Merge pull request #2457 from zaphod42/issue/stable/pup-1210-invalid-passwords-set-on-osx

(PUP-1210) Error if missing password info on OSX 10.8
Merge pull request #2461 from hlindberg/pup-1944_management-of-manfests-setting

(PUP-1944) Fix issue with manifest being a directory when initializing
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (PUP-2017) Change TupleType size to mean total number of entries
  (PUP-1944) Fix issue with manifest being a directory when initializing
  (PUP-1210) Provide clear guidance on OSX passwords
  (PUP-1210) Error if missing password info on OSX 10.8
(PUP-2009) Lookup environment from settings in interpolation

Settings#convert() used to have the behavior that if it was
interpolating $environment, and no environment was available to the
method, it would fall through and make another setting lookup for
environment.  This would result in the default or set environment being
obtained.

In 00c2abf of the #23373 command line manipulation of puppet.conf work
which involved a refactor of the setting parsing, this behavior changed,
such that whatever @environment was set in the ChainedValues instance
performing the setting lookup and interpolation, that value would be
returned for $environment, even if nil.

This is the case when asking an actual Setting instance what it's value
is, as it looks it up from settings without supplying an environment,
which results in something like
'manifestdir=/foo/environments/$environment/manifests' interpolating
as '/foo/environments/manifests'.  This can result in the bug seen in
PUP-2009 where a master can fail attempting to manage this typically
non-existent directory because of Settings#use() and to_catalog().

This commit restores the old behavior, allowing interpolation of
$environment to lookup environment from settings when no environment
value was explicitly passed in.
Merge pull request #2462 from jpartlow/issue/stable/pup-2009-manifestdir-dynamic-environments-fails

(PUP-2009) Lookup environment from settings in interpolation
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (PUP-2009) Lookup environment from settings in interpolation