GET /yml_files
 GET /yml_files.xml
325505
def index
      @yml_files = Cmtool::YmlFile.all

      respond_to do |format|
        format.html # index.html.erb
        format.xml  { render :xml => @yml_files }
      end
    end
549228
private function getYmlFiles($basedir)
    {
        $ymlFiles = File::getFilesByExtension($basedir, self::EXTENSION);

        $defaultFile = $basedir.DIRECTORY_SEPARATOR.self::CONFIG_FILE.'.'.self::EXTENSION;

        if (is_file($defaultFile) && 1 < count($ymlFiles)) {
            // Ensure that config.yml is the first one
            $ymlFiles = array_diff($ymlFiles, array($defaultFile));
            array_unshift($ymlFiles, $defaultFile);
        }

        foreach ($ymlFiles as &$file) {
            $name = basename($file);
            if (in_array(substr($name, 0, strrpos($name, '.')), $this->yml_names_to_ignore)) {
                $file = null;
            }
        }

        return array_filter($ymlFiles);
    }
229366
def _get_file_list(load):
    '''
    
    '''
    if 'env' in load:
        # "env" is not supported; Use "saltenv".
        load.pop('env')

    if 'saltenv' not in load or load['saltenv'] not in envs():
        return []
    ret = set()
    for repo in init():
        repo['repo'].open()
        ref = _get_ref(repo, load['saltenv'])
        if ref:
            manifest = repo['repo'].manifest(rev=ref[1])
            for tup in manifest:
                relpath = os.path.relpath(tup[4], repo['root'])
                # Don't add files outside the hgfs_root
                if not relpath.startswith('../'):
                    ret.add(os.path.join(repo['mountpoint'], relpath))
        repo['repo'].close()
    return sorted(ret)
1084033
def get_json_or_yaml_settings(self, settings_name="zappa_settings"):
        
        zs_json = settings_name + ".json"
        zs_yml = settings_name + ".yml"
        zs_yaml = settings_name + ".yaml"
        zs_toml = settings_name + ".toml"

        # Must have at least one
        if not os.path.isfile(zs_json) \
            and not os.path.isfile(zs_yml) \
            and not os.path.isfile(zs_yaml) \
            and not os.path.isfile(zs_toml):
            raise ClickException("Please configure a zappa_settings file or call `zappa init`.")

        # Prefer JSON
        if os.path.isfile(zs_json):
            settings_file = zs_json
        elif os.path.isfile(zs_toml):
            settings_file = zs_toml
        elif os.path.isfile(zs_yml):
            settings_file = zs_yml
        else:
            settings_file = zs_yaml

        return settings_file
585806
def _check_yaml_and_paths(ymlfilepath, yamldefs):
        
        relpath = os.path.relpath(ymlfilepath)
        if '/' not in relpath:
            relpath = './%s' % relpath
        pathroot = os.path.abspath(os.path.dirname(ymlfilepath))

        for imagename, defn in iteritems(yamldefs):
            if imagename == '_SOURCES_':
                yamldefs['_SOURCES_'] = [os.path.relpath(_get_abspath(pathroot, p))
                                         for p in yamldefs['_SOURCES_']]
                continue
            elif imagename in SPECIAL_FIELDS:
                continue

            for key in ('build_directory', 'FROM_DOCKERFILE', 'ignorefile'):
                if key in defn:
                    defn[key] = _get_abspath(pathroot, defn[key])

            if 'copy_from' in defn:
                if not isinstance(defn['copy_from'], dict):
                    raise errors.ParsingFailure((
                            'Syntax error in file "%s": \n' +
                            'The "copy_from" field in image definition "%s" is not \n' 
                            'a key:value list.') % (ymlfilepath, imagename))
                for otherimg, value in defn.get('copy_from', {}).items():
                    if not isinstance(value, dict):
                        raise errors.ParsingFailure((
                            'Syntax error in field:\n'
                            '     %s . copy_from . %s\nin file "%s". \n'
                            'All entries must be of the form "sourcepath: destpath"')%
                                 (imagename, otherimg, ymlfilepath))

            # save the file path for logging
            defn['_sourcefile'] = relpath

            if 'ignore' in defn and 'ignorefile' in defn:
                raise errors.MultipleIgnoreError(
                        'Image "%s" has both "ignore" AND "ignorefile" fields.' % imagename +
                        ' At most ONE of these should be defined')

            if 'secret_files' in defn and not defn.get('squash', True):
                raise errors.ParsingFailure(
                        "Step '%s' defines secret_files, so 'squash' cannot be set to 'false'"
                        % imagename)

            if defn.get('secret_files', None) and defn.get('copy_from', False):
                raise errors.ParsingFailure(
                        '`secret_files` currently is not implmemented to handle `copy_from`'
                        ' (step %s)' % imagename)

            for key in defn:
                if key not in RECOGNIZED_KEYS:
                    raise errors.UnrecognizedKeyError(
                            'Field "%s" in image "%s" in file "%s" not recognized' %
                            (key, imagename, relpath))
