protected static function paths(Blueprint $blueprint, $directory, $filename = null)
    {
        $yaml = file_exists($filename) ? file_get_contents($filename) : '';

        $yaml = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $yaml);

        $yaml = str_replace('%%CURRENT_DIRECTORY%%', $directory, $yaml);

        $result = Yaml::parse($yaml) ?: self::defaults();

        $blueprint->setTemplatePath($result['paths']['templates']);

        $blueprint->setCommandPath($result['paths']['commands']);

        $blueprint->setCommandNamespace($result['namespaces']['commands']);

        return $blueprint;
    }