diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-07-04 11:37:28 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-07-04 18:36:06 +0200 |
commit | bfad4c61f10f689868817cf0b94cddaa1de22240 (patch) | |
tree | d4915bee125f243c7a50f01718f2e556771c27b1 /lib | |
parent | eb151e77ff389c3e22454145cfd55cfaa4be7948 (diff) | |
download | gitlab-ce-bfad4c61f10f689868817cf0b94cddaa1de22240.tar.gz |
Add minor improvements in readability in CI configrefactor/ci-config-move-global-entries
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/config/node/configurable.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/ci/config/node/stages.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/ci/config/node/validator.rb | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/lib/gitlab/ci/config/node/configurable.rb b/lib/gitlab/ci/config/node/configurable.rb index 4889a21a234..37936fc8242 100644 --- a/lib/gitlab/ci/config/node/configurable.rb +++ b/lib/gitlab/ci/config/node/configurable.rb @@ -26,9 +26,7 @@ module Gitlab private def create_node(key, factory) - factory.with(value: @config[key]) - factory.with(parent: self) - factory.with(key: key) + factory.with(value: @config[key], key: key, parent: self) factory.create! end diff --git a/lib/gitlab/ci/config/node/stages.rb b/lib/gitlab/ci/config/node/stages.rb index 88d88252bce..b1fe45357ff 100644 --- a/lib/gitlab/ci/config/node/stages.rb +++ b/lib/gitlab/ci/config/node/stages.rb @@ -13,7 +13,7 @@ module Gitlab end def self.default - %w(build test deploy) + %w[build test deploy] end end end diff --git a/lib/gitlab/ci/config/node/validator.rb b/lib/gitlab/ci/config/node/validator.rb index 1ba2e1dc59d..758a6cf4356 100644 --- a/lib/gitlab/ci/config/node/validator.rb +++ b/lib/gitlab/ci/config/node/validator.rb @@ -23,6 +23,7 @@ module Gitlab def unknown_keys return [] unless config.is_a?(Hash) + config.keys - @node.class.nodes.keys end |