From 5d55823429867a8bc501a6096debd37184b605d0 Mon Sep 17 00:00:00 2001 From: PJ Hyett Date: Sat, 3 Apr 2010 22:42:25 -0700 Subject: [PATCH] Add provision for creating jruby-compatible gem --- Rakefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 84a5c4c..e8a7688 100644 --- a/Rakefile +++ b/Rakefile @@ -11,9 +11,14 @@ begin gem.homepage = "http://github.com/mojombo/bert" gem.authors = ["Tom Preston-Werner"] gem.add_development_dependency("thoughtbot-shoulda") - gem.require_paths = ["lib", "ext"] - gem.files.include("ext") - gem.extensions << 'ext/bert/c/extconf.rb' + if ENV["JAVA"] + gem.extensions = nil + gem.platform = 'java' + else + gem.require_paths = ["lib", "ext"] + gem.files.include("ext") + gem.extensions << 'ext/bert/c/extconf.rb' + end # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings end rescue LoadError