summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/cycle_analytics/base_event_fetcher.rb8
-rw-r--r--lib/gitlab/cycle_analytics/summary/commit.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/cycle_analytics/base_event_fetcher.rb b/lib/gitlab/cycle_analytics/base_event_fetcher.rb
index 8b4ccfd5363..8d10ddf15d7 100644
--- a/lib/gitlab/cycle_analytics/base_event_fetcher.rb
+++ b/lib/gitlab/cycle_analytics/base_event_fetcher.rb
@@ -19,6 +19,10 @@ module Gitlab
end.compact
end
+ def order
+ @order || default_order
+ end
+
private
def update_author!
@@ -37,10 +41,6 @@ module Gitlab
base_query.project(extract_diff_epoch(diff_fn).as('total_time'), *projections).order(order.desc)
end
- def order
- @order || default_order
- end
-
def default_order
@options[:start_time_attrs].is_a?(Array) ? @options[:start_time_attrs].first : @options[:start_time_attrs]
end
diff --git a/lib/gitlab/cycle_analytics/summary/commit.rb b/lib/gitlab/cycle_analytics/summary/commit.rb
index 61a50762164..7b8faa4d854 100644
--- a/lib/gitlab/cycle_analytics/summary/commit.rb
+++ b/lib/gitlab/cycle_analytics/summary/commit.rb
@@ -23,7 +23,7 @@ module Gitlab
cmd << "--after=#{@from.iso8601}"
cmd << sha
- output, status = Gitlab::Popen.popen(cmd) { |io| io.read }
+ output, status = Gitlab::Popen.popen(cmd)
raise IOError, output unless status.zero?