diff --git a/README.md b/README.md index 29ad792..9182c18 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ at the [blog post for the project][blog]. ## Help ``` -Markdown Resume Generator version 2.0.5 by Craig Davis +Markdown Resume Generator version 2.0.6 by Craig Davis Usage: [options] command [arguments] @@ -100,6 +100,7 @@ are a more comfortable with html than markdown, you should use it. ## Changelog +* __2.0.6__ : Fix empty template list from phar file to close #24 * __2.0.5__ : Remove default value for the `--refresh` option to close #22 * __2.0.4__ : Fix path resolution problem with absolute paths to close #16 * __2.0.3__ : Add optional duration to the `--refresh` option to close #15 diff --git a/bin/md2resume b/bin/md2resume index 9d3f296..5e4077e 100755 Binary files a/bin/md2resume and b/bin/md2resume differ diff --git a/composer.json b/composer.json index dc23fc9..5136db2 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "html5" ], "license": "MIT", - "version": "2.0.5", + "version": "2.0.6", "selfupdatepath": "://github.com/there4/markdown-resume/raw/master/bin/md2resume", "selfupdateversion": "://github.com/there4/markdown-resume/raw/master/version", "authors": [ diff --git a/src/Resume/Command/TemplatesCommand.php b/src/Resume/Command/TemplatesCommand.php index 9919a31..bec4b60 100644 --- a/src/Resume/Command/TemplatesCommand.php +++ b/src/Resume/Command/TemplatesCommand.php @@ -18,11 +18,16 @@ class TemplatesCommand extends Command { $this->app = $this->getApplication(); $tplData = array('templates' => array()); - foreach (glob($this->app->templatePath . '/*', GLOB_ONLYDIR) as $dir) { + foreach (new \DirectoryIterator($this->app->templatePath) as $fileInfo) { + if ($fileInfo->isDot() || !$fileInfo->isDir()) { + continue; + } + $descriptionPath = $fileInfo->getPathname() . '/description.txt'; + print $descriptionPath . "\n"; $tplData['templates'][] = (object) array( - 'name' => basename($dir), - 'description' => file_exists($dir . '/description.txt') - ? trim(file_get_contents($dir . '/description.txt')) + 'name' => $fileInfo->getBasename(), + 'description' => file_exists($descriptionPath) + ? trim(file_get_contents($descriptionPath)) : 'No description available' ); } diff --git a/version b/version index b9d2bdf..703cec9 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.0.5 \ No newline at end of file +2.0.6 \ No newline at end of file