mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 20:56:08 +10:00
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
21 lines
387 B
Ruby
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
|