(#12116) Don't break on the first interface

Previously, if there were multiple interfaces with IPEnabled on Windows,
we would always use the DNSDomain value from the first interface, even
if it was nil or empty.

This commit changes the domain fact to look for the first non-nil and
non-empty DNSDomain value.
Merge pull request #520 from joshcooper/ticket/stable/12116_first_non_nil_dnsdomain

(#12116) Don't break on the first interface
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (#12116) Don't break on the first interface
(#22233) Add facts from Google Compute Engine metadata service

Without this patch facter does not report fact values for the data
stored in the Google Compute Engine metadata service.  This is a problem
because the metadata service is a primary vehicle for end users to pass
in information about compute instances.  This information is often
necessary for automated configuration of the compute instances.

This patch addresses the problem by dynamically generating a list of
facts based on the data made available by the http://metadata service in
the GCE environment.  The behavior of these facts is to obtain a JSON
structured hash from the metadata service if the `virtual` fact has the
value of `gce`.
(#22233) Add license information for GCE facts

Without this patch there is no clear licensing information included in
the GCE facts.  This patch adds the license headers.
Merge branch 'erjohnso-gce' closes #523

* erjohnso-gce:
  (#22233) Add license information for GCE facts
  (#22233) Add facts from Google Compute Engine metadata service
(#22233) Guarded json require for gce fact

The gce fact was requiring json, creating a dependency in Facter where
non had existed (except on development/test instances).  This was
producing unwanted errors in Ruby 1.8.7 where the json gem was not
present, and no gce facts were available anyway.

This commit ensures that we only attempt to load json if we are in the
gce environment (as determined by a metadata url resolving) and actually
have gce data to parse.
Merge pull request #524 from jpartlow/issue/master/22233-fix-json-require

(#22233) Guarded json require for gce fact
(maint) Pins redcarpet to < 3.0.0 for Ruby 1.8.7

The redcarpet gem 3.0.0 version does not work in Ruby 1.8.7.

https://github.com/vmg/redcarpet/issues/280
(#22233) Catch json load error for gce when no json gem present

When the specs were run in an environment without the json gem, the
gce_spec.rb would fail, because it was now throwing a LoadError.

Splits the spec into two, guarded by Facter.json? for the expected cases
with and without json present.
Merge pull request #525 from jpartlow/issue/master/22233-fix-json-in-gce-spec

Issue/master/22233 fix json in gce spec
(13051) Make the uniqueid for FreeBSD return the value of sysctl -n kern.hostid

New patch, moves hostuuid to a separate source file and adds unit tests
for both uniqueid and hostuuid on FreeBSD.

This patch was submitted by Garrett Wollman in the description of #13051.
(maint) Document hostuuid and uniqueid facts
(maint) Use sysctl helper method for FreeBSD sysctl calls

Commit fc8b1446c31 added a helper method for cleanly invoking sysctl;
this commit updates the behavior added in bfac93844e to take advantage
of the new method.
Merge branch 'pull-489'

This closes GH-489
(#22143) Add 'gid' fact to resolve users primary group.

A very simple fact to fetch the primary group.  I've only tested
this on Linux/OSX/FreeBSD but id -ng seems to be global.  I even
got a user to test it on Hurd and it worked.
Merge pull request #514 from apenney/gid

(#22143) Add 'gid' fact to resolve users primary group.
(packaging) Update FACTERVERSION to 1.7.3-rc1
Merge tag '1.7.3-rc1'

1.7.3-rc1

* tag '1.7.3-rc1':
  (packaging) Update FACTERVERSION to 1.7.3-rc1