class Churn::GitAnalyzer

analizes git SCM to find recently changed files, and what lines have been altered

Public Class Methods

supported?() click to toggle source
# File lib/churn/scm/git_analyzer.rb, line 6
def self.supported?
  !!(%xgit branch 2>&1` && $?.success?)
end

Public Instance Methods

get_commit_history() click to toggle source
# File lib/churn/scm/git_analyzer.rb, line 18
def get_commit_history
  %xgit log --reverse --pretty=format:"%H"`.split(/\n/).reject{|line| line == ""}
end
get_logs() click to toggle source
# File lib/churn/scm/git_analyzer.rb, line 10
def get_logs
  %xgit log #{date_range} --name-only --pretty=format:`.split(/\n/).reject{|line| line == ""}
end
get_revisions() click to toggle source
# File lib/churn/scm/git_analyzer.rb, line 14
def get_revisions
  %xgit log #{date_range} --pretty=format:"%H"`.split(/\n/).reject{|line| line == ""}
end