lib/pdfkit/configuration.rb in pdfkit-0.5.0 vs lib/pdfkit/configuration.rb in pdfkit-0.5.1

- old
+ new

@@ -1,8 +1,8 @@ class PDFKit class Configuration - attr_accessor :meta_tag_prefix, :default_options + attr_accessor :meta_tag_prefix, :default_options, :root_url attr_writer :wkhtmltopdf def initialize @meta_tag_prefix = 'pdfkit-' @default_options = { @@ -15,10 +15,10 @@ :encoding => "UTF-8" } end def wkhtmltopdf - @wkhtmltopdf ||= `which wkhtmltopdf`.chomp + @wkhtmltopdf ||= (defined?(Bundler) ? `bundle exec which wkhtmltopdf` : `which wkhtmltopdf`).chomp end end class << self attr_accessor :configuration