Skip to content

Commit

Permalink
Updates to fix bugs. Bumped version.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffrimko committed Oct 24, 2017
1 parent 4bef711 commit cbf0667
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
= PopPage Changelog

== poppage-0.5.2 (2017-10-23)
=== Fixed
- The OUTPATH defined in the `__def__` YAML key is now rooted at the utility working directory rather than the defaults file location.
- Added missing Python requirement to `setup.py`.

== poppage-0.5.1 (2017-10-23)
=== Added
- YAML tags `!ask` and `!yaml` for default files.
Expand Down
8 changes: 4 additions & 4 deletions app/poppage.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
##==============================================================#

#: Application version string.
__version__ = "0.5.1"
__version__ = "0.5.2"

#: Key separator.
KEYSEP = "::"
Expand Down Expand Up @@ -386,10 +386,10 @@ def update(d, u):
for key in ['inpath', 'outpath', 'execute']:
utildict[key] = args.get("--" + key)
if "__def__" in tmpldict.keys():
for key in ['execute']:
for key in ['execute', 'outpath']:
utildict[key] = (tmpldict.get('__def__', {}) or {}).get(key)
# Make paths absolute based on the location of the defaults file.
for key in ['inpath', 'outpath']:
for key in ['inpath']:
# Make paths absolute based on the location of the defaults file.
utildict[key] = (tmpldict.get('__def__', {}) or {}).get(key)
if not op.isabs(utildict[key]):
utildict[key] = op.abspath(op.normpath(op.join(op.dirname(dfltfile), utildict[key])))
Expand Down
3 changes: 2 additions & 1 deletion app/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

setup(
name = "poppage",
version = "0.5.1",
version = "0.5.2",
author = "Jeff Rimko",
author_email = "[email protected]",
description = "Utility for generating files and directories from templates.",
Expand All @@ -43,6 +43,7 @@
"binaryornot",
"docopt",
"jinja2",
"jinja2_time",
"jinja2schema",
"pyyaml",
"qprompt",
Expand Down
2 changes: 1 addition & 1 deletion tests/defaults/d4.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__def__:
inpath: ../templates/t5.jinja2
outpath: ../__output__/out.py
outpath: __output__/out.py
execute: python {{outpath}}
filename: foo.txt
text: bar
2 changes: 1 addition & 1 deletion tests/defaults/include-d1.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
inpath: ../templates/t5.jinja2
outpath: ../__output__/out.py
outpath: __output__/out.py
execute: python {{outpath}}

0 comments on commit cbf0667

Please sign in to comment.