erebor/asciidoctor — pull request #87 by mojavelinux (2013-01-16 05:58:16+00:00)
Title: Security tidying

As proposed, I have moved the safe mode levels into a module. I have also eliminated the duplicate path building method so that all path resolution goes through Document#normalize_asset_path() (the build secure path tests have been kept and updated to use this method).

Here's an itemization of the changes:

- tuck the safe mode levels into the Asciidoctor::SafeMode module
- use Document#normalize_asset_path to build secure path for include file
- change docs on normalize_asset_path to be clear it handles files & directories
- align docdir attribute and base_dir property on Document
- add test for activated include macro
- test demonstrate that there are no regressions in security