class ActiveSupport::ConfigurationFile

def parse(context: nil, **options)

def parse(context: nil, **options)
  source = @content.include?("<%") ? render(context) : @content
  if source == @content
    if YAML.respond_to?(:unsafe_load)
      YAML.unsafe_load_file(@content_path, **options) || {}
    else
      YAML.load_file(@content_path, **options) || {}
    end
  else
    if YAML.respond_to?(:unsafe_load)
      YAML.unsafe_load(source, **options) || {}
    else
      YAML.load(source, **options) || {}
    end
  end
rescue Psych::SyntaxError => error
  raise "YAML syntax error occurred while parsing #{@content_path}. " \
        "Please note that YAML must be consistently indented using spaces. Tabs are not allowed. " \
        "Error: #{error.message}"
end