summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-12-09 15:23:09 +0100
committerJames Lopez <james@jameslopez.es>2017-01-17 11:32:55 +0100
commit30c6703f0afbf570ca3e3613a55afcbc7094c4eb (patch)
treeec7b891bb58f8d6b3bf8108e50ca8d791b4e6e09 /lib
parent982d5a050667c517bbc996a08ca0922f2c5fbfb4 (diff)
downloadgitlab-ce-30c6703f0afbf570ca3e3613a55afcbc7094c4eb.tar.gz
fix specs
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?