Welcome to mirror list, hosted at ThFree Co, Russian Federation.

daily_statistics_finder.rb « projects « finders « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 912c23107bc1fbd50cc05e4769bf6d8771a59d83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module Projects
  class DailyStatisticsFinder
    attr_reader :project

    def initialize(project)
      @project = project
    end

    def fetches
      ProjectDailyStatistic.of_project(project)
        .of_last_30_days
        .sorted_by_date_desc
    end

    def total_fetch_count
      fetches.sum_fetch_count
    end
  end
end