Permalink
Browse files

first commit

  • Loading branch information...
1 parent b8feaf4 commit c7b4b0b56b8e2c465ae5f90af0542f195a5d4018 @bradphelan bradphelan committed Sep 8, 2011
Showing with 43 additions and 15 deletions.
  1. +2 −2 .gitignore
  2. +20 −0 Gemfile.lock
  3. +1 −11 README.rdoc
  4. +2 −2 Rakefile
  5. +1 −0 VERSION
  6. +17 −0 bin/wkhtmltopdf
  7. BIN bin/wkhtmltopdf-darwin
  8. BIN bin/wkhtmltopdf-linux-amd64
View
@@ -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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1 @@
+0.0.1
View
@@ -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
Binary file not shown.
View
Binary file not shown.

0 comments on commit c7b4b0b

Please sign in to comment.