Permalink
Browse files

#2 added an option for the user to specify a git commit SHA to run ti…

…pster against if they don't want to run it against the most recent git commit.
  • Loading branch information...
1 parent a98fd0f commit 1bf67f19441b69518b1f931e7c21b348516558ff @robertgreiner committed Jan 13, 2012
Showing with 7 additions and 7 deletions.
  1. +2 −2 lib/tipster.rb
  2. +5 −5 lib/tipster/reports/html_report.rb
View
@@ -4,7 +4,7 @@ class Tipster
def initialize(repository_path = '.')
Dir.chdir repository_path
end
- def html_report
- HtmlReport.new.display_in_browser
+ def html_report(commit_id = 'HEAD')
+ HtmlReport.new(commit_id).display_in_browser
end
end
@@ -5,15 +5,15 @@
class HtmlReport
- def initialize
- generate html
+ def initialize(commit_id = nil)
+ generate html commit_id
end
- def html
- code_ratio_presenter = CodeRatioPresenter.new
+ def html(commit_id)
+ code_ratio_presenter = CodeRatioPresenter.new commit_id
code_ratio_status = code_ratio_presenter.status
- code_churn_presenter = CodeChurnPresenter.new
+ code_churn_presenter = CodeChurnPresenter.new commit_id
code_churn_status = code_churn_presenter.status
header << file_details(code_ratio_presenter.change_list) << code_ratio_details(code_ratio_status) << code_churn_details(code_churn_status) << footer

0 comments on commit 1bf67f1

Please sign in to comment.