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:
Diffstat (limited to 'lib/gitlab/config/entry/node.rb')
-rw-r--r--lib/gitlab/config/entry/node.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/gitlab/config/entry/node.rb b/lib/gitlab/config/entry/node.rb
index 84d3409ed91..32912cb1046 100644
--- a/lib/gitlab/config/entry/node.rb
+++ b/lib/gitlab/config/entry/node.rb
@@ -16,6 +16,7 @@ module Gitlab
@config = config
@metadata = metadata
@entries = {}
+ @warnings = []
yield(self) if block_given?
@@ -60,6 +61,14 @@ module Gitlab
[]
end
+ def warnings
+ @warnings + descendants.flat_map(&:warnings)
+ end
+
+ def add_warning(message)
+ @warnings << "#{location} #{message}"
+ end
+
def value
if leaf?
@config
@@ -68,7 +77,7 @@ module Gitlab
value.specified? && value.relevant?
end
- Hash[meaningful.map { |key, entry| [key, entry.value] }]
+ meaningful.transform_values { |entry| entry.value }
end
end