Class: Diggit::DevelopersActivity::Analyses::ProjectDevelopersAnalysis
- Inherits:
-
ActivityAnalysis
- Object
- Analysis
- ActivityAnalysis
- Diggit::DevelopersActivity::Analyses::ProjectDevelopersAnalysis
- Defined in:
- lib/diggit/developers_activity/analyses/project_developers_analysis.rb
Overview
Records the activity of developers at the project level, ie, the date at which developers commit
Instance Method Summary collapse
Methods inherited from ActivityAnalysis
#initialize, #load_options, #source_options
Methods included from Diggit::DevelopersActivity::ActivityExtractor
Constructor Details
This class inherits a constructor from Diggit::DevelopersActivity::Analyses::ActivityAnalysis
Instance Method Details
#clean ⇒ Object
33 34 35 |
# File 'lib/diggit/developers_activity/analyses/project_developers_analysis.rb', line 33 def clean @addons[:db].db[COL].remove({ project: @source }) end |
#run ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/diggit/developers_activity/analyses/project_developers_analysis.rb', line 13 def run r_last = @repo.lookup(["R_last"]) r_first_time = @repo.lookup(["R_first"]).[:time] walker = Rugged::Walker.new(@repo) walker.sorting(Rugged::SORT_DATE) walker.push(r_last) devs = [] walker.each do |commit| t = commit.[:time] = Authors.(commit) devs << { project: @source, author: , time: t } break if t < r_first_time end @addons[:db].db[COL].insert(devs) end |