class Thor::Shell::Basic

def show_diff(destination, content) #:nodoc:

:nodoc:
def show_diff(destination, content) #:nodoc:
  diff_cmd = ENV["THOR_DIFF"] || ENV["RAILS_DIFF"] || "diff -u"
  require "tempfile"
  Tempfile.open(File.basename(destination), File.dirname(destination)) do |temp|
    temp.write content
    temp.rewind
    system %(#{diff_cmd} "#{destination}" "#{temp.path}")
  end
end