lib/onering/util.rb in onering-client-0.3.1 vs lib/onering/util.rb in onering-client-0.3.2
- old
+ new
@@ -93,30 +93,30 @@
if defined?(Facter)
if name.downcase == 'all'
return Facter.to_hash()
else
- fact = Facter.value(name)
+ fact_value = Facter.value(name)
# short circuit nil responses
- if fact.nil?
+ if fact_value.nil?
return reporter.report().get(name, default)
end
# if we are asking for a nested object...
if name.include?('.')
# ...and the response IS an object...
- if fact.is_a?(Hash)
+ if fact_value.is_a?(Hash)
# remove the first part and return the rest
name = name.sub(/^[^\.]+\./,'')
- return fact.get(name, default)
+ return fact_value.get(name, default)
else
# not an object, return default
return reporter.report().get(name, default)
end
else
# this is a simple request, return the fact
- return fact
+ return fact_value
end
end
end
return reporter.report().get(name, default)
\ No newline at end of file