require 'yaml'

module ActiveYaml

  class Base < ActiveFile::Base
    extend ActiveFile::HashAndArrayFiles
    class << self
      def load_file
        if (data = raw_data).is_a?(Array)
          data
        elsif data.respond_to?(:values)
          data.values
        end
      end

      def extension
        "yml"
      end

      private
      def load_path(path)
        YAML.load(ERB.new(File.read(path)).result)
      end
    end
  end
end

require 'yaml'

module ActiveYaml

  class Base < ActiveFile::Base
    extend ActiveFile::HashAndArrayFiles
    class << self
      def load_file
        if (data = raw_data).is_a?(Array)
          data
        elsif data.respond_to?(:values)
          data.values
        end
      end

      def extension
        "yml"
      end

      private
if Psych::VERSION >= "4.0.0"
      def load_path(path)
        YAML.unsafe_load(ERB.new(File.read(path)).result)
      end
else
      def load_path(path)
        YAML.load(ERB.new(File.read(path)).result)
      end
end
    end
  end
end

Support Psyche 4.0 Yaml loading changes
Support Psyche 4.0 Yaml loading changes

aliases are no longer supported by default.
Since they are part of the documented features, added it.

Date is part of the features and tested, but not supported by default
