(#15644) add test case to check for packages that are yet to be installed.

Added the check for latest value in the test case,
Added a new test case that checks for correct behavior in case the
package is not installed.
(#8200) validate only if we can (especially path)

The global validate block is called even when `puppet resource zone` is
called without any further arguments, so we add a check
provider.get(:ensure) != :absent to make sure that we are indeed in
zone creation stage before trying to validate. This could have been
better done by `isrequired` method in parameter.rb however this is not
hooked up now, so we are uanble to use it..

The ip validation is refactored to make it clearer to read.
(Maint) Removed unnecessary stubbing

Previously, the spec test stubbed the zone resource. This commit creates
a real resource specifying the provider to use. It also adds the type of
exception and message that we're expecting to be raised.

Paired-with: Rahul Gopinath <rahul@puppetlabs.com>
Merge branch 'ticket/3.x/8200_validate_param' into 3.x

* ticket/3.x/8200_validate_param:
  (Maint) Removed unnecessary stubbing
  (#8200) validate only if we can (especially path)
(#7175) ensure ensurable uses symbols in zone

zone provider when asked to ensure the state to running/install or any
thing tries to find the value in state_index however, state_index values
stores keys as string. This is wrong. The root cause is that
ensurable returns values as string rather than symbols. This inturn is
caused by state_name checking for string value in state_alias which is a
symbol to symbol map, and not finding any, and returning itself.
(#15644) refactor the parse_line so that it supports the newer format

Previously the parse_line conflated the different output formats of the
older and newer `pkg list` commands. This commit splits the formats to
separate regexes so that it is easier to manage. Especially if the pkg
list format changes yet again.

This commit simplifies self.instances, latest and query methods by
removing redundant lines.

Adds more comments to the methods, and changes the method names to reflect the
method usage.

Tests:
- Update the package list output so that the format is correct
(it is ufoxi - 5 dashes)

- Earlier, when a pkg list line could not be parsed, the provider warned
the user about this fact and continued. This behavior is dangerous. We
change it to fail instead.

- Added more test cases.
(#15644) ensure that pkg installation is non-interactive

Earlier, pkg install did not have --accept parameter, which means that
licenses would not be automatically accepted. Since puppet is a
non-interactive process, this is not the correct behavior. This commit
adds the --accept parameter to accept licenses during pkg installation.

Earlier, pkg uninstall added -r always to the command for recursive
uninstall. However, this was removed in the later version of the pkg
command. This commit adds the logic to check for the version before
doing `pkg uninstall -r mypkg`
Merge branch 'ticket/3.x/7175-symbolize' into 3.x

* ticket/3.x/7175-symbolize:
  (#7175) ensure ensurable uses symbols in zone
  (Maint) Removed unnecessary stubbing
  (#8200) validate only if we can (especially path)
Merge branch 'ticket/3.x/15644_fix_parse_line' into 3.x

* ticket/3.x/15644_fix_parse_line:
  (#15644) ensure that pkg installation is non-interactive
  (#15644) refactor the parse_line so that it supports the newer format
  (#15644) add test case to check for packages that are yet to be installed.
Convert expect..should to expect..to in configurer spec
Use TestHelper in old unit tests

This adds calls so that the old unit tests use the pre and post steps from
Puppet::Test::TestHelper to clean up between tests.
Always set log functions on root environment

Set the logging parser functions (notice, err, etc) on the root environment.
This also requires setting the current environment to be nil in
Environment.clear by setting it directly on Thread.current.  Otherwise the
default environment from puppet.conf is used. In tests this was interfering
with the log functions being set on the root environment instead of the
current environment.
(#7442) solaris: add tests for password_max_age attribute

This commit tests that password_max_age will properly read the values
out of a /etc/shadow file. If password aging is disabled for a user on
Solaris, there is no artifact in the shadow file that indicates this.
We need to get "-1" back to match other platforms.
(#7442) solaris: return "-1" for password_max_age when password aging is disabled

If password aging is disabled for a user on Solaris, there is no
artifact in the shadow file that indicates this. We need to get "-1"
back to match functionality on other platforms.
Merge branch 'ticket/2.7.x/7442_solaris_password_max_age' into 2.7.x

* ticket/2.7.x/7442_solaris_password_max_age:
  (#7442) solaris: return "-1" for password_max_age when password aging is disabled
  (#7442) solaris: add tests for password_max_age attribute
(#15940) Update puppet doc to ignore files and templates in modules

Without this commit puppet doc will parse some files inside of the
files/ and templates/ sub directory of a module.  This is a problem
because these files are not meant to contain puppet code.

Conflicts:
	lib/puppet/util/rdoc.rb
(#15853) Update gem dependencies to reflect rc ordering

Facter 2.0.0rc is less than 2.0.0, so >= 2.0.0 will never be satisfied using
the current Puppet gem dependencies. This commit updates those dependencies to
have rc in the version, which will be correctly handled by modern rubygems and
ignored by older rubygems. The rc can be removed once the releases are final
and we no longer want users to be depending on rc releases.
(#15940) Add test coverage for rdoc exclude option

Without this patch the addition of `<module>/templates/.*$` does not
have test coverage.  In addition, the existing test fails because the
arguments have changed.

This patch fixes both problems by updating the spec tests appropriately.
Merge branch 'ticket/2.7.x/15940_puppet_doc_should_exclude' into 2.7.x

* ticket/2.7.x/15940_puppet_doc_should_exclude:
  (#15940) Add test coverage for rdoc exclude option
  (#15940) Update puppet doc to ignore files and templates in modules
Merge branch '2.7.x' into 3.x

* 2.7.x:
  Always set log functions on root environment
  Use TestHelper in old unit tests
  Convert expect..should to expect..to in configurer spec

Conflicts:
	spec/unit/parser/functions/create_resources_spec.rb
	spec/unit/parser/functions/template_spec.rb
	test/language/parser.rb
	test/language/scope.rb
	test/language/snippets.rb
	test/lib/puppettest.rb
	test/lib/puppettest/parsertesting.rb