Class: Metior::Report::Default::Index
- Inherits:
-
View
- Object
- Mustache
- View
- Metior::Report::Default::Index
show all
- Defined in:
- reports/default/views/index.rb
Overview
Instance Method Summary
(collapse)
Methods inherited from View
inherited, #initialize, #method_missing, #now, partial, #render, #repository, requires, #respond_to_missing?, #vcs_id, #version
Methods included from ViewHelper
#count, #even_odd, #reset_count
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Metior::Report::View
Instance Method Details
15
16
17
|
# File 'reports/default/views/index.rb', line 15
def authors
@report.commits.authors.most_significant(5).values
end
|
- (Object) commit_count
19
20
21
|
# File 'reports/default/views/index.rb', line 19
def commit_count
@report.commits.size
end
|
- (Object) commits_per_active_day
23
24
25
|
# File 'reports/default/views/index.rb', line 23
def commits_per_active_day
(@activity[:commits_per_active_day] * 100).round / 100.0 rescue 0
end
|
- (Object) committer_commit_count
31
32
33
|
# File 'reports/default/views/index.rb', line 31
def committer_commit_count
self[:authored_commits].size
end
|
- (Object) committers
27
28
29
|
# File 'reports/default/views/index.rb', line 27
def committers
@report.commits.authors.top(5).values
end
|
11
12
13
|
# File 'reports/default/views/index.rb', line 11
def init
@activity = @report.commits.activity
end
|
- (Object) initial_commit_date
35
36
37
|
# File 'reports/default/views/index.rb', line 35
def initial_commit_date
@activity[:first_commit_date]
end
|
- (Object) last_commit_date
39
40
41
|
# File 'reports/default/views/index.rb', line 39
def last_commit_date
@activity[:last_commit_date]
end
|
43
44
45
|
# File 'reports/default/views/index.rb', line 43
def meta_now
now.strftime('%FT%H:%M:%S%z').insert(-3, ':')
end
|
- (Object) most_active_day
47
48
49
|
# File 'reports/default/views/index.rb', line 47
def most_active_day
@activity[:most_active_day].strftime '%m/%d/%Y' rescue ''
end
|
- (Object) most_significant_commits
51
52
53
|
# File 'reports/default/views/index.rb', line 51
def most_significant_commits
@report.commits.most_significant(5).values
end
|
55
56
57
|
# File 'reports/default/views/index.rb', line 55
def range
@report.range
end
|
- (Object) repo_name
59
60
61
|
# File 'reports/default/views/index.rb', line 59
def repo_name
repository.name.empty? ? repository.path : repository.name
end
|
- (Object) repository_path
63
64
65
|
# File 'reports/default/views/index.rb', line 63
def repository_path
repository.path
end
|
67
68
69
|
# File 'reports/default/views/index.rb', line 67
def title
"Stats for #{repo_name}"
end
|