(#17824) PMT should not prefer pre-release versions to existing stable versions.
(#20442) Add tests for base provider methods

Prior to this commit, the base AixObject provider was supposed to raise
a Puppet::Error if called on several of the base methods; however, no
tests existed and those methods instead raised an error because the
non-existant `detail` was left in the error message from some copypasta.
This commit begins adding tests for the AixObject provider by starting
with these methods.
(#20442) Add tests for attribute conversion methods

Prior to this commit, no tests existed for the AixObject base provider
attribute conversion methods. This commit adds tests to verify validity
and structure of the attribute conversion methods.
(#20442) only execute lscmd once

Prior to this command, the AixObject provider was executing the lscmd
three times because the output is parsed in different ways. This commit
changes the provider to simply used the cached output in subsequent
parse commands.
(#20442) Filter attributes to only those managed

Prior to this commit, when trying to manage `attributes` for AIX users,
2 behaviours were occuring: 1) unmanaged attributes were included in the
"diff" and 2) regardless of current state, the changes were always
applied. This commit filters the changeset to only those `attributes`
explicitly mentioned in the manifest (or all of them in the case of
`puppet resource user`. Because the changeset is now sane, a change is
only enforced when necessary.
Adding a couple additional tests for supplied version constraints.
Certain server configurations are less diligent about whitespace.

This is primarily a fix for our acceptance testing environment.
(#17871) fix nagios types uniqness under ruby 1.9

In ruby 1.8 and earlier, splatting a 1-element array would return the first
element, post 1.9 you always get an array back.

    $ ruby-1.8.7-p371 -e 'a = ["a"]; b = *a; puts b.inspect'
    "a"

    $ ruby-1.9.3-p429 -e 'a = ["a"]; b = *a; puts b.inspect'
    ["a"]

This lead to an issue in the nagios providers where the parameters['name']
would be set to an Array, so simple 'does this resource already exist
checks' would fail as  `parameters['name'] == some_string` would always be false.

This patch changes the assignment from a splatted array to an explicit call to
args.first, which is portable between 1.8 and 1.9 and restores the intended
behaviour.
(maint) Reset confines on the pip provider after tests

The tests for pip alter the confines for the pip provider by stubbing the
underlying facter calls and then calling lazy_pip. This can leak into later
tests, causing weird failures.
Merge pull request #1654 from pvande/tickets/master/17824-pmt-should-not-prefer-prereleases

(#17824) PMT should not prefer pre-release versions over existing stable versions
(maint) More specific require for windows/package

PR1655 added "require 'puppet/type/package'" to fix a load order issue.
But this change is more general than what is needed, and we had not
tracked down exactly what was occurring.

I spent a little time running down the load order issue for
puppet/provider/package/windows/package.  An example of the mystery
effect being that prior to PR#1655 the following sequence would pass:

bundle exec rspec spec/unit/provider/package/rpm_spec.rb
spec/unit/provider/package/windows/package_spec.rb

while the reverse order would fail:

bundle exec rspec spec/unit/provider/package/windows/package_spec.rb
spec/unit/provider/package/rpm_spec.rb

The reason for it is confusing, but turns out to be not very mysterious
or magical at least.

The summary is that because this was written as follows:

lib/puppet/provider/package/windows/package.rb
---
1  require 'puppet/util/windows'
2  
3  class Puppet::Provider::Package::Windows

Puppet::Provider::Package is assumed, but not required.  Since
Puppet::Provider is loaded as a result of the base require 'puppet', and
since it includes Puppet::Util, which has a Puppet::Util::Package, if
nothing else has explicitly created Puppet::Provider::Package, we
end up declaring the Windows class on Puppet::Util::Package and hiding
reference errors which should otherwise pop up here.

Requiring 'puppet/type/package' does end up also requiring
'puppet/provider/package' as part of type's autoloading magic, but this
patch more specifically and clearly fixes the issue by requiring
'puppet/provider/package'.

Consistency of namespacing and class loading is a deeper issue.
Merge pull request #1656 from jpartlow/maint/windows-package-load-order-cleanup

(maint) More specific require for windows/package
Merge pull request #1643 from jeffweiss/20442_fix_aix_extended_attributes

(#20442)[PE-161] fix AIX extended attributes
Merge pull request #1649 from richardc/fix/master/17871

(#17871) fix nagios types uniqness under ruby 1.9
Generated modules comply with Style Guide

Without this patch, all module generated with `puppet module generate`
will produce code that does not pass lint or comply to our Style Guide.
Merge pull request #1657 from ghoneycutt/tickets/master/20815_module_template_style

Generated modules comply with Style Guide
Merge branch 'stable'

* stable:
  (maint) Reset confines on the pip provider after tests
(packaging) Update PUPPETVERSION to 3.2.1
Merge branch 'release_3.2.1' into stable
Merge branch 'stable'