Commit fa24cb9e authored by Furkan Ayhan's avatar Furkan Ayhan

Remove inherit? method from Entry::Inherit::Variables

The usage of this method was removed when implementing workflow:rules
parent e4d3923c
...@@ -13,9 +13,6 @@ module Gitlab ...@@ -13,9 +13,6 @@ module Gitlab
strategy :ArrayStrategy, if: -> (config) { config.is_a?(Array) } strategy :ArrayStrategy, if: -> (config) { config.is_a?(Array) }
class BooleanStrategy < ::Gitlab::Config::Entry::Boolean class BooleanStrategy < ::Gitlab::Config::Entry::Boolean
def inherit?(_key)
value
end
end end
class ArrayStrategy < ::Gitlab::Config::Entry::Node class ArrayStrategy < ::Gitlab::Config::Entry::Node
...@@ -25,20 +22,12 @@ module Gitlab ...@@ -25,20 +22,12 @@ module Gitlab
validates :config, type: Array validates :config, type: Array
validates :config, array_of_strings: true validates :config, array_of_strings: true
end end
def inherit?(key)
value.include?(key.to_s)
end
end end
class UnknownStrategy < ::Gitlab::Config::Entry::Node class UnknownStrategy < ::Gitlab::Config::Entry::Node
def errors def errors
["#{location} should be a bool or array of strings"] ["#{location} should be a bool or array of strings"]
end end
def inherit?(key)
false
end
end end
end end
end end
......
...@@ -24,19 +24,4 @@ RSpec.describe ::Gitlab::Ci::Config::Entry::Inherit::Variables do ...@@ -24,19 +24,4 @@ RSpec.describe ::Gitlab::Ci::Config::Entry::Inherit::Variables do
end end
end end
end end
describe '#inherit?' do
where(:config, :inherit) do
true | true
false | false
%w[A] | true
%w[B] | false
end
with_them do
it do
expect(subject.inherit?('A')).to eq(inherit)
end
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