(Maint) Use --api instead of generic --query in yardopts
(#14872) PMT respect environment's module path

This patch fixes the Puppet::ModuleTool#set_option_defaults method such that
it respects the specified environment (if any) when determining the default
value for the --target-dir (the modules install directory) option.
The patch overhauls the entire method in the process to make it more readable,
and it also updates relevant unit tests and adds a pair of new acceptance
tests.
Merge branch 'mruzicka-ticket/master/14872-PMT-respect-environments'

* mruzicka-ticket/master/14872-PMT-respect-environments:
  (#14872) PMT respect environment's module path
(yardoc) Fix mixup of 'is' vs. 'should' in Type#[](name) yardoc.

The method was documented to return the 'is' value when it should have
been the 'should' value. This commit corrects this.
Revert "Merge branch 'mruzicka-ticket/master/14872-PMT-respect-environments'"

This reverts commit 832dc76fe7305e3efebd4220498ad0353fbf8ab8, reversing
changes made to 7490e18b915b50f7ee0204332d5dad20408cc8f1.
Update PUPPETVERSION to 3.1.0-rc1
Merge branch 'fix/master/14872_revert_pmt_modulepath'

* fix/master/14872_revert_pmt_modulepath:
  Revert "Merge branch 'mruzicka-ticket/master/14872-PMT-respect-environments'"
Merge branch 'release/3.1.x/3.1.0-rc1'
Cast fqdn as string for gsub
(#17716) HPUX_user_provider
Updated to allow user provider to manage passwords on hpux in either
normal or trusted computing modes. Updated spec file to make sure
changes are in place. Specifically manages_passwords, user exists and
password function returns a password.
(#18440) Don't make class methods private

Previously, the launchd service provider `enabled?` instance method was
calling the `launchd_overrides` private class method, which is not
allowed. This issue wasn't noticed, because the spec test was overly
stubbing the provider.

This commit makes the class methods public to avoid these sorts of
problems in the future.
(#17716) Improve the provider spec tests for hpux password management

Without this patch the behavior tests for the HPUX user provider are
failing with this error:

    Failures:
      1) Puppet::Type::User::ProviderHpuxuseradd should return password entry if exists
         Failure/Error: @provider.password.should be_true
           expected: true value
                got: nil
         # ./spec/unit/provider/user/hpux_spec.rb:43:in `block (2 levels) in <top (required)>'

This patch fixes the problem by updating the spec tests to stub only when
necessary.
(maint) Re-indent the HPUX user provider file

Without this patch the hpux user provider uses 4 space soft tabs.  This
patch re-formats the file to our 2 space soft tab standard.
Merge branch 'jjperry69-17716/master/17716_HPUX_user_provider'

* jjperry69-17716/master/17716_HPUX_user_provider:
  (maint) Re-indent the HPUX user provider file
  (#17716) Improve the provider spec tests for hpux password management
  (#17716) HPUX_user_provider Updated to allow user provider to manage passwords on hpux in either normal or trusted computing modes. Updated spec file to make sure changes are in place. Specifically manages_passwords, user exists and password function returns a password.
Merge pull request #1383 from Aethylred/fix/master/string_miscast_settings.rb

Cast fqdn as string for gsub
(#11675) Remove duplicate flag on useradd

The check in the useradd provider caused puppet to add the expiry flag
twice when adding a user.

The addproperties method does already add the expiry flag to the
argument list. The default flag (dash and first letter of the property)
does also match what useradd expects, so everything just works "out of
the box".

The old method does also caused puppet to pass "-e EXPIRY" as ONE
argument instead of two. Kind of surprising that useradd actually does
not complain about that.
maint: Add specs for password min age/max age
maint: Improve test coverage for nameservice provider

The nameservice provider lacks a spec file so I tried to cover the most
important methods.

The changes to the nameservice provider itself do not imply any functional
changes or changes in behaviour and are just there to make writing specs
easier.
(#11675) Add value munging for nameservice provider

The nameservice provider defines a helper method `options` to specify
the flag for a property that will be used when creating the appropiate
useradd/usermod commandline. This commit now adds the options `munge` and
`umunge` to define methods that will automtically transformed the
property value when building the useradd/usermod command or when
retrieving the current value.

This munging is realized at a provider level so a unified value can be
used at a resource type level to represent different values at a
provider level.

One future use case could be the expiry property. We can define a value
of :absent at a resource type level to represent "account should not
expire" and represent it as '00-00-0000' in the pw provider and as ' '
in the useradd provider.
(#11675) Implement expiry in user provider

The useradd and pw provider claim to support expiry of user accounts.
And while they seem to be able to *set* the expiry, they don't seem to
implement any way to *get* the current value.

While this is still true for the pw provider (I am not familiar with
AIX) it should now work correctly with the useradd provider.

The expiry property uses munging at a provider level to convert
correctly to and from :absent (useraccount should not expire).