diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2013-01-21 17:17:11 -0700 |
|---|---|---|
| committer | LightGuard <lightguard.jp@gmail.com> | 2013-01-22 14:29:14 -0700 |
| commit | d4cee2b23ee8ab55fe42c1229118bc05438d4f3d (patch) | |
| tree | b69d336f9d20b5ba7afcf51306b4fdb7aabb5d62 /bin | |
| parent | 99b5206c1ec93a1eff6544917a39aa6a72240b84 (diff) | |
enhance invoker, add tests, enforce security
- provide access to document after invoker runs for testing
- add stream redirection to invoker
- add exit code to invoker rather than using a hard exit
- check that input file exists in options
- set outfile on document after rendering for access in tests
- add support for stdin
- fix doc info attribute assignments, only set when input is a file
- clarify the purpose of base_dir and docdir, respectively
- use base_dir in normalize_asset_path
- don't allow document to emit docdir or absolute docfile in secure mode
- don't allow document to change doctype in secure mode
- cleanup the option descriptions
- add a --safe flag which is compatible with asciidoc
- take out rubygems require (that should be handled by rubygems)
- fix incorrect minute field in time format
- loads of invoker tests
- test for input file with spaces
- additional helper methods for testing invoker
- rename option_tests.rb to options_test.rb
- add timings to cli
- fix bug of not carrying over safe level in nested document
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/asciidoctor | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/asciidoctor b/bin/asciidoctor index 55e08659..5384fa1c 100755 --- a/bin/asciidoctor +++ b/bin/asciidoctor @@ -1,11 +1,12 @@ #!/usr/bin/env ruby -$:.unshift File.join(File.dirname(__FILE__), '../lib') +$:.unshift File.join(File.dirname(__FILE__), '..', 'lib') -require 'rubygems' -require 'optparse' require 'asciidoctor' require 'asciidoctor/cli/options' require 'asciidoctor/cli/invoker' -Asciidoctor::Cli::Invoker.new(ARGV).invoke! +# pass ARGV.dup? +invoker = Asciidoctor::Cli::Invoker.new(ARGV) +invoker.invoke! +exit invoker.code |
