README.md in imgkit-1.5.0 vs README.md in imgkit-1.6.0
- old
+ new
@@ -1,7 +1,9 @@
# IMGKit
+<img src="https://travis-ci.org/csquared/IMGKit.svg?branch=master" />
+
Create JPGs using plain old HTML+CSS. Uses [wkhtmltoimage](http://github.com/antialize/wkhtmltopdf) on the backend which renders HTML using Webkit.
Heavily based on [PDFKit](http://github.com/jdpace/pdfkit/).
## Install
@@ -9,21 +11,26 @@
### IMGKit
gem install imgkit
### wkhtmltoimage
- * **Automatic**: `sudo imgkit --install-wkhtmltoimage`
+ 1. Use installer: `sudo imgkit --install-wkhtmltoimage`
install latest version into /usr/local/bin
(overwrite defaults with e.g. ARCHITECTURE=amd64 TO=/home/foo/bin)
- * By hand: http://code.google.com/p/wkhtmltopdf/downloads/list
+ 2. Install by hand: [http://wkhtmltopdf.org/downloads.html](http://wkhtmltopdf.org/downloads.html)
+ 3. Try using the `wkhtmltoimage-binary` gem (mac + linux)
+```
+gem install wkhtmltoimage-binary
+```
## Usage
# IMGKit.new takes the HTML and any options for wkhtmltoimage
# run `wkhtmltoimage --extended-help` for a full list of options
kit = IMGKit.new(html, :quality => 50)
kit.stylesheets << '/path/to/css/file'
+ kit.javascripts << '/path/to/js/file'
# Get the image BLOB
img = kit.to_img
# New in 1.3!
@@ -34,11 +41,11 @@
# Save the image to a file
file = kit.to_file('/path/to/save/file.jpg')
file = kit.to_file('/path/to/save/file.png')
# IMGKit.new can optionally accept a URL or a File.
- # Stylesheets can not be added when source is provided as a URL of File.
+ # Stylesheets nor Javascripts can not be added when source is provided as a URL of File.
kit = IMGKit.new('http://google.com')
kit = IMGKit.new(File.new('/path/to/html'))
# Add any kind of option through meta tags
IMGKit.new('<html><head><meta name="imgkit-quality" content="75"...
@@ -243,23 +250,10 @@
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.
## Testing
-Make sure the tests pass in the following ruby versions:
-
- - 1.8.7-p370
- - 1.9.2-p290
- - 1.9.3-p194
-
-You can simply
-
- $ rbenv-install <version>
- $ rbenv shell <version>
- $ bundle
- $ bundle exec rake
-
-For each version
+Travis.yml is configured for multiple rubies, so I would just test a 2.1.x version and let travis handle the rest.
## Copyright
Copyright (c) 2010 <a href="mailto:christopher.continanza@gmail.com">Chris Continanza</a>
Based on work by Jared Pace