* Use proper auth chain before checking parameters * Refactor AnalyticsController * Add a bunch of test and rewrite reactions counts with a single query * Add tests for follows totals * Use round and add more refactoring * Add tests to group by day to fallback during refactoring * Use group by to calculate comments count by day * Use group by to calculate follows count by day * Use group by to calculate reactions stats by day * Use group by to calculate page_views stats by day * Move calculations per day back in the cached block * Add a few comments and a little bit of refactoring * Add indexes (concurrently) for analytics * Make tests more time robust * Use a date range cache related to the requesting user or org * Freezing time in UTC should help when tests are ran on time zones over the day line * Remove explicit returns * Page title is escaped, guard against that * Move Analytics service spec in the proper place |
||
|---|---|---|
| .. | ||
| migrate | ||
| schema.rb | ||
| seeds.rb | ||