Commit 828a15bc authored by Grzegorz Bizon's avatar Grzegorz Bizon

Rename method used to allow node in Ci config

parent 51046dd2
...@@ -25,7 +25,7 @@ module Gitlab ...@@ -25,7 +25,7 @@ module Gitlab
end end
def allowed_nodes def allowed_nodes
self.class.nodes || {} self.class.allowed_nodes || {}
end end
private private
...@@ -46,16 +46,16 @@ module Gitlab ...@@ -46,16 +46,16 @@ module Gitlab
end end
class_methods do class_methods do
attr_reader :nodes attr_reader :allowed_nodes
private private
def add_node(symbol, entry_class, metadata) def allow_node(symbol, entry_class, metadata)
node = { symbol.to_sym => node = { symbol.to_sym =>
{ class: entry_class, { class: entry_class,
description: metadata[:description] } } description: metadata[:description] } }
(@nodes ||= {}).merge!(node) (@allowed_nodes ||= {}).merge!(node)
end end
end end
end end
......
...@@ -9,7 +9,7 @@ module Gitlab ...@@ -9,7 +9,7 @@ module Gitlab
class Global < Entry class Global < Entry
include Configurable include Configurable
add_node :before_script, Script, allow_node :before_script, Script,
description: 'Script that will be executed before each job.' description: 'Script that will be executed before each job.'
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment