(#16752) Add tests for reading installpath from /etc/pkg.conf

This commit adds tests for reading installpath from /etc/pkg.conf in the
case that a 'source' has not be specified for the package.
(#16752) Better installpath validation

Previously, if pkg.conf contained an invalid installpath, then the
openbsd package provider would accept it and set it as the package
source. For example, `installpath`, `installpath=`,
`installpath=/path`.

This commit adds better input validation, so that we only set the
package source if the regexp matches, otherwise we raise.
(#14872) PMT respect environment's module path

This is a second version of a patch which fixes the
Puppet::ModuleTool#set_option_defaults method such that it respects
the specified environment (if any) when determining the default
value for the --target-dir (the modules install directory) option.
The patch overhauls the entire method in the process to make it more
readable, and it also updates relevant unit tests and adds a pair
of new acceptance tests (which in contrast to the original patch
version don't depend on augeas).

Reviewed by: Patrick Carlisle <patrick@puppetlabs.com>
Merge branch 'ticket/14782-pmt-respect-environments'

* ticket/14782-pmt-respect-environments:
  (#14872) PMT respect environment's module path
(#18458) Make Ruby DSL manifests always reload.

Ideally it should be possible to cache Ruby DSL manifests and reload on
demand when a change is detected. Other issues prevent this at the
moment.

This change adds the ability to watch a file with an "always stale"
option. This ensure that the cached environment will be recomputed the
next time an agent checks in.

The "always stale" option is used at the two locations where a Ruby DSL
is parsed (for the site manifest, and when loading types).
(#18739) Make calling functions from Ruby DSL work.

The implementation called a function such as "include" on the scope,
when it should have used "function_include". It also did not pass
arguments in an array as expected by the scope.
Add tests for gentoo provider
(#16752) Added additional tests and allow key=value

This commit adds tests to improve regexp detection. It also modifies the
regexp to accept `installpath=path`, as openbsd does not require spaces
around the equals sign.
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
Merge branch 'omcnet-fix/master/keywords_support_in_portage_provider'

* omcnet-fix/master/keywords_support_in_portage_provider:
  Add tests for gentoo provider
  Fix portage-provider so that packages with keywords can be installed

closes #1403
(#16752) Refactor spec test

Previously, the spec test replicated logic for how pkgadd is invoked,
and did so inconsistently  -- whenever the resource's source ends in a
slash, the get_version method gets called which invokes `pkginfo -I
bash`, and the corresponding expectation was only sometimes set.

This commit moves to two types of install expectations to helper
methods, converts the test to use `let` blocks, and sets the parameters
on the resource directly, instead of needing to define a `package`
method. It also adds a test to ensure the source parameter is updated.
(#18458) Add test that "always stale" mode is supported for LoadedFile.

This checks that the always stale mode for LoadedFile works.
Later, this test (and the implementaton) may be removed as it is the
intent to also be able to only do on demand reparsing of Ruby DSL.
(#18458) Fix comment typos and removes unwanted required file.

This fixes typos in comments and instead of just copying the same text
in two location, there is now an updated explanation for what needs to
be checked later in the typeloader case. The two locations "compiler"
and "type_loader" now cross reference each other in the comments.

An unused require was also removed.
(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`
(docs) Add COMMITTERS.md to guide committers

Without this patch the information a committer needs to possess in order
to merge contributions is spread all over the place.  The information is
also out of date.

This patch addresses the problem by consolidating the information into a
single place in the root of the project repository itself.
COMMITTERS.md should replace the following documents:

 * http://projects.puppetlabs.com/projects/puppet/wiki/Engineering_Process_Minimal_HOWTO
 * http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Design_Guidelines
 * http://projects.puppetlabs.com/projects/puppet/wiki/Internal_Development_Process
 * http://projects.puppetlabs.com/projects/puppet/wiki/Engineering_done_done

[ci skip]
Merge branch 'jeffmccune-committers_doc'

* jeffmccune-committers_doc:
  (docs) Add COMMITTERS.md to guide committers

closes: #1397
(#18458) Refactor "always-stale" LoadedFile into separate class.

This refactors the always-stale functionality in LoadedFile by creating
a derived class LoadedFileAlwaysStale and changing the initialization
signature back to the original.

The branch point in type_collection now picks the always-stale class if
passed true. 

The loadedfile_spec is consequently changed back, a separate test added
for LoadedFileAlwaysStale, and example cases added to
type_collection_spec (to check if it picks the regular or the always
stale implementation based on the passed flag).
(yardoc) Fix yardoc comments and others after always-stale refactoring

Some yardoc and regular comments did not reflect the change after the
refactoring. 

Also corrects non intentional removal of empty line (debugging cruft).
(#17295) use SHA1 to sign CSRs when SHA256 is not available.

Without this patch applied puppet fails to create a CSR
with the following message -

    Error: Could not request certificate: uninitialized constant OpenSSL::Digest::SHA256

This patch adds a class Puppet::SSL::CertificateSigner that
takes care of signing certificates in CSR creation and via
the CA.  This class assumes a default hash algorithm of
SHA256 and if not available falls back to SHA1.  For the
sake of FIPS 140-2 compliance it does not try MD5 or any
earlier hash algorithms.