Maint: Remove unused variable in user spec

If rspec already gives us the described class why not using it.
Maint: Add a real provider class to user spec

Add a real provider class we can use in the tests.
Maint: Use real objects in user spec

Remove all references to the mock resource object
Maint: Remove unused mock objects in user spec

Also remove the modification of the PATH environment variable because we
will always have our :simple provider which does rely on any commands in
/sbin.
(#1076) Show warning if an empty group is specified

If the user passes an empty group to the user type, puppet will execute
an invalid `usermod` command.

e.g. if groups of user 'foo' is currently 'bar' and we do

    user { 'foo':
      groups     => '',
      membership => minimum # this is the default
    }

puppet will build a should value of ',bar' (old group + the new group '') and
will pass '-G ,bar' to the usermod command (which will then fail).

To really specifiy 'no group' the group property does allow an empty
array so we should fail if we find an empty string as a group.
(#4146) Refactor Nagios to module

Move the nagios types, grammar, and naginator to an external module
(#12101) Add shared context for specs to imitate windows or posix

Add "windows" and "posix" shared contexts to rspec. If you give :as_platform
=> :posix or :as_platform => :windows as argument to a describe block, it will
automatically stub the relevant facts and path behavior to imitate windows or
posix.
(#12101) Make Puppet::Util::absolute_path? usable in autoloader

This makes Puppet::Util::absolute_path? check File::ALT_SEPARATOR to determine
path behavior of the local system instead of Puppet.features, which required
having an Autoload instance already. File::ALT_SEPARATOR is only defined on
systems with Windows path behavior, and the Ruby standard library uses this
frequently to distinguish systems.
Removed unused code

There is no way that this code can be used since in tries to require
puppet/network/handler which doesn't exist. So if this code was ever
loaded it would raise an error.
Monkey patch FileUtils.mv in Ruby 1.8.5

The FileUtils.mv method in Ruby 1.8.5 can't mv directories across
devices.  File.rename causes "Invalid cross-device link" errors, which
is rescued, but in Ruby 1.8.5 it tries to recover with a copy and
unlink, but the unlink causes the error "Is a directory".  In newer
Rubies remove_entry is used, so the implementation in this patch is
what's used in Ruby 1.8.7 and Ruby 1.9

This was an issue in installing modules using `puppet module install`
since the module is extracted to a temporary directory and then moved to
the modulepath.
(#13367) Patch SemVer to permit ranges including pre-release components.
Make core changes needed for the puppet module tool

This includes changes to portions of the Puppet code base that have some
use by other parts of Puppet than the module tool, but are necessary for
the module tool work.
(#13397) fix gem provider ensure=>latest bug

As of 2.7.12, if you had "ensure=>latest" for any gem package
resource, puppet would not correctly detect that the gem
was already installed and would attempt to install it on
every run.  (This was because the "latest" method on the
gem provider was always returning an array, when it should
always be returning a single value.)
Add Module Tool

This rather large commit includes all the work needed to get the `puppet
module` face in Puppet with all it's actions.  I tried to break this up
into smaller commits, but it was difficult to do so and keep the
individual commits in a state that had passing specs since many changes
in shared module_tool code affected multiple actions.  This code was
developed in an integration branch over a few montsh and is now being
merged back into Puppet core in the same state that shipped with Puppet
Enterprise 2.5.

The work here was done by Pieter van de Bruggen <pieter@puppetlabs.com>,
Kelsey Hightower <kelsey@puppetlabs.com> and myself.
Merge pull request #613 from puppetlabs/geordi

Add Module Tool
(#3581) Stop forking around: Add fork helper method

Without this patch we are forking all over the place. All this forking
around is problematic when it comes to things like ActiveRecord and
database connections. It turns out that forking has a nasty side effect
of aggressively closing database connections and spewing errors all over
the place.

This patch introduces a new `Puppet::Util#safe_posix_fork` method that
does forking the right way (closing file descriptors, and resetting
stdin, stdout, and stderr). Tagmail, Puppet kick, and
`Puppet::Util#execute_posix` have been updated to make use of this new
functionality.

In the future, `Puppet::Util#safe_posix_fork` should be used in-place of
direct calls to `Kernel#fork`.

This patch includes related spec tests.
(#9167) Do not send email when nothing changes

Without this patch the tagmail report sends an email even when there are
no changes or resources out of sync. This has the undesired effect of
sending emails after every Puppet run.

When there are no changes or out of sync resources, tagmail logs a
notice stating the fact and skips processing logs and sending emails.

This patch includes new spec tests for the changes in behavior.
(#13584) in daemon mode, master can swallow errors during startup

This commit delays the closing of stdin/stdout/stderr to a time
a little later in the daemon startup process, in hopes of providing
a larger window in which the console is available as a fallback for
logging errors.
(#13588) fix permissions on log dir

When running puppet master as root, the log dir needs to
be permissioned as the service user (usually 'puppet').
This behavior had been inadvertently changed in the
work relating to #7749, but is fixed herein.
fix acceptance test that was relying on implicit 'apply'

As of Telly, we will no longer support the behavior of
puppet defaulting to 'apply' if you do not provide a
subcommand explicitly.  This commit fixes a test that
was relying on that behavior.