add a "step" argument to range()

This patch adds an optional "step" argument to the stdlib range()
function.  There is no change to the default behavior of the function;
however, passing a numeric "step" argument invokes the Ruby Range#step
method, e.g.

    range("0", "9", "2")

returns

    [0,2,4,6,8]
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.
(#15872) Add to_bytes function

Converts a string like "2 MB" to the value in bytes. Useful for
comparisons on facts that return a human readable number instead of
machine readable.
Merge branch 'feature/2.4.x/to_bytes_function' into 2.4.x

* feature/2.4.x/to_bytes_function:
  (#15872) Add to_bytes function
Merge branch '2.4.x'

* 2.4.x:
  (#15872) Add to_bytes function
Add support for a 'match' parameter to file_line

This commit adds a new parameter called "match"
to the file_line resource type, and support for
this new parameter to the corresponding ruby
provider.

This parameter is optional; file_line should work
just as before if you do not specify this parameter...
so this change should be backwards-compatible.

If you do specify the parameter, it is treated
as a regular expression that should be used when
looking through the file for a line.  This allows
you to do things like find a line that begins with
a certain prefix (e.g., "foo=.*"), and *replace*
the existing line with the line you specify in your
"line" parameter.  Without this capability, if you
already had a line "foo=bar" in your file and your
"line" parameter was set to "foo=baz", you'd end up
with *both* lines in the final file.  In many cases
this is undesirable.
Merge branch 'feature/2.4.x/backport_file_line_match_pr75' into 2.4.x

* feature/2.4.x/backport_file_line_match_pr75:
  Add support for a 'match' parameter to file_line
Merge branch '2.4.x'

* 2.4.x:
  Add support for a 'match' parameter to file_line
Update Modulefile, CHANGELOG for 2.4.0
Merge branch '2.4.x'

* 2.4.x:
  Update Modulefile, CHANGELOG for 2.4.0
Merge pull request #86 from bodepd/ensure_resource

Add function ensure_resource and defined_with_params
Revert "Merge pull request #86 from bodepd/ensure_resource"

This reverts commit 42ddd7fe54f37b84e34b4a005de2249e53f07469, reversing
changes made to 53243605b28fc31618d079155c86b37b4e88a6ca.
Revert "Revert "Merge pull request #86 from bodepd/ensure_resource""

This reverts commit 1e0983362464e8f2832239b09cdbc9175a51e6ec.
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 'bodepd-ensure_resource_attempt_2'

* bodepd-ensure_resource_attempt_2:
  Explicitly load functions used by ensure_resource
  Revert "Revert "Merge pull request #86 from bodepd/ensure_resource""
(Maint) Update README for 3.0.0

This commit updates the README for 3.0.0 by taking a function list
produced with `puppet doc -r function` _without_ stdlib in the
`$LOAD_PATH` and then filtering out the native functions by executing
`puppet doc -r function` _with_ stdlib/lib in the `$LOAD_PATH` and then
running `comm -13 core_functions.txt all_functions.txt`
Update CHANGELOG, Modulefile for 3.0.0