puppetlabs/facter — pull request #524 by jpartlow (2013-08-21 20:15:50+00:00)
Title: (#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.