gitlab-org--gitlab-foss/spec/lib
Rémy Coutable 8bdb5b6aec Merge branch '1548-average-commits-per-day' into 'master'
Fix: Infinity Bug in Commit Statistics

## What does this MR do?

It fixes a logic bug in the commits statistics: The code assumed that the amount of days involved in a commit range is equal to the difference between the first and last date. This is not true, though, as (from a human standpoint), a commit yesterday and a commit today involve two days, not one. Similarly, a fresh project with only commits made today already 'used' one day.

Since the number of involved days used to be zero for new projects, the result for commits per day quite often amounted to `Infinity`…

## Are there points in the code the reviewer needs to double check?

The test file. I hope it is up to the standards of GitLab.

## Why was this MR needed?

The bug occurres especially for new users with their first project while exploring GitLab.

## What are the relevant issue numbers?

This bug was reported as #1548.

## Screenshots (if relevant)

See merge request !4231
2016-07-08 15:20:22 +00:00
..
banzai Render references for labels that name contains ?, or & 2016-07-05 20:57:09 -03:00
ci Merge branch 'refactor/ci-config-move-global-entries' into 'master' 2016-07-05 08:37:16 +00:00
container_registry Fix regression introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4669 2016-06-17 13:24:50 +02:00
gitlab Merge branch '1548-average-commits-per-day' into 'master' 2016-07-08 15:20:22 +00:00
json_web_token Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
disable_email_interceptor_spec.rb Fix failing EmailOnPush spec. 2016-06-10 14:11:02 +05:30
extracts_path_spec.rb
file_size_validator_spec.rb
git_ref_validator_spec.rb
gitlab_spec.rb Update Gitlab.com? to support staging 2016-06-27 15:10:36 -04:00
repository_cache_spec.rb