Method: Puppet::Util::Diff#string_file_diff

Defined in:
lib/vendor/puppet/util/diff.rb

#string_file_diff(path, string) ⇒ Object



68
69
70
71
72
73
74
75
# File 'lib/vendor/puppet/util/diff.rb', line 68

def string_file_diff(path, string)
  tempfile = Tempfile.new("puppet-diffing")
  tempfile.open
  tempfile.print string
  tempfile.close
  notice "\n" + diff(path, tempfile.path)
  tempfile.delete
end