Class: Stefon::Surveyor::AddedFiles
- Inherits:
-
Base
- Object
- Base
- Stefon::Surveyor::AddedFiles
show all
- Defined in:
- lib/stefon/surveyor/added_files.rb
Overview
This class gives points to the top commiter of the repo proportionally to each file that a user adds
Instance Attribute Summary
Attributes inherited from Base
#scores, #weight
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#call ⇒ Object
8
9
10
|
# File 'lib/stefon/surveyor/added_files.rb', line 8
def call
score_added_files.weight_scores(@weight)
end
|
#call_verbose ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/stefon/surveyor/added_files.rb', line 12
def call_verbose
author = GitUtil.top_commiter.first
Surveyor::SurveyorStore[[
[author, ["The top commiter in this repo is: #{author}"]]
]]
end
|
#score_added_files ⇒ Object
20
21
22
23
24
25
|
# File 'lib/stefon/surveyor/added_files.rb', line 20
def score_added_files
if (num_added_files = @grit.repo.status.added.count) > 0
@scores[GitUtil.top_commiter] += num_added_files
end
@scores
end
|