Fixed unhandled --ignoreschedules in puppet kick
Use method execute instead of transport.command
Fix spaces
Explicit use of the device given the block
Extract connection and disconnection behaviours
Remove unused verbose parameter, add debug in the transport
Disable debug log in the transport
Fix portage-provider so that packages with keywords can be installed

This patch removes the --stable restriction from the portage provider,
which made the installation of packages with keyword-restrictions impossible.
By superimposing this restriction the provider broke in many installations
and thus rendered puppet unusable for systems that relied on packages with
keyword-restrictions. This applies for example to all packages provided by
overlays.
This fix puts the administrator back into the responsibility to decide which
packages he/she wants to install.
Add tests for gentoo provider
(maint) Add dependency information for yard and redcarpet

Without this patch `bundle exec yard server --reload` doesn't work.
This is a problem because people who are developing Puppet need to be
able to access the API documentation easily and the yard server is one
such way.  This patch addresses the problem by adding a dependency on
yard and redcarpet for the development group only.  This will prevent
the yard and redcarpet gem from sucking in a large number of
dependencies when running in a CI environment because these environments
are expected to omit development only dependencies when bootstrapping
using `bundle install --path vendor --without development`
(#11276) Checksum files in binary mode

Previously, the puppet module tool would checksum a file in text mode. On
Windows, this would cause the module tool to report that a module had
local changes due to it computing the wrong MD5 checksum (due to File.read
translating '\r\n' to '\n').

This commit changes it to read the file in binary mode instead. This has
no effect on non-Windows platforms.
(#11276) Expand Dir.pwd

On Windows, Dir.pwd returns a path with backslashes, which confuses the
relative path from, since it doesn't know that 'C:/' and 'C:\' are the
same.

This commit simply expands Dir.pwd which results in forward slashes.
(#18950) Add modulo operator

The modulo arithmetic operator.
(#1424) Make Struct::Passwd more platform agnostic

The nameservice_spec was failing with `ArgumentError: struct size
differs` on Windows, because the initialize method for Struct::Passwd
takes different sets of arguments depending on flags set when ruby was
compiled, e.g. HAVE_ST_PW_GECOS, HAVE_ST_PW_CHANGE, etc.

This commit modifies the test to create a Struct::Passwd object using
the 4 mandatory fields: name, password, uid, gid. Since the other
optional fields weren't used in the test, this seems like the safest
approach.

This commit also excludes the test that relies on Struct::Group, because
that class only exists if HAVE_GETGRENT is defined at compile time. This
commit skips the test when run on windows.
(#11276) Load default root certs on Windows

On Windows calling OpenSSL::X509::Store#set_default_paths does nothing. As
a result, puppet is unable to make authenticated SSL connections to
well-known SSL servers, like forge.puppetlabs.com.

This commit adds a RootCerts class that loads the root certs from the
Windows system cert store, and monkey patches the
OpenSSL::X509::Store#set_default_paths to behave as expected on Windows.

Note the actual semantics for set_default_paths are slightly different,
in that on *nix, it sets the paths that openssl will look for trusted root
certs, whereas this patch loads them into the X509::Store object on
Windows. But the net effect is the same, we're specifying the set of root
certs that we trust when authenticating SSL servers.

This commit monkey patches openssl, because there isn't a central way to
create SSL contexts in ruby. Specifically, open-uri hides the process of
setting up the SSL context, so the caller doesn't have to "worry" about
it. In doing so, it calls set_default_paths expecting that is all that is
needed. But it makes it next to impossible for the caller to add other
root certs.

Specifically, the module tool uses open-uri to download tar.gz content,
but that said the issue is not specific to the module tool.

This commit also adds an SSL acceptance test.
Merge branch 'dalen-modulo_operator'

* dalen-modulo_operator:
  (#18950) Add modulo operator

closes #1437
Update PUPPETVERSION to 3.1.0
Merge branch '3.1.x'
Incorporate Red Hat's NetworkManager fix into upstream

Red Hat/Fedora have been carrying a patch to restart puppet if
resolv.conf or other networking configuration settings are updated via
Network Manager.  We should be doing this as well, as it's a good idea.

The patch and problem are described in the following bugs:
https://projects.puppetlabs.com/issues/2776
https://bugzilla.redhat.com/532085

Note this only applies to rpms, and only to builds for EL/Fedora. This
patch/fix won't be applied/installed on any debian varient, sles, mac
etc.

Signed-off-by: Michael Stahnke <stahnma@puppetlabs.com>
Fixup to NetworkManager dispatcher to be compatible with systemd

The previous patch from Red Hat was only compatible with sysV init
systems. This patch modifies the script to enable systemd calls when
appropriate.

Signed-off-by: Michael Stahnke <stahnma@puppetlabs.com>