(#7285) Add spec for Augeas initialisation and file loading

Simple initialisaton tests with combinations of lens include paths, explicit
file/lens loading against a few example files.
(#13379) Add path of pluginsync'd lenses to Augeas load_path automatically

The path $libdir/augeas/lenses is added to the Augeas load_path initialisation
option automatically to support lenses being pluginsynced.  Lenses should be
added into the <module>/lib/augeas/lenses directory inside a module.

The load_path parameter has been expanded to support an array of paths as well
as a colon-separated list.
Update acceptance tests to use confine instead of skip_test loops

Now that the test harness supports confine :except, :platform = 'windows'
(and the like), update the tests to use that syntax.
Revert changes to symbolic_modes.rb -- this test should indeed be pending
(it should eventually work on Windows).
Remove EL-related test changes from this commit.

These changes will go to the 2.6.x branch instead.
(#14296) Improve template function error message.

The current template function does not provide sufficient detail for
troubleshooting. This patch uses the backtrace to provide the fully
qualified filepath and line number.

Previous error message:
Failed to parse template test/example.erb: undefined method `[]' for
nil:NilClass at /tmp/module/test/manifests/init.pp:2 on node example

New error message:
Failed to parse template test/example.erb:
  Filepath: /tmp/module/test/templates/example.erb
  Line: 10
  Detail: undefined method `[]' for nil:NilClass
 at /tmp/module/test/manifests/init.pp:2 on node example
Significantly improve compilation performance when using modules

When autoloading classes/defines, the typeloader constructs a set of
possible locations for the class, based on its name. Effectively, it
will look in the canonical locations corresponding to each namespace in
the fully-qualified name. So for each namespace, it will ask the
environment for a Puppet::Module instance for that module, to ask it
which of the module's potentially manifests match the class it's looking
for. To answer that request, the environment instantiates a
Puppet::Module.

This amounts to potentially thousands of Puppet::Module instances being
created, because it does this many times (based on nesting of the class
name) per include/autoload/import. When Puppet::Module instances are
created, they parse and load their metadata.json file, in part to
validate their use. This implies that each compilation results in
metadata.json being parsed thousands of times, which is extremely slow
(and obviously provides no actual benefit).

Fortunately, the environment object already keeps a list of
Puppet::Module instances for every module in its modulepath. The fix
applied here is simply to change the environment such that it provides
modules by looking them up in its cached list, resulting in up to an
order of magnitude improvement in compilation time.
(#14440) Hack to allow help faces to be used as API

Because we have not done a good job of defining
state initialization life cycle when we try to use
puppet as API, we need to add a hack to the rake
manpage task so that it can generate man pages
for some faces that don't get properly initialized
w/o the hack.
Maint: De-genericize Puppet Forge references in module face

The module tool supports a private Forge right now, but only if you have THE
Forge -- the APIs are not public yet, and are still subject to change as we
build out new features. This commit changes the help text so that it doesn't
imply private repos to be an immediately viable thing.
Merge pull request #738 from nanliu/ticket/2.7.x/14296

(#14296) Improve template function error message.
Merge pull request #753 from nicklewis/type-loader-performance

Significantly improve compilation performance when using modules
Merge pull request #763 from cprice-puppet/bug/2.7.x/help-faces-as-api

Bug/2.7.x/14440-rake-manpages
Fix unit test failure in fileserver due to modules

This test is setting modulepath, and then testing that it can find
modules from the modulepath. However, the recent change to module find
causing it to read from the cached list of modules requires the cache be
cleared after changing the modulepath in order for the modules to be
found.

Also, the structure of the test changed a bit because we have to put the
modules on disk, THEN refresh the cache, THEN we can find them, rather
than putting them on disk and immediately finding them.
Merge pull request #768 from nicklewis/fix-fileserver-test-failure

Fix unit test failure in fileserver due to modules
Merge pull request #765 from nfagerlund/maint/2.7.x/no-private-forges

Maint/2.7.x/no private forges
(#14424) Expand path of the target directory

This patch expands the path of the target installation directory and
will prevent the following errors:

    Error: undefined method `each' for nil:NilClass
Merge pull request #756 from kelseyhightower/ticket/2.7.x/14424_expand_path_of_target_directory

(#14424) Expand path of the target directory
(Maint) Color console output when the win32console gem is installed

Originally, we were using a feature to detect whether the platform
supports ANSI color escape sequences. The feature used to invoke
`Puppet.features.rubygems?`, which had the side-effect of loading
rubygems, if it hadn't already been loaded.

However, the ansicolor feature could cause infinite recursive loops when
trying to log that it failed to load the ansicolor feature. So the code
for loading the win32console gem was moved into Puppet::Util::Colors in
commit 91a4a7d.

However, in doing so, rubygems was not being loaded when attempting to
`require 'win32console'`, causing Windows to always raise a LoadError,
even when the win32console gem was installed.

This commit adds an explicit call to require rubygems and now correctly
colors console output when the win32console gem is installed.
Use absolute_path in module install spec

This fixes the module install spec on windows
Merge pull request #777 from pcarlisle/maint/2.7.x/fix_module_install_specs

Use absolute_path in module install spec