Skip to content

Commit

Permalink
Merge pull request puppetlabs#153 from grundprinzip/fix_pdf_options_d…
Browse files Browse the repository at this point in the history
…efault_dir

Fix PDF Options Bug
  • Loading branch information
goncalossilva committed Nov 21, 2011
2 parents 0657b2d + 5709d39 commit 0ea1df5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/showoff.rb
Expand Up @@ -382,7 +382,7 @@ def pdf(static=true)

# PDFKit.new takes the HTML and any options for wkhtmltopdf
# run `wkhtmltopdf --extended-help` for a full list of options
kit = PDFKit.new(html, ShowOffUtils.showoff_pdf_options)
kit = PDFKit.new(html, ShowOffUtils.showoff_pdf_options(settings.pres_dir))

# Save the PDF to a file
file = kit.to_file('/tmp/preso.pdf')
Expand Down
2 changes: 1 addition & 1 deletion lib/showoff_utils.rb
Expand Up @@ -288,7 +288,7 @@ def self.get_config_option(dir, option, default = nil)
data = JSON.parse(File.read(index))
if data.is_a?(Hash)
if default.is_a?(Hash)
default.merge(data[option])
default.merge(data[option] || default)
else
data[option] || default
end
Expand Down

0 comments on commit 0ea1df5

Please sign in to comment.