require "yaml" require "docktor/manifest" require "docktor/container" module Docktor class ManifestParser def parse(yaml_path) manifest_data = YAML.load_file(yaml_path) manifest = Docktor::Manifest.new default_containers = manifest_data.delete("doc_defaults") manifest.containers = manifest_data.map do |container_name, options| Container.new( name: container_name, **options.symbolize_keys ) end manifest.select_containers_for_execution default_containers manifest end end end