Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rakefile → Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec = Gem::Specification.new do |s|
s.email = "[email protected],[email protected]"
s.platform = Gem::Platform::RUBY
s.summary = "Provides binaries for WKHTMLTOPDF project in an easily accessible package."
s.files = FileList["{bin}/**/*"].to_a
s.files = FileList["{bin,libexec,lib}/*"].to_a
s.has_rdoc = false
s.executables << "wkhtmltopdf"
s.require_path = '.'
Expand Down
18 changes: 8 additions & 10 deletions bin/wkhtmltopdf
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

executable = case RUBY_PLATFORM
arch = case RUBY_PLATFORM
when /64.*linux/
'wkhtmltopdf_linux_amd64'
'linux-amd64'
when /linux/
'wkhtmltopdf_linux_386'
'linux-x86'
when /darwin/
'wkhtmltopdf_darwin_386'
'darwin-x86'
else
raise "Invalid platform. Must be running linux or intel-based Mac OS."
end

arguments = $*.map { |x| x.include?(' ') ? "'" + x + "'" : x }
args = $*.map { |x| x.include?(' ') ? "'" + x + "'" : x }
cmd = File.expand_path "#{File.dirname(__FILE__)}/../libexec/wkhtmltopdf-#{arch}"

executable = File.join(File.dirname(__FILE__), executable)
r = system(executable + " " + arguments.join(" "))

exit r ? 0 : 1
exec "#{cmd} #{args.join(' ')}"
2 changes: 0 additions & 2 deletions bin/wkhtmltopdf-binary.rb

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed pkg/wkhtmltopdf-binary-0.1.3.gem
Binary file not shown.
Binary file removed pkg/wkhtmltopdf-binary-0.1.4.gem
Binary file not shown.
Binary file removed pkg/wkhtmltopdf-binary-0.1.5.gem
Binary file not shown.
Binary file removed pkg/wkhtmltopdf-binary-0.1.6.gem
Binary file not shown.
Binary file removed pkg/wkhtmltopdf-binary-0.1.7.gem
Binary file not shown.
Binary file removed pkg/wkhtmltopdf-binary-0.9.5.4.gem
Binary file not shown.
21 changes: 6 additions & 15 deletions wkhtmltopdf-binary.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,11 @@ Gem::Specification.new do |s|
s.email = '[email protected],[email protected]'

s.bindir = 'bin'
s.executables = ['wkhtmltopdf']
s.executables = %w(wkhtmltopdf)

s.files = [
'lib/wkhtmltopdf-binary.rb',
'bin/wkhtmltopdf_linux_amd64',
'bin/wkhtmltopdf-binary.rb',
'bin/wkhtmltopdf',
'bin/wkhtmltopdf_darwin_386',
'bin/wkhtmltopdf_linux_386'
]
s.files = %w(
lib/wkhtmltopdf-binary.rb bin/wkhtmltopdf
libexec/wkhtmltopdf-darwin-x86
libexec/wkhtmltopdf-linux-amd64
libexec/wkhtmltopdf-linux-x86)
end