(PUP-3117) Allow multiple *=> in the same body and error on duplicate

This fixes a problem in the grammar that made it impossible to have
more than one *=> per body. 

This commit also adds a check for duplicate entries in the resulting
hash with the final set of parameter to value mapping.
(PUP-3117) Add tests for combination of default / hash
(maint) Make PuppetSpec::Language emit more helpful stack traces

This change was required to be able to see anything relevant regarding
where a problem originated. The fix is to patch the stacktrace
for failed expectencies. While not ideal there is very little that can
be done with Rspec 2 to fix this except reimplementing the support for
produces and fails to be matchers. (Rspec 3 has composable matchers that
may make this simpler).

A ticket has been logged about further improvements to the two support
functions (produces, and fails).
(PUP-3117) Complete the implementation of resource expression

This completes the implenentation of the Resource Expression.

* The LHS must now be a QualifiedName (i.e. file, notify), or
  a QualifiedReference (i.e. File, Notify), or an access expression
  with a left QualifiedReference (i.e. Resource[file]), or literal
  'class'

* The result of the LHS must be a CatalogEntry type, and it may not
  be detailed to title level.

* The * => syntax can be used to to unfold a hash. It may be used
  once per titled resource body. Attribute names must be unique across
  the attributes set with name => expr, and those set with * => hash.
(maint) Remove unused issue codes APPEND_FAILED, and DELETE_FAILED
(maint) Fix faulty issue ILLEGAL_NUMERIC_PARAMETER and validation

There was a typo in the message that referenced a non existing variable.
This was undetected because there was no test to cover this.

When testing the expected behavior, it was found that the validation
was not correct as it allowed parameters to have hexadecimal names, but
not octal names. Now all numeric parameter names are disallowed (they
cannot be used or addressed anyway).
(maint) Fix bad comment for issue ILLEGAL_VARIABLE_EXPRESSION
(PUP-3069) Add default manifest settings

Some Puppet installations do not use environment specific manifests
(particularly when an ENC is in use), however may still have global
setup required for all environments. For these installations it is
convenient to have a :default_manifest setting specified rather than
copying them manifest into every environment.

There are also installations which have a separation of roles between
users mainting the puppet master, puppet.conf and enc, and users making
per environment module changes. In these cases some Puppet installations
prefer to restrict the use of per environment manifests.

These two use cases were handled by setting the global manifest to a
non-interpolated path while setting the global modulepath to a path
interpolated with $environment.

With these settings being deprecated, directory environment
installations did not provide a means of preserving this functionality.

This patch addresses this by providing two new settings:

* default_manifest - is now the fallback manifest path if non is
specified in a given environment's environment.conf. It defaults to the
environment root relative path './manifests' which is the same default
that was previously hardset in early version of directory environments.
* restrict_environment_manifest - if set to true, enforces that
environments cannot define their own manifest setting, and validates
that default_manifest is set to an absolute path.

It is an initialization error if default_manifest is set to a string
that has an '$environment' to be interpolated within it.

We also log an error if restrict_environment_manifest is true and the
loaded environment's environment.conf has a manifest setting that
differs from the default_manifest setting.
(PUP-3069) Add spec test for new default options

Added tests for checking that default_manifest behaves properly when
given $environment. Also when restrict_environment_manifest is true with
a non-relative default_manifest.

This commit also fixed the hook on the :default_manifest setting to
validate that $environment was not present when setting the value.
(PUP-3069) Halt compile if environment has manifest conflict

Henrik brought up that with the new restrict_environment_manifest
setting set true, authors of modules in a particular environment
may be surprised by a manifest they have specified in their
environment.conf not being pulled in, leading to bad behavior when a
catalog is executed.  Although this is logged on the master, compilation
delivery and catalog execution is not prevented.

This commit will raise an exception on the master prior to catalog
compilation if it detect's a conflict between manifest settings in the
requested environment.
(PUP-3069) Add an integration spec for default_manifest

This adds integration testing of the new default_manifest and
restrict_environment_manifest settings.  It tests all the way from
Puppet initialization from actual puppet.conf files and
environment/manifest files through catalog compilation, simulating
Puppet master activity.  Since these settings are purely server-side
constructs, in that they do not impact the agent beyond the contents of
the final catalog the agent receives, I believe this is sufficient to
validate them.
(maint) Clear record of configured deprecated settings

We cache a list of deprecated settings that have been configured in the
initial parse_config, so that later initialization steps allow us to
read the :disable_warnings value, and then decide whether or not to
actually issue a particular warning.

But we weren't clearing this cache in the unsafe_clear call, which was
allowing this state to leak across specs.  Once we added that cache
clear to unsafe_clear, we then had to reorder parse_config steps for
unsafe_clear, followed by record_deprecations_from_puppet_conf(data).
(PUP-3069) Change restrict_environment_manifest name

After discussion with Nick Fagerlund and Henrik Lindberg, changing
restrict_environment_manifest setting to
disable_per_environment_manifest to more clearly reflect what the
setting does.
Merge pull request #3024 from hlindberg/PUP-3117_resource-expression-splat-rocket-alt

(PUP-3117) Complete the Resource Expression implementation
(PUP-3069) Update default_manifest setting descriptions

Better descriptions of default_manifest and
disable_per_environment_manifest courtesy of Nick Fagerlund.
(PUP-3069) Test both future and current parser with default_manifest

Previously the environments/default_manifest_spec.rb was only running
with the current parser. This runs the set of tests for both the future
and current parser cases.
(PUP-3069) Clear configuration_file for tests

The new default_manifest integration spec is parsing actual
configuration files and uncovered that our Settings do not clear the
@configuration_file data when #unsafe_clear is called.  This allows
parsed settings to leak across specs.

Specifically dropping the @configuration_file in the test helper
Settings#clear_everything_for_tests, resolves this, without changing the
behavior of the Settings#clear, and through it, the Puppet.clear
methods.
Merge pull request #3032 from jpartlow/feature/master/pup-3069-add-defaultmanifest

Feature/master/pup 3069 add defaultmanifest
(PUP-2349) Add windows specific expectation for deprecation_warning

Previously, the spec test assumed that no deprecation warnings would be issued.
However, the test relies on puppet using the `source_permissions` of the
source, and that behavior is deprecated on Windows. As a result, the test
was failing on Windows.

This commit updates the test to expect only the "Copying owner/mode/group/.."
deprecation warning on Windows, and no deprecation warnings on other platforms.
(PUP-2349) Add windows specific expectation for deprecation_warning

Previously, the spec test assumed that no deprecation warnings would be issued.
However, the test relies on puppet using the `source_permissions` of the
source, and that behavior is deprecated on Windows. As a result, the test
was failing on Windows.

This commit updates the test to expect only the "Copying owner/mode/group/.."
deprecation warning on Windows, and no deprecation warnings on other platforms.

Reviewed-by: Josh Partlow <joshua.partlow@puppetlabs.com>