(PUP-2703) Make 'tag' be a statement function

Tag function should not require parentheses.
Merge branch 'stable'
(maint) Consolidate case statement in /pson/pure/generator.rb for the Float module.

Prior to this commit, the to_pson method for the Float module contained
unnecessary duplicated code.  This commit removes the duplication by
consolidating the case statements into a single if statement.
(doc) Add some missing options to apply/agent/doc/queue usage messages
(PUP-2506) Trivial Ruby bug in Puppet::Resource::Ral

Prior to this commit, a bug is triggered when the Puppet::Error string
is interpolated. The #type method was called recursively and failed with
an ArgumentError: wrong number of arguments (0 for 1).

This commit fixes the bug by changing which variable is interpolated in
the string.  It also adds a spec test for this case.
(maint) establish the synonym "composite key" for uniqueness key

The uniqueness_key (as found in the Type class) is an awkward name for
what is similar to the concept of composite keys as found in DBMSs.
This alternative nomenclature was proposed by Henrik Lindberg.
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (maint) Stop leaking file handles
  (maint) Update file mode for future parser
  (PUP-2692) Correctly implement environment equality
  (PUP-2692) Cache function info with the functions
(maint) Partial cleanup of the parameters/properties/attributes documentation

The concepts of properties vs. parameters (vs. metaparameters) and the
generic term "attributes" has been confused in various bits of documentation
of the Puppet::Type base class for resource types.

Clear up some of the comments by making appropriate use of these terms:
 - properties for attributes that are no parameters
 - parameters for attributes that are no properties
 - attributes if both are encompassed
Metaparameters are really just a special case of parameters. They should be
included when properties and parameters are enumerated instead of
just refering to "attributes".

It's also worth to note that since parameters and properties don't share
a common base class (Puppet::Attribute?), a method return or parameter type
that can be either cannot be made more specific than "Object", e.g.

  return [Object] the named attribute
(PUP-2577) Fix version comparison for OS X >= 10.10
Merge pull request #2726 from kylog/issue/pup-2577/osx-version-compare-fix

(PUP-2577) Fix version comparison for OS X >= 10.10
(PUP-2622) Use non-zero exit codes for unknown subcommands.

Previously, if users execute 'puppet foo', an error message is displayed
about unknown subcommand 'foo', but puppet still exits with a zero exit
code indicating success.

Additionally, if users execute 'puppet --option <valid_subcommand>',
puppet silently ignores the option, prints a message, and exits with a
zero exit code.  As a result, a user accidentally transposed a valid
option for a subcommand with the subcommand itself in an automated context
and puppet did not report a failure.

This commit fixes both conditions by exiting with 1 from the nil and unknown
subcommands where appropriate.  It also prints error messages using the same
colorized output we use for usual puppet errors.
(PUP-2583) mode attribute of file type does not behave like chmod when given X

When changing permissions with puppet file type and using symbolic permissions e.g: g+rX, puppet consideres everything as directory. Which is wrong, because you can specify different set of permissions for directory and file (triggered by case of the letter you use).

Problem originates in ruby && and "and" operator precedence. Which was incorrectly used in this case.
(PUP-2583) Add example to test for +X mode changes in file types.

Adding an example to test applying mode +X to files.  For files, a mode
change of +X changes the requested executable bit only if there is
already an executable bit set in the permissions.
(maint) Remove unnecessary setting of modulepath from face help spec

The integration spec checking help output for the faces was setting
modulepath directly in the body of an RSpec context block.  This caused
modulepath to be set on test file load.  Normally, this is not an issue,
since most specs are not sensitive to the Puppet modulepath setting, and
the test_helper clears all settings in its after_each_test hook.
However, a recent run of specs on Solaris master just happened to run
with the very first spec being sensitive to modulepath
(spec/integration/directory_environments_spec.rb) which then failed.
Fortunately, the current version of puppet no longer requires this early
setting of modulepath for the documentation spec to run, so I'm just
removing it here.
Merge branch 'pr/2728'

* pr/2728:
  (PUP-2583) Add example to test for +X mode changes in file types.
  (PUP-2583) mode attribute of file type does not behave like chmod when given X

This closes GH-2728.
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (maint) Remove failure for empty generated tags
  (maint) Update test to use resource matcher
  (maint) Add sitemoduledir to env env tests
  (PUP-2689) Make AST Resource check tags against "inherited" tags
  (maint) Remove unused Puppet::Parser::AST::Tag class
(PUP-2583) Fix bad test case in file type mode acceptance test.

The test case was assuming that +X on a file would always set the
requested executable bit.  This is only true if the resource is a
directory and not a file.  For files, there must be an already set
executable bit in the permission for +X to have an effect.

There was a bug in Puppet that was causing this acceptance test to pass
with the incorrect assumption.  That bug was fixed in commit ac2622e8c1
and now the acceptance test needs to be updated for the correct behavior.
(maint) Update docs badge in README

Update the URL of the docs badge to include it from
inch-ci.org instead of inch-pages.github.io (the former
being the successor of the Inch Pages project).
(PUP-2454) Use 999 as the max system uid for certain operating systems.

User ID's below 1000, not 500, are generally considered system users on
OpenBSD, FreeBSD, and Debian operating systems.

Users can still modify this with 'uid_start' in adduser.conf, but in that
case they'd need to provide an actual value instead of 'true'.

Also fixing the fact that 500 should not be included as a system ID.
The inclusive maximum should be 499 for other operating systems.
(PUP-2710) For audit only, compare Time objects as strings

Previously, auditing the mtime or ctime properties of a file
on ext4 (or any nanosecond resolution filesystem) when running
under ruby 1.9+ would spuriously report a change on every catalog
run.

This was because the yaml library (or libraries, more on that
shortly) correctly serialize the nanosecond resolution of the Time
object to yaml, *but* on deserialization they produce a Time object
truncated to microseconds. This led to a false inequality operation
leading to the spurious audit messages.

This patch is an unfortunate hack consisting of special-casing
the comparison of Time objects in the audit equality operation.

For context, I also considered alternatives:
* Monkey-patching the Time object == method to ignore nanoseconds.
  But this would affect all Time objects and could have undesired
  consequences.
* Monkey-patching the yaml library to correctly deserialize. But
  this got messy because there are several different yaml libraries
  that may be involved.
* Intercepting the serialization in Puppet::Util::Yaml, but this
  would mean discarding nanoseconds for all serialization of Time
  objects to yaml.

In the end, this spot fix seemed like the least evil solution.