Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added hooks for wisepdf. #5

Merged
merged 2 commits into from

2 participants

@simmogs

No description provided.

@bradphelan
Collaborator

What is wisepdf? Are you sure that this is the only change you need. What about an update to the gemspec?

Wisepdf is another gem for WKHTMLTOPDF and it's very similar to WickedPDF and PDFKit.
https://github.com/igor-alexandrov/wisepdf

I'm sorry, I'm a bit new to editing gems. As far as I know, there are no other changes required to the code. I've tested it and it works for me on an app I deployed to Heroku.

What should I do about the gemspec?

Thanks for your help. Graeme

Collaborator

Sorry I forgot how my gem works. It is just the binary and provides the hooks for other gems only if you load them. Just update the README https://github.com/simmogs/wkhtmltopdf-heroku/blob/master/README.mdown to indicate your new feature. Thanks for the addition.

Regards Brad

@simmogs

Hi Brad,

As requested.

Thanks,
Graeme

@simmogs

Hi Brad,

Any chance you can merge this in and then publish the updated gem?

Cheers,
Graeme

@bradphelan bradphelan merged commit 354d45e into from
@bradphelan
Collaborator

Pushing the gem now.

@simmogs

awesome, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 17, 2012
  1. @simmogs

    Add hook in for Wisepdf.

    simmogs authored
  2. @simmogs
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 1 deletion.
  1. +1 −1  README.mdown
  2. +9 −0 lib/wkhtmltopdf-heroku.rb
View
2  README.mdown
@@ -2,7 +2,7 @@
Provides a [wkhtmltopdf](http://code.google.com/p/wkhtmltopdf/) binary for [Heroku](http://www.heroku.com/).
-Preconfigures [pdfkit](https://rubygems.org/gems/pdfkit) and [wicked_pdf](https://rubygems.org/gems/wicked_pdf) to use this binary if they are loaded.
+Preconfigures [pdfkit](https://rubygems.org/gems/pdfkit), [wicked_pdf](https://rubygems.org/gems/wicked_pdf) and [wisepdf](http://rubygems.org/gems/wisepdf) to use this binary if they are loaded.
## Copyright
View
9 lib/wkhtmltopdf-heroku.rb
@@ -15,3 +15,12 @@
WickedPdf.config[:exe_path] = WKHTMLTOPDF_PATH
rescue LoadError
end
+
+begin
+ require 'wisepdf'
+
+ Wisepdf::Configuration.configure do |config|
+ config.wkhtmltopdf = WKHTMLTOPDF_PATH
+ end
+rescue LoadError
+end
Something went wrong with that request. Please try again.