pdfkit-amd64 0.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ pkg/*
2
+ *.gem
3
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in pdfkit-amd64.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,31 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ pdfkit-amd64 (0.9.9)
5
+ pdfkit
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ diff-lcs (1.1.2)
11
+ pdfkit (0.4.6)
12
+ rake (0.8.7)
13
+ rspec (2.0.0)
14
+ rspec-core (= 2.0.0)
15
+ rspec-expectations (= 2.0.0)
16
+ rspec-mocks (= 2.0.0)
17
+ rspec-core (2.0.0)
18
+ rspec-expectations (2.0.0)
19
+ diff-lcs (>= 1.1.2)
20
+ rspec-mocks (2.0.0)
21
+ rspec-core (= 2.0.0)
22
+ rspec-expectations (= 2.0.0)
23
+
24
+ PLATFORMS
25
+ ruby
26
+
27
+ DEPENDENCIES
28
+ pdfkit
29
+ pdfkit-amd64!
30
+ rake
31
+ rspec (~> 2.0)
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ Bundler.require :development
5
+
6
+ require 'rake'
7
+ require 'rspec/core/rake_task'
8
+
9
+ RSpec::Core::RakeTask.new(:spec) do |spec|
10
+ end
11
+
12
+ task :default => :spec
Binary file
@@ -0,0 +1,8 @@
1
+ require 'pdfkit'
2
+ require 'pdfkit-amd64/find_binary'
3
+
4
+ PDFKit.configure do |config|
5
+ unless File.executable?(config.wkhtmltopdf)
6
+ config.wkhtmltopdf = PDFKit::AMD64.find_binary
7
+ end
8
+ end
@@ -0,0 +1,17 @@
1
+ require 'rbconfig'
2
+
3
+ class PDFKit
4
+ module AMD64
5
+ def self.find_binary
6
+ if Config::CONFIG['host_os'] =~ /x86_64-linux/i
7
+ binary = File.join(File.dirname(__FILE__), '../../bin/wkhtmltopdf-amd64')
8
+ else
9
+ binary = `which wkhtmltopdf 2> /dev/null`.strip
10
+ if $? != 0
11
+ raise "No wkhtmltopdf binary found in your system. Please install wkhtmltopdf."
12
+ end
13
+ end
14
+ binary
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,5 @@
1
+ class PDFKit
2
+ module AMD64
3
+ VERSION = "0.9.9"
4
+ end
5
+ end
@@ -0,0 +1,32 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "pdfkit-amd64/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "pdfkit-amd64"
7
+ s.version = PDFKit::AMD64::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Petteri Räty"]
10
+ s.email = ["github@petteriraty.eu"]
11
+ s.homepage = "http://rubygems.org/gems/pdfkit-amd64"
12
+ # wkhtmltopdf binary is GPL-3
13
+ # my code is MIT
14
+ s.licenses = ['GPL-3','MIT']
15
+ s.summary = %q{wkhtmltopdf amd64 binary for pdfkit}
16
+ s.description = %q{
17
+ This gem will install a amd64 binary and automatically
18
+ configure pdfkit to use it. It will fall back on searching
19
+ PATH if architecture does not match amd64.
20
+ }
21
+
22
+ s.rubyforge_project = "pdfkit-amd64"
23
+
24
+ s.files = `git ls-files`.split("\n")
25
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
26
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
27
+ s.require_paths = ["lib"]
28
+
29
+ s.add_dependency 'pdfkit'
30
+ s.add_development_dependency 'rspec', '~>2.0'
31
+ s.add_development_dependency 'rake'
32
+ end
@@ -0,0 +1,9 @@
1
+ require 'pdfkit-amd64/find_binary'
2
+
3
+ describe PDFKit::AMD64 do
4
+ it "should find the binary inside the gem" do
5
+ Config::CONFIG.should_receive(:[]).and_return('x86_64-linux')
6
+ binary = PDFKit::AMD64.find_binary
7
+ File.executable?(binary).should be_true
8
+ end
9
+ end
metadata ADDED
@@ -0,0 +1,120 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pdfkit-amd64
3
+ version: !ruby/object:Gem::Version
4
+ hash: 41
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 9
9
+ - 9
10
+ version: 0.9.9
11
+ platform: ruby
12
+ authors:
13
+ - "Petteri R\xC3\xA4ty"
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-10-17 00:00:00 +03:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ hash: 3
28
+ segments:
29
+ - 0
30
+ version: "0"
31
+ type: :runtime
32
+ name: pdfkit
33
+ prerelease: false
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ requirement: &id002 !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ hash: 3
42
+ segments:
43
+ - 2
44
+ - 0
45
+ version: "2.0"
46
+ type: :development
47
+ name: rspec
48
+ prerelease: false
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
51
+ requirement: &id003 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ type: :development
61
+ name: rake
62
+ prerelease: false
63
+ version_requirements: *id003
64
+ description: "\n This gem will install a amd64 binary and automatically\n configure pdfkit to use it. It will fall back on searching\n PATH if architecture does not match amd64.\n "
65
+ email:
66
+ - github@petteriraty.eu
67
+ executables:
68
+ - wkhtmltopdf-amd64
69
+ extensions: []
70
+
71
+ extra_rdoc_files: []
72
+
73
+ files:
74
+ - .gitignore
75
+ - Gemfile
76
+ - Gemfile.lock
77
+ - Rakefile
78
+ - bin/wkhtmltopdf-amd64
79
+ - lib/pdfkit-amd64.rb
80
+ - lib/pdfkit-amd64/find_binary.rb
81
+ - lib/pdfkit-amd64/version.rb
82
+ - pdfkit-amd64.gemspec
83
+ - spec/amd64_spec.rb
84
+ has_rdoc: true
85
+ homepage: http://rubygems.org/gems/pdfkit-amd64
86
+ licenses:
87
+ - GPL-3
88
+ - MIT
89
+ post_install_message:
90
+ rdoc_options: []
91
+
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ hash: 3
100
+ segments:
101
+ - 0
102
+ version: "0"
103
+ required_rubygems_version: !ruby/object:Gem::Requirement
104
+ none: false
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ hash: 3
109
+ segments:
110
+ - 0
111
+ version: "0"
112
+ requirements: []
113
+
114
+ rubyforge_project: pdfkit-amd64
115
+ rubygems_version: 1.3.7
116
+ signing_key:
117
+ specification_version: 3
118
+ summary: wkhtmltopdf amd64 binary for pdfkit
119
+ test_files:
120
+ - spec/amd64_spec.rb