diff options
author | Simon Knox <psimyn@gmail.com> | 2017-06-03 03:20:14 +1000 |
---|---|---|
committer | Simon Knox <psimyn@gmail.com> | 2017-06-03 03:20:14 +1000 |
commit | d913ce176351094e2908344206a6136163fdfa89 (patch) | |
tree | 2079437e5d20d467372a7b55d2ef642ceca9038d | |
parent | f922fa52973e8aa11efdecbd63af9cef423cc078 (diff) | |
parent | d5df72c10a8271a66b55a9fd72c0e4f865cc2aef (diff) | |
download | gitlab-ce-30469-convdev-index.tar.gz |
Merge branch '30469-convdev-index' of gitlab.com:gitlab-org/gitlab-ce into 30469-convdev-index30469-convdev-index
3 files changed, 4 insertions, 4 deletions
diff --git a/app/models/conversational_development_index/idea_to_production_step.rb b/app/models/conversational_development_index/idea_to_production_step.rb index f53227f8a27..6e1753c9f30 100644 --- a/app/models/conversational_development_index/idea_to_production_step.rb +++ b/app/models/conversational_development_index/idea_to_production_step.rb @@ -9,9 +9,9 @@ module ConversationalDevelopmentIndex end def percentage_score - sum = features.map do |feature| + sum = features.sum do |feature| metric.percentage_score(feature) - end.inject(:+) + end sum / features.size.to_f end diff --git a/app/presenters/conversational_development_index/metric_presenter.rb b/app/presenters/conversational_development_index/metric_presenter.rb index 220014a955a..bb65ba2646b 100644 --- a/app/presenters/conversational_development_index/metric_presenter.rb +++ b/app/presenters/conversational_development_index/metric_presenter.rb @@ -138,7 +138,7 @@ module ConversationalDevelopmentIndex end def average_percentage_score - cards.map(&:percentage_score).inject(:+) / cards.size.to_f + cards.sum(&:percentage_score) / cards.size.to_f end end end diff --git a/app/views/admin/conversational_development_index/_callout.html.haml b/app/views/admin/conversational_development_index/_callout.html.haml index a783b9a13a8..33a4dab1e00 100644 --- a/app/views/admin/conversational_development_index/_callout.html.haml +++ b/app/views/admin/conversational_development_index/_callout.html.haml @@ -8,6 +8,6 @@ %h4 Introducing Your Conversational Development Index %p - Your Conversational Development Index gives an overview of how you are using GitLab from a feature perspective. View how they compare with other organizations, discover features your are not using, and learn best practices through blog posts and white papers. + Your Conversational Development Index gives an overview of how you are using GitLab from a feature perspective. View how you compare with other organizations, discover features you are not using, and learn best practices through blog posts and white papers. .svg-container.convdev = custom_icon('convdev_overview') |