mirror of
https://github.com/tomgi/git_stats.git
synced 2024-11-19 01:50:39 +01:00
14 lines
267 B
Ruby
14 lines
267 B
Ruby
class GitStats::GitData
|
|
attr_reader :total_authors
|
|
attr_reader :total_commits
|
|
|
|
def initialize(repo_path)
|
|
@repo_path = repo_path
|
|
end
|
|
|
|
def gather_all_data
|
|
Dir.chdir(@repo_path) {
|
|
@total_authors = %x[git shortlog -s HEAD | wc -l]
|
|
}
|
|
end
|
|
end
|