(PUP-2904) Make functions 4 API require symbol param names

There was a mix of String and Symbol in our code. This enforces
that parameter names must be Symbol. Thus it is up to the caller to
use the right thing as this is better than performing an intern
(performance and may intern something big/bad).
(PUP-3013) Accept. tests - 3.7 PMT updates build

This commit adds additional acceptance test coverage for updates
the puppet module build command. These tests validate the
following:

    * detection of symlinks in module
    * detection of file changes created by build process
(PUP-3479) (PUP-3737) Update Windows ffi ~> 1.9.5

Ruby 2.1.3 on Windows requires ffi 1.9.5. Update our Windows dependencies
to allow 1.9.5+ to be selected.

This commit was originally merged to the master branch targeted at 4.x,
when it should have been targeted first at the stable branch to affect
the 3.7.x release and keep it in sync with Facter 2.3.0, which now
requires ffi ~> 1.9.5

Gem installation of Puppet on Windows is thus currently broken until
Puppet 3.7.4 ships or a workaround is employed, where Facter 2.2.0 is
installed by gem prior to installing Puppet.
Merge pull request #3378 from Iristyle/ticket/stable/PUP-3479-update-FFI-dependency-1.9.5

(PUP-3479) (PUP-3737) Update Windows ffi ~> 1.9.5
(maint) Untie parser/files and module

The parser/files module was explicitly handling
Puppet::Module::InvalidName, forcing it to require puppet/module. These
errors are being handled by Puppet::Node::Environment at a lower layer,
and we no longer need to couple module and parser/files.

In addition, Pupper::Module#match_manifest ensures that init.pp is
always added if present, which means that explicitly searching for
init.pp would return an array with the init.pp file listed twice. Hence
the added uniq.
(PUP-3268) Remove use of templatedir setting from parser/files

The templatedir setting is deprecated and being removed for Puppet 4.
It was used only in Puppet::Parser::Files to provide an alternate path
location for templates, instead of looking them up in modules. This
commit removes the use of templatedir, allowing paths to be looked up
only from an absolute path or relative to a module.
(maint) Refactor parser/files find helpers

Puppet::Parser::Files#find_file and #find_template methods were
performing the same work to vet an absolute path and lookup a module
prior to calling an implementation specific method on that module. The
find_template method had a helper which this commit generalizes to work
for both find_file and find_template.
(PUP-3268) Remove --manifestdir reference from application/doc

The doc application used --manifestdir as a means of specifying the
directory of manifests to generate docs for in rdoc mode.  Since
manifestdir is being removed for Puppet 4, and the Puppet Strings module
is being used instead for all manifest documentation, this commit
removes references to manifestdir in the doc application.
(PUP-3728) Fix off by one error in cron month names

When a name, such as "January", is used to specify a month in the Cron type,
the resulting numeric value would be off by one (i.e. "0"). This is because
month is unique among "namable" crotab entries in that it does not use 0-based
indexing. This patch updates the spec tests to enforce this expectation and
fixes the issue by padding out the list of acceptable month names so that
indices start at 1.
Merge pull request #3380 from Sharpie/PUP-3728-fix-cron-monthnames

(PUP-3728) Fix off by one error in cron month names
(maint) Fix two loader issues

This fixes two existing bugs related to the loaders.  The first is that
the Puppet::Pops::Loaders was always looking up the 'production'
environment conf, rather than the environment.conf for the provided
environment.  The second was that the new environment_data_provider
setting was mssing from the Static environment conf class, breaking
Static environment loaders.
(PUP-3268) Use explicit environment references in specs

Specs which relied on legacy environment loaders implicitly generating
environments for unknown environment names need to be updated to use
explicitly created environments. This is because the directory environment
loaders will instead raise environment not found errors.  Since legacy
environments are going to be removed, this change needs to happen before
we add a default to the environmentpath setting and remove the legacy
code.

These specs have been adjusted to either directly supply a created
environment to the methods under test, or to set up a static environment
loader providing some explicitly set of environment(s) to the tests.

I also made some stylistic changes in specs that I was touching to avoid
mocking, replace use of instance variables with let statements, and to
prefer expect over should.
(PUP-3268) Set directory environments as default

Prior to this commit, environmentpath defaulted to the empty string,
which meant that legacy environment loaders would be used. As a first
step to removing the legacy environment code, environmentpath is now set
to "$confdir/environments", defaulting to directory loaders.

In addition, this commit completely removes the deprecated manifestdir
and templatedir settings. It also removes the defaults for manifest and
modulepath, which are only to be allowed in environment.conf and on the
commandline. Enforcement of that is still to be done, as noted by the
XXX_ENV comments. Manifest's default is changed to '/dev/null'.
(maint) Add inspect calls for debugging Settings value sets

These methods just make it a little easier to debug the Puppet::Settings
ChainedValues value sets, avoiding output of the default setting
instance themselves which contain reference to the settings object,
which has all the settings...and produces a lot of output.
(PUP-3268) Set manifest default to nil

The manifest setting can still be set on the commandline but has no
meaningful default.  It was changed to /dev/null as an interim fix,
because a FileSetting has difficulty with "" (its munge method expands
this to current working directory), and with nil (breaks in the Settings
catalog). In this patch, Settings#to_catalog is changed to ignore file
settings with a nil value.

The lack of a default manifest value has an impact on the specs because
many of them execute without a fully initialized settings layer, and
Settings.global_defaults_initialized? is still false. Previously this
was guarding whether or not we would read a directory environment
environment.conf, because we could not be sure of an environmentpath,
but now that this setting has a default, this guard is dropped from
Settings#value_sets_for
(PUP-3268) Remove legacy environment loaders

Removes the Puppet::Environments::Legacy loader now that directory
environments are enabled by default.  As a consequence, attempting to
start up puppet with environmentpath explicitly set to nothing will
raise a Puppet::Error during startup.

For example:

  $confdir/puppet.conf
    [main]
    environmentpath=

will fail.
(maint) Make Puppet::Module#== public

Puppet::Module's equality method was part of a private block for no
reason I could see in the history, and this was preventing specs from
checking that moduleone == sameasmoduleone.  This patch moves ==() up to
where it is public.
(PUP-3268) Remove legacy environment support

Removes the deprecated legacy environment construction and cacheing code
from Puppet::Node::Environment. Continues to use create() for instance
creation; new delegates to create() and is marked private now.
References to clear the legacy environment cache are removed from
Settings and TestHelper. Environment names are explicitly interned on
creation. This was being done already in the environment loaders, so
this change just makes the behavior consistent for manual use of
Puppet::Node::Environment.create().  The node/environment_spec was
overhauled as well to remove mocking and update for current rspec
practices.
(PUP-3268) Remove file watching from environment

File watching for files loaded through the environment was only being
done for legacy environments. Now that legacy environments have been
removed, the file watching code in Node::Environment,
Resource::TypeCollection, and the E4ParserAdapter goes away as well.

The Directories environment loader no longer needs to turn off file
watching for directory environments.

There is still an Environment#check_for_reparse method which tests if
the Puppet[:code] has changed or last parse of the environment failed.
It is called by the resource_type/parser indirector, the parser face and
the parser/compiler, and may no longer be necessary.
(PUP-3268) Remove Environment.current

PUP-1118 removed the global $environment available as
Environment.current, and then PUP-1735 re-added the method with a
deprecation warning, but as a lookup of the Puppet context
:current_environment instead. Now we can remove the method completely
for Puppet 4.