# coding: UTF-8 module Daddy module Cucumber module Diff def git_diff(local_file, git_path) git = Daddy::Git.new a = File.read(local_file).gsub(/[<>]/, '<' => '<', '>' => '>') b = git.show_previous(git_path, true).gsub(/[<>]/, '<' => '<', '>' => '>') diff = Differ.diff(a, b) puts local_file puts "
#{diff}" end def show(file) puts file puts "
#{File.read(file).gsub(/[<>]/, '<' => '<', '>' => '>')}" end end end end World(Daddy::Cucumber::Diff)