Files
gitlabhq/lib/gitlab/git_stats.rb
T
Karlo Sorianoandkarlo57 71d67e6557 Contributors graphs feature for GitLab
Created tests and refactored some code along the way

Added stat graph util spec, refactored code

finsihed up tests and refactors

finsihed up tests and refactors
2013-06-05 16:51:48 +08:00

21 lines
387 B
Ruby

require 'gitlab/git_stats_log_parser'
module Gitlab
class GitStats
attr_accessor :repo, :ref
def initialize repo, ref
@repo, @ref = repo, ref
end
def log
args = ['--format=%aN%x0a%ad', '--date=short', '--shortstat', '--no-merges']
repo.git.run(nil, 'log', nil, {}, args)
end
def parsed_log
LogParser.parse_log(log)
end
end
end