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
path: root/lib/ci
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-23 01:50:15 +0300
committerDouwe Maan <douwe@selenight.nl>2017-02-23 18:33:05 +0300
commit1fe7501b49f896b74102c4b970310aa9ae34da85 (patch)
treece271afb0fbaaa14291c1dc9009cd7815ee25463 /lib/ci
parentbdbc7d967a0c3d95d5e4ea19a2a5be41268d3540 (diff)
Revert "Prefer leading style for Style/DotPosition"
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
Diffstat (limited to 'lib/ci')
-rw-r--r--lib/ci/charts.rb26
-rw-r--r--lib/ci/gitlab_ci_yaml_processor.rb4
2 files changed, 15 insertions, 15 deletions
diff --git a/lib/ci/charts.rb b/lib/ci/charts.rb
index 6063d6f45e8..3decc3b1a26 100644
--- a/lib/ci/charts.rb
+++ b/lib/ci/charts.rb
@@ -2,10 +2,10 @@ module Ci
module Charts
module DailyInterval
def grouped_count(query)
- query
- .group("DATE(#{Ci::Build.table_name}.created_at)")
- .count(:created_at)
- .transform_keys { |date| date.strftime(@format) }
+ query.
+ group("DATE(#{Ci::Build.table_name}.created_at)").
+ count(:created_at).
+ transform_keys { |date| date.strftime(@format) }
end
def interval_step
@@ -16,14 +16,14 @@ module Ci
module MonthlyInterval
def grouped_count(query)
if Gitlab::Database.postgresql?
- query
- .group("to_char(#{Ci::Build.table_name}.created_at, '01 Month YYYY')")
- .count(:created_at)
- .transform_keys(&:squish)
+ query.
+ group("to_char(#{Ci::Build.table_name}.created_at, '01 Month YYYY')").
+ count(:created_at).
+ transform_keys(&:squish)
else
- query
- .group("DATE_FORMAT(#{Ci::Build.table_name}.created_at, '01 %M %Y')")
- .count(:created_at)
+ query.
+ group("DATE_FORMAT(#{Ci::Build.table_name}.created_at, '01 %M %Y')").
+ count(:created_at)
end
end
@@ -46,8 +46,8 @@ module Ci
end
def collect
- query = project.builds
- .where("? > #{Ci::Build.table_name}.created_at AND #{Ci::Build.table_name}.created_at > ?", @to, @from)
+ query = project.builds.
+ where("? > #{Ci::Build.table_name}.created_at AND #{Ci::Build.table_name}.created_at > ?", @to, @from)
totals_count = grouped_count(query)
success_count = grouped_count(query.success)
diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb
index 649ee4d018b..04d9756657a 100644
--- a/lib/ci/gitlab_ci_yaml_processor.rb
+++ b/lib/ci/gitlab_ci_yaml_processor.rb
@@ -115,8 +115,8 @@ module Ci
end
def yaml_variables(name)
- variables = (@variables || {})
- .merge(job_variables(name))
+ variables = (@variables || {}).
+ merge(job_variables(name))
variables.map do |key, value|
{ key: key.to_s, value: value, public: true }