(PUP-3605) Add new OpenBSD user provider

This new provider is now needed because of the '-S' flag to usermod as well as
the different way expiry is set.
(PUP-1270) downgrade IPS packages in-place instead of uninstall-reinstall

Only use 'pkg install' when the package is absent, and 'pkg update'
otherwise. pkg(1) can do both downgrades and upgrades this way.
(PUP-1270) Use full IPS package version matching

Originally, the pkg provider would only consider IPS versions partially,
eg. '1.0-0.151006', due to not calling pkg(1) with -v. This version
string is missing the "build version" and "timestamp" (documented in
pkg(5)). This causes several issues:

- ensure => latest does nothing when the updated package only has a
  changed timestamp
- ensure => '1.0,5.11-0.151006:20140220T084443Z' is always applied,
  because it's not string equal to what puppet thinks is the installed
version ('1.0-0.151006'); this causes pkg(1) to exit with status 4,
which makes puppet throw an error
- ensure => '1.0-0.151006' sort of works; on the first run, it installs
  the latest available matching version (due to pkg(1) working that
  way), and on subsequent runs does nothing. This can lead to subtle bugs
  where systems provisioned later do not necessarily have the same version
  of a package installed (ie. if a newer-timestamped one was released in
  the meantime).

This commit implements a provider-specific insync? for the pkg type.
Unfortunately it's not possible to fix this issue without allowing
less-than-explicit version numbers in ensure (because that's the
original behavior) without breaking backward compatibility. We try to
match the default behavior of pkg(1) when encountering
less-than-explicit versions in ensure, and throw warnings for such
implicit version matches.
(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-1270) don't fail implicit version install when is == :absent
(PUP-1270) add tests for implicit version ensures
(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) PUP-3638 clarify puppet-doc manpage re: rdoc on manifests

remove the manifest examples and related doc
this functionality has been removed in PUP-3638
(PUP-2563) Gracefully exit on ruby 187

Previously, running puppet on ruby 187 would fail in an unhelpful way:

    in `const_defined?': wrong number of arguments (2 for 1) (ArgumentError)

Since users have historically installed puppet using whatever ruby
version happens to be installed, we want to ensure puppet displays a
useful error message that ruby 1.9.3 or greater is required.

This commit puts the check in lib/puppet.rb, which handles the various
puppet entry points: when executing the `puppet` command, when using
puppet as a library, e.g. `require 'puppet'`, and via passenger's
config.ru. In the `puppet` command case, we need to rescue the
LoadError, print the error message and exit. In the other two cases, we
let the application decide how it wants to handle the LoadError.
Merge pull request #3381 from er0ck/maint/master/PUP-3638-remove_manifest_rdoc_from_doc_manpage

(maint) PUP-3638 clarify puppet-doc manpage re: rdoc on manifests
(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.