(PUP-1962) Fix class relationships

Fixes the following manifest: Class[foo] -> Class[bar]

Would fail with undefined local variable or method `host_class'
exception.
PUP-1975 Add environment information to facts save during compilation

Previously the save method on the indirector was called without including
the environment information. This patch includes the environment so a custom
terminus may utilize this information during storage.

Signed-off-by: Ken Barber <ken@bob.sh>
PUP-1975 Include transaction_uuid in facts terminus save during compilation

This includes transaction_uuid in the options sent to the save method for the
facts terminus.

Signed-off-by: Ken Barber <ken@bob.sh>
(PUP-1973) Fix getting scope vars to template for inherited scope

The change in PUP-1220 (turning off access to dynamic scope)
accidentally also turned off access to inherited scope.

This is a big problem because it blocks the most used pattern of getting
parameters into classes in modules (and then accessing them in
templates).
Merge pull request #2445 from hlindberg/pup-1973_fix-access-to-inherited-scope

(PUP-1973) Fix getting scope vars to template for inherited scope
(PUP-1279) Make Class[::p] remove the ::

When transformed to 3x to form a reference to a class, the 3x runtime
does not handle ::p (it expects the :: to have been removed), and
subsequently it is not able to find classes starting with ::.

This fix removes leading '::' when a PHostClassType is created.
Merge pull request #2446 from hlindberg/pup-1979_class-ref-with-absolute-name

(PUP-1279) Make Class[::p] remove the ::
(PUP-1978) Fix issues with [] operator error reporting

There were issues when errors where reported from using the [] operator
with LHS being a Type (Class, Resource) and the given keys were given
as an empty array (resulting in no arguments). The error reporting was
faulty in this case and blamed the wrong object. This resulted in the
error reporting logic to not find a source reference.

This also fixes the issue message text when min/max was the same value.
Merge pull request #2448 from hlindberg/pup-1978_class-resource-with-empty-name-list

(PUP-1978) Fix issues with [] operator error reporting
(PUP-1955) Use symbols not booleans in purge_ssh_keys

Unfortunately, `defaultto false` is somewhat broken: a parameter default of
`false` is cast to `nil` (PUP-1955). This patch alters the boolean
representation of the User Type parameter `purge_ssh_keys` to use Symbols
instead of booleans as `deafaultto :false` works correctly.

Also added some logic to convert boolean values (`true`) and string values
(`"true"`) to symbols during munging. Both of these cases can occur depending
on whether a quoted string or bare word is used to define a parameter in the
Puppet manifest.
(PUP-1955) Generate an empty array when purge_ssh_keys is false

This patch modifies the `eval_generate` method of the User type to return an
empty array if the `purge_ssh_keys` parameter is switched off. Previously a
`nil` was returned which caused an exception during catalog application.
(PUP-1854) add a global Log_level parameter

Attempt at adding a global log_level param to use in puppet.conf and on cli to set the maximum log level (in other words, quiet puppet down)

- debug output cleanup
- move log_level param to main section to allow use everywhere
- leave verbose at info as it was
- Use Eric Dalen's advice and use Puppet[:log_level] (which does work)
(PUP-1854) add a global Log_level parameter

Attempt at adding a global log_level param to use in puppet.conf and on cli to set the maximum log level (in other words, quiet puppet down)

- debug output cleanup
- move log_level param to main section to allow use everywhere
- leave verbose at info as it was
- Use Eric Dalen's advice and use Puppet[:log_level] (which does work)

As suggested by Andrew Parker
- move setting to Puppet.initialize_settings in puppet.rb
- setting type changed to :enum
(PUP-530) Make install.rb check for hiera before installing

From ticket:
The `install.rb` script for puppet checks for facter and will refuse to install
puppet if facter is not on the system. However, puppet also cannot function
correctly without hiera and the `install.rb` script does not check for that.
The installation script that we ship in the tarball should also check for hiera
being present.

This commit adds hiera to the list of prerequisite libraries required before
install.rb will install puppet.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
(PUP-530) Add a build depends of hiera

By requiring hiera in install.rb, we force this as a build dependency of puppet
for any platform that depends on install.rb to build packages. This commit
  updates debian and redhat packaging to have a build dependency on hiera to
  satisfy this requirement.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
(maint) Fix yum package provider syntax for Ruby 1.8.7.

Ruby 1.8.7 does not accept additional arguments after a splat.

The fix is to put the additional arguments into the array being splatted.
Merge pull request #2413 from zipkid/global_loglevel

(PUP-1854) Add a global log level setting
Merge pull request #2323 from MosesMendoza/PUP-530/master/installer_check_for_hiera

(PUP-530) Make install.rb check for hiera before installing
Merge pull request #2449 from Sharpie/PUP-1955-fix-ssh-purge

(PUP-1955) Fixes to purge_ssh_keys
Merge pull request #2444 from kbarber/ticket/stable/pup-1975-add_environment-to-facts-save

PUP-1975 Add environment information to facts save during compilation