Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

first commit

  • Loading branch information...
commit c7b4b0b56b8e2c465ae5f90af0542f195a5d4018 1 parent b8feaf4
@bradphelan bradphelan authored
View
4 .gitignore
@@ -27,7 +27,7 @@ pkg
#
# For MacOS:
#
-#.DS_Store
+.DS_Store
# For TextMate
#*.tmproj
@@ -39,7 +39,7 @@ pkg
#.\#*
# For vim:
-#*.swp
+*.swp
# For redcar:
#.redcar
View
20 Gemfile.lock
@@ -0,0 +1,20 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ git (1.2.5)
+ jeweler (1.6.4)
+ bundler (~> 1.0)
+ git (>= 1.2.5)
+ rake
+ rake (0.9.2)
+ rcov (0.9.10)
+ shoulda (2.11.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ bundler (~> 1.0.0)
+ jeweler (~> 1.6.4)
+ rcov
+ shoulda
View
12 README.rdoc
@@ -1,16 +1,6 @@
= wkhtmltopdf_heroku_and_osx_binaries
-Description goes here.
-
-== Contributing to wkhtmltopdf_heroku_and_osx_binaries
-
-* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
-* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
-* Fork the project
-* Start a feature/bugfix branch
-* Commit and push until you are happy with your contribution
-* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
-* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
+Binaries for wkhtmltopdf for OSX and Heroku
== Copyright
View
4 Rakefile
@@ -17,8 +17,8 @@ Jeweler::Tasks.new do |gem|
gem.name = "wkhtmltopdf_heroku_and_osx_binaries"
gem.homepage = "http://github.com/bradphelan/wkhtmltopdf_heroku_and_osx_binaries"
gem.license = "MIT"
- gem.summary = %Q{TODO: one-line summary of your gem}
- gem.description = %Q{TODO: longer description of your gem}
+ gem.summary = %Q{wkhtmltopdf binaries for OSX(darwin) and heroku}
+ gem.description = %Q{wkhtmltopdf binaries for OSX(darwin) and heroku}
gem.email = "bradphelan@xtargets.com"
gem.authors = ["Brad Phelan"]
# dependencies defined in Gemfile
View
1  VERSION
@@ -0,0 +1 @@
+0.0.1
View
17 bin/wkhtmltopdf
@@ -0,0 +1,17 @@
+#!/usr/bin/ruby
+
+
+if RUBY_PLATFORM =~ /x86_64-linux/
+ executable = 'wkhtmltopdf-linux-amd64'
+elsif RUBY_PLATFORM =~ /darwin/
+ executable = 'wkhtmltopdf-darwin'
+else
+ raise "Invalid platform. Must be running linux amd x64 or intel-based Mac OS."
+end
+
+arguments = $*.map { |x| x.include?(' ') ? "'" + x + "'" : x }
+
+executable = File.join(File.dirname(__FILE__), executable)
+r = system(executable + " " + arguments.join(" "))
+
+exit r ? 0 : 1
View
BIN  bin/wkhtmltopdf-darwin
Binary file not shown
View
BIN  bin/wkhtmltopdf-linux-amd64
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.