Revert "Revert "Merge branch 'haus-add_pe_facts_to_stdlib' into 2.4.x""

This reverts commit d6d23b495cda0e154b4e73982acc43e586564c0e.

This backwards-compatible additional functionality is targeted at the
next minor release.  There are already backwards-incompatible changes in
the master branch so we need to establish a new minor branch.
Merge branch '2.5.x'

* 2.5.x:
  Revert "Revert "Merge branch 'haus-add_pe_facts_to_stdlib' into 2.4.x""
Add function ensure_resource and defined_with_params

This commit adds 2 new functions with unit tests.

defined_with_params works similarily to puppet's defined
function, except it allows you to also specify a hash of
params. defined_with_params will return true if a resource
also exists that matches the specified type/title (just like
with defined) as well as all of the specified params.

ensure_resource is a function that basically combines defined_with_params
with create_resources to conditionally create resources only if the
specified resource (title, type, params) does not already exist.

These functions are created to serve as an alternative to using
defined as follows:

    if ! defined(Package['some_package']) {
      package { 'some_package': ensure => present,
    }

The issue with this usage is that there is no guarentee about
what parameters were set in the previous definition of the package
that made its way into the catalog.

ensure_resource could be used instead, as:

    ensure_resource('package', 'some_package', { 'ensure' => 'present' })

This will creat the package resources only if another resource does
not exist with the specified parameters.
Handle undef for parameter argument

This commit adds better handling of the case where
undef is passed as the parameter value.

This works by converting '' into []
Add better docs about duplicate resource failures

This commit adds better inline documentation
explaining how replicate resource definitions can
occur if the resource exists and does not have
matching parameters.
re-formatting

This commit refactors to ensure 80 character lines.
Merge branch 'maint/2.5.x/pick_pr86_ensure_resource' into maint/2.5.x/pick_compatible_new_functionality

* maint/2.5.x/pick_pr86_ensure_resource:
  re-formatting
  Add better docs about duplicate resource failures
  Handle undef for parameter argument
  Add function ensure_resource and defined_with_params
Explicitly load functions used by ensure_resource

The ensure_resource function actually calls two
other functions, create_resources and defined_with_param.

When calling Puppet functions from Ruby, you sometimes have
to load the functions manually if they have not been called
before.

This commit explicitly loads the functions that ensure_resource
depends on from within the function.
Merge branch 'maint/2.5.x/pick_explicitly_load_functions' into maint/2.5.x/pick_compatible_new_functionality

* maint/2.5.x/pick_explicitly_load_functions:
  Explicitly load functions used by ensure_resource
Merge branch 'maint/2.5.x/pick_compatible_new_functionality' into 2.5.x

* maint/2.5.x/pick_compatible_new_functionality:
  Explicitly load functions used by ensure_resource
  re-formatting
  Add better docs about duplicate resource failures
  Handle undef for parameter argument
  Add function ensure_resource and defined_with_params
Merge branch '2.5.x'

* 2.5.x:
  Explicitly load functions used by ensure_resource
  re-formatting
  Add better docs about duplicate resource failures
  Handle undef for parameter argument
  Add function ensure_resource and defined_with_params
Update Modulefile, CHANGELOG for 2.5.0
Merge branch '2.5.x'

* 2.5.x:
  Update Modulefile, CHANGELOG for 2.5.0

Conflicts:
	CHANGELOG
	Modulefile
Revert "Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'"""

This reverts commit 8fc00ea5b6b39b220ebc6391489915dbeeb364ab.

I really wish we could get this right.

Without this patch there is no branch that contains backwards-comaptible
new functionality relative to the current 3.0.1.  There are only
branches that contain backwards-incompatible functionality relative to
3.0.1.

This is a problem because I need to do a release of stdlib that contains
backwards compatible facts but does not contain any breaking changes.

This patch fixes the problem by establishing the 3.1.x branch.  This
branch will then revert the backwards incompatible changes from the
3.1.x branch and revert the revets in the 4.x and master branches.

I'll review our merge process, but it seems wrong that there is no place
to separate out incompatible from compatible changes when working beyond
the most recent patch release.
Merge branch '3.1.x'

* 3.1.x:
  Revert "Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'"""
Revert "Revert "Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'""""

This reverts commit 2885d314b61055d20d85d36a68214f7d9e1e6ac6.

No, really.  Keep the !@#$% integration branches around so we don't have
this revert nightmare again.
Merge branch '4.x'

* 4.x:
  Revert "Revert "Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'""""
  Revert "Revert "Revert "Merge branch 'hkenney-ticket/master/2157_remove_facts_dot_d'"""
Update Modulefile, CHANGELOG for 3.1.0
Merge branch '3.1.x' into 4.x

* 3.1.x:
  Update Modulefile, CHANGELOG for 3.1.0
Merge branch '4.x'

* 4.x:
  Update Modulefile, CHANGELOG for 3.1.0