Sha256: ff57ee4b2d85737cc3f0659cf86e6383ce1be75f9e85c4fdc89f5f8122545c81

Contents?: true

Size: 745 Bytes

Versions: 1

Compression:

Stored size: 745 Bytes

Contents

#!/usr/bin/env ruby

 ###
 # wkhtmltopdf_binary_gem Copyright 2013 The University of Iowa 
 #
 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
 # use this file except in compliance with the License. You may obtain a copy
 # of the License at http://www.apache.org/licenses/LICENSE-2.0

require 'rbconfig'

if RbConfig::CONFIG['host_os'] =~ /linux/
  executable = RbConfig::CONFIG['host_cpu'] == 'x86_64' ? 'wkhtmltopdf_linux_x64' : 'wkhtmltopdf_linux_386'
elsif RbConfig::CONFIG['host_os'] =~ /darwin/
  executable = 'wkhtmltopdf_darwin_386'
else
  raise "Invalid platform. Must be running linux or intel-based Mac OS."
end

executable = File.join(File.dirname(__FILE__), executable)
system *$*.unshift(executable)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wkhtmltopdf-binary-0.9.9.3 bin/wkhtmltopdf