(DOCUMENT-22) Clarify matching of crontab entries

This updates the documentation to be consistent with behavior introduced in
commit da9162c.
(PUP-1220) apply proper scoping rules to scope#to_hash

The fix for #1427 added an instance method to the scope class
for exporting all variables from the local scope. This method
apparently re-implemented the dynamic scoping rules.

When those were removed, the #to_hash method was left as was.
As a result, dynamic scoping still worked from within templates,
when using the @variable syntax in the erb code.

Fix this by using the new #enclosing_scope method so that proper
scoping rules are used instead.
(PUP-1220) make the dynamic scoping fix for #22800 flexible

As suggested by Henrik Lindberg, make the parser only behave correctly
when parser=future is configured. If working manifests rely on the
regression, the next point release won't break them. Instead, users can
test for this using the configuration setting.

The next major release should adopt the fix as standard behavior and
the legacy support should be removed. Since the variable lookups in
templates relies on the accessing of local attributes, there is no
way to issue deprecation warnings to users.
(PUP-1220) optimize template scoping fix

Following enhancements as suggested by Erik Dalen, Andy Parker et al.
* prefer Puppet[:parser] over Puppet['parser']
* cache the config value of Puppet[:parser]
* pick the future vs. legacy branch only once per template
(maint) Typo fixes: repeated words (e.g. "the the")
(maint) Revise help for puppet config subcommand

Mostly adding context about the idea of sections, inc. list of available sections.
(pup-1766) Remove duplicate test
(pup-1766) Add support for multiple defaultfor's

Prior to this change, it was possible to specify a defaultfor to
cover, say, multiple osfamily's e.g. with:
    defaultfor :osfamily => [:os1, :os2]
Or it was possible to specify a more complex hash, e.g. with
    defaultfor :osfamily => :os1, :operatingsystemmajorrelease => "42"

But if more specificity for just one of the operatingsystem values was
needed, defaultfor couldn't support that. This change allows for this, e.g.:
    defaultfor :osfamily => :os1  # all variants of os1
    defaultfor :osfamily => :os2, :operatingsystemmajrelease => "42"  # only release #42 of this os

To support this change Provider defaults is now an array of hashes (formerly,
it was a merge of the hashes provided by all defaultfor invocations), which requires
commensurate updates to the specificity method and the dochook.

There are also some new spec tests for representative defaultfor combinations, and
two spec tests needed to be updated with the expectation that Facter will be invoked
to assess defaultprovider specificity.
(pup-1766) Set systemd as a default provider for the service type on rhel7
(pup-1766) Add support for :feature to defaultfor

Previous to this change defaultfor had no support for a key
of :feature, however the exec/posix.rb provider assumed
there was such support.

The only reason this worked was that the specificity method
evaluated hash length independent of whether the hash matched
reality in anyway. E.g. exec/posix.rb could just as easily have
specified:
  defaultfor :foo => :nonsense
And it would have a specificity of 1 (yay).

This stops working with the changes in this pull request to
make specificity actually evaluate whether the specified hash
is match in anyway.

So, this commit adds the :feature support to defaultfor which
exec/posix.rb already assumed it had. That file was the only
use of 'defaultfor :feature' I found, but adding this support
seems like potentially useful as an enhancement.
(pup-1766) Break out at first failed match

The previous version of default_match walked through all of the
hash elements even after finding a failure. This patch uses all?
to break out at the first failed match; as an additional benefit,
the code is cleaner.
(PUP-1275) Never try to fork on Windows

In 3.0.2, in commit 4d1a2f83d9 for #17361 restored the ability for *nix
agents to apply a catalog in a forked child process. But the change
caused Windows agents to also try to fork if run without the `--onetime`
flag.

This regression means you can't run Windows agents with `--listen` and
kick them.

This commit adds a `can_fork?` method to ensure we only attempt to fork
if we both can and should fork. There is no change in behavior for *nix
agents.
(PUP-1085) Make Pacman provider group-aware

The Archlinux Pacman package manager has a concept of package groups,
which due to the provider not checking for a group being installed
caused all contained packages to be reinstalled.

This commit uses `pacman -Qg` in addition to `pacman -Q` to check for
installed groups.

Because groups don't have versions this will still cause all packages in
a group to be reinstalled if ensure is set to latest.
(PUP-876) Skip resource service check on EL 6

Redmine issues (#4123) and (#4124) added acceptance tests on RHEL
systems to ensure that the services listed by chkconfig matched the list
of services returned by `puppet resource service`, but this assumed that
chkconfig would be authoritative for all running services. Commit
7bdcbea enabled the upstart service provider on EL 6 systems which
breaks this assumption and causes the acceptance tests to fail. This
commit disables these tests on EL 6 since the test is no longer
meaningful.
(maint) Change Travis CI to output documentation format for specs.

We've been observing a sporadic "rake aborted" failure on Travis CI.
This change turns on "documentation" format for rspec so that we can
at least see if the test run is aborting on the same test each time.
Merge pull request #2406 from peterhuene/travis/documentation

(maint) Change Travis CI to output documentation format for specs.
(PUP-1821) Require Facter 1.7 or greater

We're starting to rely on facts that were released in Facter 1.7.0,
which means that we always need to pull in 1.7 to make those facts
available.
Merge pull request #2404 from adrienthebo/maint/master/pup-876-skip_resource_service_compare_on_redhat_6

(PUP-876) Skip resource service check on EL 6
(PUP-1839) Flush cache when setting value

The `set_value` method was deprecated and rewritten as part of the work
to implement `puppet config set`. However the new implementation lost
the call to `unsafe_clear_cache` which caused any set values to not show
up if the setting's value had previously been read. Also, the method was
still used by the `puppet device` code.

This is a small fix to get `puppet device` working again. This flushes
the cache and removes the deprecation.
(PUP-1839) Re-deprecate set_value

The set_value method really is deprecated.