lib/binman.rb in binman-0.1.1 vs lib/binman.rb in binman-0.1.2

- old
+ new

@@ -39,12 +39,14 @@ ## # Converts given leading comment header (produced by #read) into roff(7). # def dump header - require 'binman/renderer' - RENDERER.render(header) + require 'redcarpet-manpage' + RedcarpetManpage::RENDERER.render(header) + rescue LoadError + raise 'Run `gem install binman --development` to use dump().' end ## # Shows leading comment header from given source as UNIX man page. # @@ -57,10 +59,11 @@ header = read(source) begin roff = dump(header) IO.popen('man -l -', 'w') {|man| man.puts roff } - rescue + rescue => error + warn "binman: #{error}" puts header end end ##