Skip to content

Commit

Permalink
#2 added an option for the user to specify a git commit SHA to run ti…
Browse files Browse the repository at this point in the history
…pster against if they don't want to run it against the most recent git commit.
  • Loading branch information
robertgreiner committed Jan 13, 2012
1 parent a98fd0f commit 1bf67f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/tipster.rb
Expand Up @@ -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
10 changes: 5 additions & 5 deletions lib/tipster/reports/html_report.rb
Expand Up @@ -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
Expand Down

0 comments on commit 1bf67f1

Please sign in to comment.