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/gitlab/ci/config | |
parent | f72a65603db4dfdb41f327ab03892eed5dadb57e (diff) |
Prefer leading style for Style/DotPosition
Diffstat (limited to 'lib/gitlab/ci/config')
-rw-r--r-- | lib/gitlab/ci/config/entry/configurable.rb | 10 | ||||
-rw-r--r-- | lib/gitlab/ci/config/entry/global.rb | 6 | ||||
-rw-r--r-- | lib/gitlab/ci/config/entry/jobs.rb | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/lib/gitlab/ci/config/entry/configurable.rb b/lib/gitlab/ci/config/entry/configurable.rb index deaaf06bbd7..e05aca9881b 100644 --- a/lib/gitlab/ci/config/entry/configurable.rb +++ b/lib/gitlab/ci/config/entry/configurable.rb @@ -27,9 +27,9 @@ module Gitlab return unless valid? self.class.nodes.each do |key, factory| - factory. - value(@config[key]). - with(key: key, parent: self) + factory + .value(@config[key]) + .with(key: key, parent: self) @entries[key] = factory.create! end @@ -49,8 +49,8 @@ module Gitlab private # rubocop:disable Lint/UselessAccessModifier def entry(key, entry, metadata) - factory = Entry::Factory.new(entry). - with(description: metadata[:description]) + factory = Entry::Factory.new(entry) + .with(description: metadata[:description]) (@nodes ||= {}).merge!(key.to_sym => factory) end diff --git a/lib/gitlab/ci/config/entry/global.rb b/lib/gitlab/ci/config/entry/global.rb index 0a404331225..ac771662b2f 100644 --- a/lib/gitlab/ci/config/entry/global.rb +++ b/lib/gitlab/ci/config/entry/global.rb @@ -46,9 +46,9 @@ module Gitlab private def compose_jobs! - factory = Entry::Factory.new(Entry::Jobs). - value(@config.except(*self.class.nodes.keys)). - with(key: :jobs, parent: self, + factory = Entry::Factory.new(Entry::Jobs) + .value(@config.except(*self.class.nodes.keys)) + .with(key: :jobs, parent: self, description: 'Jobs definition for this pipeline') @entries[:jobs] = factory.create! diff --git a/lib/gitlab/ci/config/entry/jobs.rb b/lib/gitlab/ci/config/entry/jobs.rb index 7b83f0f1b69..a487a3a06d6 100644 --- a/lib/gitlab/ci/config/entry/jobs.rb +++ b/lib/gitlab/ci/config/entry/jobs.rb @@ -31,10 +31,10 @@ module Gitlab @config.each do |name, config| node = hidden?(name) ? Entry::Hidden : Entry::Job - factory = Entry::Factory.new(node). - value(config || {}). - metadata(name: name). - with(key: name, parent: self, + factory = Entry::Factory.new(node) + .value(config || {}) + .metadata(name: name) + .with(key: name, parent: self, description: "#{name} job definition.") @entries[name] = factory.create! |