1257777
def in_dir(
    config_dir=os.path.expanduser('~/.tmuxp'), extensions=['.yml', '.yaml', '.json']
):
    
    configs = []

    for filename in os.listdir(config_dir):
        if is_config_file(filename, extensions) and not filename.startswith('.'):
            configs.append(filename)

    return configs
223824
def parse(contents, name, ext)
      hash = case ext
        when *YML_FILE_TYPES
          YAML::load(contents)
        when *XML_FILE_TYPES
          parse_xml(contents, name)
        when *CNF_FILE_TYPES
          RConfig::PropertiesFile.parse(contents)
        else
          raise ConfigError, "Unknown File type: #{ext}"
        end
      hash.freeze
    end
1135807
def _preprocess_yml(path):
    """"""
    with open(path) as f:
        tmp_yaml = f.read()
    return re.sub(r"unicode", "str", tmp_yaml)
636535
def _get_files(self):
        
        excludes = [
            '.git',
            '.tox',
            '.vagrant',
            '.venv',
            os.path.basename(self._config.verifier.directory),
        ]
        generators = [
            util.os_walk(self._config.project_directory, '*.yml', excludes),
            util.os_walk(self._config.project_directory, '*.yaml', excludes),
        ]

        return [f for g in generators for f in g]
1049385
public function getMetadata()
    {
        $schema = array();
        foreach ($this->from as $path) {
            if (is_dir($path)) {
                $files = glob($path . '/*.yml');
                foreach ($files as $file) {
                    $schema = array_merge($schema, (array) Yaml::parse(file_get_contents($file)));
                }
            } else {
                $schema = array_merge($schema, (array) Yaml::parse(file_get_contents($path)));
            }
        }

        $metadatas = array();
        foreach ($schema as $className => $mappingInformation) {
            $metadatas[] = $this->convertToClassMetadataInfo($className, $mappingInformation);
        }

        return $metadatas;
    }
671190
public function getFilesetYaml() {
    $finder = $this->getYamlFilesetFinder();
    $finder->in([
      $this->getConfigValue('repo.root') . '/config',
      $this->getConfigValue('docroot') . '/modules/custom',
    ]);

    return $finder;
  }
659093
def load_extended_config_yaml
      Dir.glob("#{ENV['HOME']}/.ftl/templates/*.yml").each do |file|
        yaml = YAML.load_file(file)
        name = File.basename(file).gsub(".yml", '')
        @options[:templates][name.to_sym]=@options[:templates][:defaults]
        @options[:templates][name.to_sym].merge!(yaml)
      end
    end
185465
function getFiles () {
  const FUCK_ENV = process.env.FUCK_ENV
    || process.env.npm_package_config_FUCK_ENV
    || FUCK_ENV_DEFAULT
  return FUCK_ENV.split(',').map(file => path.resolve(root, file))
}
1144887
def assets
      Dir["#{directory}/**/*"].sort.select{|path| !File.directory?(path) && !File.basename(path).include?("yml") }.map do |file|
        file_to_hash(file)
      end
    end
502306
private function parseYml()
    {
        if (!file_exists($this->path)) {
            touch($this->path);
        }

        return $this->yml->parse(file_get_contents($this->path));
    }
375201
def _read(self, directory, filename, session, path, name, extension,
              spatial=None, spatialReferenceID=None, replaceParamFile=None):
        
        yml_events = []
        with open(path) as fo:
            yml_events = yaml.load(fo)

        for yml_event in yml_events:
            if os.path.exists(os.path.join(directory, yml_event.subfolder)):
                orm_event = yml_event.as_orm()
                if not self._similar_event_exists(orm_event.subfolder):
                    session.add(orm_event)
                    self.events.append(orm_event)

        session.commit()
834081
function loadYaml (filename) {
    const file = findFile(`${filename}.yml`)
    return file ? YAML.parse(fs.readFileSync(file, 'utf8')) : {}
  }