lib/wicked_pdf.rb in wicked_pdf-0.9.0 vs lib/wicked_pdf.rb in wicked_pdf-0.9.1

- old
+ new

@@ -13,10 +13,11 @@ require 'active_support/core_ext/blank' end require 'wicked_pdf_railtie' require 'wicked_pdf_tempfile' +require 'wicked_pdf_middleware' class WickedPdf EXE_NAME = "wkhtmltopdf" @@config = {} cattr_accessor :config @@ -30,10 +31,10 @@ def pdf_from_string(string, options={}) string_file = WickedPdfTempfile.new("wicked_pdf.html") string_file.write(string) string_file.close - + generated_pdf_file = WickedPdfTempfile.new("wicked_pdf_generated_file.pdf") command = "\"#{@exe_path}\" #{'-q ' unless on_windows?}#{parse_options(options)} \"file://#{string_file.path}\" \"#{generated_pdf_file.path}\" " # -q for no errors on stdout print_command(command) if in_development_mode? err = Open3.popen3(command) do |stdin, stdout, stderr| stderr.read