diff options
author | James Lopez <james@jameslopez.es> | 2016-11-22 12:33:19 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-01-17 13:32:54 +0300 |
commit | dc6ea14b0d11a5e73e81c95ef723f0c1af69215b (patch) | |
tree | 4106c4e98865bc93004ae25322d588e64814848f /lib/gitlab/cycle_analytics | |
parent | a998276223510ceee67f686dfc3ef536c0252c5a (diff) |
fixed stage entity and added missing stage specs
Diffstat (limited to 'lib/gitlab/cycle_analytics')
-rw-r--r-- | lib/gitlab/cycle_analytics/base_stage.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/cycle_analytics/base_stage.rb b/lib/gitlab/cycle_analytics/base_stage.rb index 49d1e6304a9..27971bfc093 100644 --- a/lib/gitlab/cycle_analytics/base_stage.rb +++ b/lib/gitlab/cycle_analytics/base_stage.rb @@ -3,7 +3,7 @@ module Gitlab class BaseStage attr_reader :stage, :description - def initialize(project:, options:, stage: stage) + def initialize(project:, options:, stage:) @project = project @options = options @fetcher = Gitlab::CycleAnalytics::MetricsFetcher.new(project: project, @@ -16,6 +16,10 @@ module Gitlab event_class.new(fetcher: @fetcher, stage: @stage).fetch end + def median_data + AnalyticsStageSerializer.new.represent(self).as_json + end + private def event_class |