puppetlabs/puppet — pull request #286 by haus (2011-12-20 22:30:48+00:00)
Title: Feature/2.7.x/11472 add pe version

In Puppet Enterprise, the version is contained in a file
/opt/puppet/pe_version. If this file is present, `puppet --version` should
return a version string including that information. `puppet --version` relies
on the version method in the Puppet module. This patch adds a check for the PE
version file, and returns a string containing both the puppet and puppet
enterprise versions if it is present. Otherwise, it defaults to the previous
behavior of returning a string of the puppet version, as defined by the
constant PUPPETVERSION in puppet.rb.

This also includes two spec tests to verify the desired behavior, both with
and without the PE version file being present.