lib/pronto.rb in pronto-0.1.7 vs lib/pronto.rb in pronto-0.2.0
- old
+ new
@@ -18,11 +18,11 @@
require 'pronto/formatter/formatter'
module Pronto
def self.run(commit = 'master', repo_path = '.', formatter = nil)
patches = diff(repo_path, commit)
- result = run_all_runners(patches)
+ result = run_all_runners(patches, commit)
formatter ||= default_formatter
formatter.format(result)
end
@@ -48,12 +48,12 @@
commit ||= 'master'
merge_base = repo.merge_base(commit, repo.head.target)
repo.diff(merge_base, repo.head.target)
end
- def self.run_all_runners(patches)
+ def self.run_all_runners(patches, commit)
Runner.runners.map do |runner|
- runner.new.run(patches)
+ runner.new.run(patches, commit)
end.flatten.compact
end
def default_formatter
Formatter::TextFormatter.new