diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-22 19:55:08 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 18:32:22 +0300 |
commit | 206953a430e442fbbd06984b1120890dbf8d3f79 (patch) | |
tree | 74922128d6a26bc0c9024b8588c9f38a6250cc0d /lib/ci | |
parent | f72a65603db4dfdb41f327ab03892eed5dadb57e (diff) |
Prefer leading style for Style/DotPosition
Diffstat (limited to 'lib/ci')
-rw-r--r-- | lib/ci/charts.rb | 26 | ||||
-rw-r--r-- | lib/ci/gitlab_ci_yaml_processor.rb | 4 |
2 files changed, 15 insertions, 15 deletions
diff --git a/lib/ci/charts.rb b/lib/ci/charts.rb index 3decc3b1a26..6063d6f45e8 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 04d9756657a..649ee4d018b 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 } |