(#18636) Remove reference to non-existant token

There is no CLASSNAME token. By trying to create the acceptable? method
for it the code actually created the acceptable? method on nil.
(#18636) Change to friendlier way of specifying suitability

The previous way of setting the suitability of a token was very hard to
grasp for my feeble mind. It also caused RDoc to have problems parsing
the code unless developers were always aware that they had to enclose
the method definitions in stopdoc/startdoc.

This changes it to provide a proc that determines suitability rather
than trying to change the class after the fact. There may be a small
performance hit because it is now two method calls, but I think this is
much more maintainable.
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.
(#17777) Update debian build-depends to only use ruby1.8

Previously puppet had a build-depends of ruby, which means that on wheezy and
quantal, the default ruby of ruby1.9 was used to build puppet. Unfortunately,
this means that the shebangs for bin/puppet refer to bin/ruby1.9.1 instead of
ruby1.8. Puppet 2.7.x is installed in the ruby 1.8 specific libdir for ruby, so
ruby1.9.1 has no way of loading puppet in this case. This commit updates the
build-depends to correctly use ruby1.8 only, so bin/puppet gets the correct
ruby which can load the correct libraries.
Note: in mergeups from 2.7.x, this
needs to be undone. The build-depends of ruby is correct for puppet 3 and
later.
Merge pull request #1412 from haus/ticket/2.7.x/17777_update_build_depends

(#17777) Update debian build-depends to only use ruby1.8
Merge branch '2.7.x' into 3.0.x

Keep 3.0.x Build-Depends of ruby (not the 2.7.x Build-Depends of ruby1.8)

Conflicts:
	ext/debian/control
Merge branch '3.0.x'
(#16752) Add support for pkg.conf on openbsd

Previously only local file sources were supported for openbsd
packages. Pkg.conf is a mechanism that openbsd uses to download
packages from HTTP sources as well. This patch adds checking for
the presence of 'installpath' lines in pkg.conf and, if one
are found and if the last character of an installpath line is a
::File::SEPARATOR (aka `/` character on openbsd) then it will
become the value of the environment variable PKG_PATH previous to
pkgadd invocation, which tells pkgadd to use the URL.
(#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.