facts/scripts/gce_scrub_data.rb in simp-rspec-puppet-facts-3.6.3 vs facts/scripts/gce_scrub_data.rb in simp-rspec-puppet-facts-3.7.0
- old
+ new
@@ -34,10 +34,10 @@
scrub = YAML.load_file ff
data = JSON.parse(File.read(f))
ff = "#{f}.yaml"
File.open(ff,'w'){|fd| fd.puts data.to_yaml }
fb = f.sub(/.facts$/,'.facts.bak')
- unless File.exists? fb
+ unless File.exist? fb
File.open(fb,'w'){|fd| fd.puts data}
warn "== wrote '#{fb}'"
end
warn "== wrote '#{ff}'"
scrubbed_data = creep_merge( data, scrub )