facts/scripts/gce_scrub_data.rb in simp-rspec-puppet-facts-2.0.1 vs facts/scripts/gce_scrub_data.rb in simp-rspec-puppet-facts-2.1.0
- old
+ new
@@ -1,19 +1,20 @@
require 'yaml'
require 'json'
-require 'deep_merge'
-
-# A cowardly Heah merge that only overwrites keys that already exist
+# A cowardly Heap merge that only overwrites keys that already exist
def creep_merge( j, o )
result = nil
if o.is_a? Hash
o.keys.each do |k|
puts "== k: #{k} | #{k.class} | j: #{j.class}" if ENV['VERBOSE'] == 'yes'
if j.is_a?(Hash)
unless j.key?(k)
warn "!!!!!!!!! WARNING NO key '#{k}'"
- require 'pry'; binding.pry if ENV['PRY'] == 'yes'
+ if ENV['PRY'] == 'yes'
+ require 'pry'
+ binding.pry
+ end
else
j[k] = creep_merge(j[k], o[k])
end
else
j = o[k]