class Envirobly::Config
def validate_top_level_keys
def validate_top_level_keys unless @project.is_a?(Hash) @errors << "Config doesn't contain a top level hash structure." return end @errors << "Missing `project: <url>` top level attribute." if @project[:project].blank? @project.keys.each do |key| unless VALID_TOP_LEVEL_KEYS.include?(key) @errors << "Top level key `#{key}` is not allowed. Allowed keys: #{VALID_TOP_LEVEL_KEYS.map{ "`#{_1}`" }.join(", ")}." end end end