module Pronto
def self.run(commit = 'master', repo_path = '.',
def self.run(commit = 'master', repo_path = '.', formatters = [Formatter::TextFormatter.new], file = nil) commit ||= 'master' repo = Git::Repository.new(repo_path) options = { paths: [file] } if file patches = repo.diff(commit, options) result = Runners.new.run(patches) Array(formatters).each do |formatter| formatted = formatter.format(result, repo, patches) puts formatted if formatted end result end