Method: Metior.simple_stats
- Defined in:
- lib/metior.rb
permalink .simple_stats(type, repo_options, range = nil) ⇒ Hash<Symbol, Object>
Calculates simplistic stats for the given repository and branch
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/metior.rb', line 54 def self.simple_stats(type, , range = nil) range = vcs(type)::DEFAULT_BRANCH if range.nil? repo = repository type, * commits = repo.commits(range) { :commit_count => commits.size, :top_contributors => repo.top_contributors(range, 5), }.merge commits.activity end |