Skip to content

Commit

Permalink
Adding 'cmd' option to pdf brick.
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspard committed Aug 3, 2013
1 parent 839b05f commit 6e88f0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bricks/pdf/lib/bricks/pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Examples:
Bricks::Pdf.engine = 'Xhtml2pdf'
Bricks::Pdf.engine = 'prince'
Bricks::Pdf.cmd = '/usr/local/bin/prince'
Bricks::Pdf.render_file "myfile.html" => STDOUT (strings)
Bricks::Pdf.render_file "myfile.html", "out.pdf" => out.pdf (file)
Expand Down
3 changes: 2 additions & 1 deletion bricks/pdf/lib/bricks/pdf/engine/prince.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ module Bricks
module Pdf
module Engine
module Prince
CMD = Bricks::CONFIG['pdf']['cmd'] || 'prince'
def command(opts)
cmd = ['prince']
cmd = [CMD]
{
:http_user => '--http-user=',
:http_password => '--http-password=',
Expand Down

0 comments on commit 6e88f0d

Please sign in to comment.