pdfkit 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pdfkit might be problematic. Click here for more details.

data/README.md CHANGED
@@ -4,9 +4,12 @@ Create PDFs using plain old HTML+CSS. Uses [wkhtmltopdf](http://github.com/antia
4
4
 
5
5
  ## Installation
6
6
 
7
- 1. Install wkhtmltopdf
8
- ** Download the latest binary from http://code.google.com/p/wkhtmltopdf/downloads/list
9
- ** Place the binary somewhere on your path (e.g /usr/local/bin)
7
+ 1. Install wkhtmltopdf (optional)
8
+ ** PDFKit comes bundled with wkhtmltopdf binaries for Linux i386 and OS X i386
9
+ ** PDFKit defaults to user installed versions of wkhtmltopdf if found
10
+ ** Installing wkhtmltopdf binary
11
+ *** Download the latest binary from http://code.google.com/p/wkhtmltopdf/downloads/list
12
+ *** Place the binary somewhere on your path (e.g /usr/local/bin)
10
13
  2. Install PDFKit
11
14
 
12
15
  $ gem install pdfkit
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
data/bin/pdfkit.rb ADDED
@@ -0,0 +1,2 @@
1
+ # Having this file, which matches the name of the gem,
2
+ # is required for the gem to be installed and called properly.
Binary file
Binary file
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ executable = `which wkhtmltopdf`.chomp
4
+
5
+ if executable.empty?
6
+
7
+ binary = case RUBY_PLATFORM
8
+ when /linux/
9
+ 'wkhtmltopdf-linux-i386-0-9-9'
10
+ when /darwin/
11
+ 'wkhtmltopdf-osx-i386-0-9-9'
12
+ else
13
+ raise "No bundled binaries found for your system. Please install wkhtmltopdf."
14
+ end
15
+ executable = File.join(File.dirname(__FILE__), binary)
16
+
17
+ end
18
+
19
+ arguments = $*.map { |arg| arg.include?(' ') ? %Q("#{arg}") : arg }
20
+
21
+ system(executable + " " + arguments.join(" "))
data/lib/pdfkit/pdfkit.rb CHANGED
@@ -2,7 +2,7 @@ class PDFKit
2
2
 
3
3
  class NoExecutableError < StandardError
4
4
  def initialize
5
- super('Could not locate wkhtmltopdf executable')
5
+ super('Could not locate wkhtmltopdf-proxy executable')
6
6
  end
7
7
  end
8
8
 
@@ -23,7 +23,7 @@ class PDFKit
23
23
  }
24
24
  @options = normalize_options(options.reverse_merge(default_options))
25
25
 
26
- @cmd = `which wkhtmltopdf`.chomp
26
+ @cmd = `which wkhtmltopdf-proxy`.chomp
27
27
  raise NoExecutableError.new if @cmd.blank?
28
28
  end
29
29
 
data/pdfkit.gemspec CHANGED
@@ -5,13 +5,14 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pdfkit}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jdpace"]
12
- s.date = %q{2010-05-24}
12
+ s.date = %q{2010-06-01}
13
13
  s.description = %q{Uses wkhtmltopdf to create PDFs using HTML}
14
14
  s.email = %q{jared@codewordstudios.com}
15
+ s.executables = ["pdfkit.rb", "wkhtmltopdf-linux-i386-0-9-9", "wkhtmltopdf-osx-i386-0-9-9", "wkhtmltopdf-proxy"]
15
16
  s.extra_rdoc_files = [
16
17
  "LICENSE",
17
18
  "README.md"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - jdpace
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-24 00:00:00 -04:00
17
+ date: 2010-06-01 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -47,8 +47,11 @@ dependencies:
47
47
  version_requirements: *id002
48
48
  description: Uses wkhtmltopdf to create PDFs using HTML
49
49
  email: jared@codewordstudios.com
50
- executables: []
51
-
50
+ executables:
51
+ - pdfkit.rb
52
+ - wkhtmltopdf-linux-i386-0-9-9
53
+ - wkhtmltopdf-osx-i386-0-9-9
54
+ - wkhtmltopdf-proxy
52
55
  extensions: []
53
56
 
54
57
  extra_rdoc_files: