Sha256: 967ca207cd914022442e13e324efc37b263458508a1265e8c204aa1fcdd657ee
Contents?: true
Size: 596 Bytes
Versions: 6
Compression:
Stored size: 596 Bytes
Contents
# 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 "<pre>#{diff}</pre>" end def show(file) puts file puts "<pre>#{File.read(file).gsub(/[<>]/, '<' => '<', '>' => '>')}</pre>" end end end end World(Daddy::Cucumber::Diff)
Version data entries
6 entries across 6 versions & 1 rubygems