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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-11-17 15:27:16 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-11-17 20:01:53 +0300
commit9ac0c76b78cd04b2505924f003dd720a0f155959 (patch)
tree67af1f0be0b9d6b5fc42b27c5afe5516e2c7574c /lib/gitlab/cycle_analytics
parent0af35d7e30e373b885bfddb30b14718d72d75ab0 (diff)
Use StrongMemoize and enable/disable cops properly
Diffstat (limited to 'lib/gitlab/cycle_analytics')
-rw-r--r--lib/gitlab/cycle_analytics/base_query.rb5
-rw-r--r--lib/gitlab/cycle_analytics/production_helper.rb5
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/cycle_analytics/base_query.rb b/lib/gitlab/cycle_analytics/base_query.rb
index 52fdae84c58..05b4928c3b9 100644
--- a/lib/gitlab/cycle_analytics/base_query.rb
+++ b/lib/gitlab/cycle_analytics/base_query.rb
@@ -11,13 +11,12 @@ module Gitlab
@base_query ||= stage_query
end
- # rubocop:disable Cop/ModuleWithInstanceVariables
def stage_query
query = mr_closing_issues_table.join(issue_table).on(issue_table[:id].eq(mr_closing_issues_table[:issue_id]))
.join(issue_metrics_table).on(issue_table[:id].eq(issue_metrics_table[:issue_id]))
- .where(issue_table[:project_id].eq(@project.id))
+ .where(issue_table[:project_id].eq(@project.id)) # rubocop:disable Cop/ModuleWithInstanceVariables
.where(issue_table[:deleted_at].eq(nil))
- .where(issue_table[:created_at].gteq(@options[:from]))
+ .where(issue_table[:created_at].gteq(@options[:from])) # rubocop:disable Cop/ModuleWithInstanceVariables
# Load merge_requests
query = query.join(mr_table, Arel::Nodes::OuterJoin)
diff --git a/lib/gitlab/cycle_analytics/production_helper.rb b/lib/gitlab/cycle_analytics/production_helper.rb
index 9a05c910ba0..ebbff1b2f33 100644
--- a/lib/gitlab/cycle_analytics/production_helper.rb
+++ b/lib/gitlab/cycle_analytics/production_helper.rb
@@ -1,9 +1,10 @@
module Gitlab
module CycleAnalytics
module ProductionHelper
- # rubocop:disable Cop/ModuleWithInstanceVariables
def stage_query
- super.where(mr_metrics_table[:first_deployed_to_production_at].gteq(@options[:from]))
+ super
+ .where(mr_metrics_table[:first_deployed_to_production_at]
+ .gteq(@options[:from])) # rubocop:disable Cop/ModuleWithInstanceVariables
end
end
end