From b829dcd8b83007eb4895541248e1e6802e138359 Mon Sep 17 00:00:00 2001 From: stereobooster Date: Tue, 15 May 2012 17:21:38 +0300 Subject: [PATCH] fix for rbx workaround for cowboyd/therubyracer#157 --- Gemfile | 2 +- execjs.gemspec | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index fb1af24..16e9016 100644 --- a/Gemfile +++ b/Gemfile @@ -8,6 +8,6 @@ group :test do # see https://github.com/nu7hatch/mustang/issues/18 gem 'mustang', :platform => :ruby, :git => "https://github.com/nu7hatch/mustang.git", :ref => "2a3bcfbd9fd0f34e9b004fcd92188f326b40ec2a" - gem 'therubyracer', :platform => :ruby + gem 'therubyracer', :platform => :mri gem 'therubyrhino', :platform => :jruby end diff --git a/execjs.gemspec b/execjs.gemspec index 374c32a..e1e085c 100644 --- a/execjs.gemspec +++ b/execjs.gemspec @@ -14,16 +14,23 @@ Gem::Specification.new do |s| s.add_dependency "multi_json", "~>1.0" s.add_development_dependency "rake" - if RUBY_VERSION < "1.9" && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") + # mri_18 + if (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") && RUBY_VERSION < "1.9" # see https://github.com/jbarnette/johnson/issues/21 s.add_development_dependency "johnson" end - if (!defined?(RUBY_ENGINE) || RUBY_ENGINE != "jruby") - s.add_development_dependency "mustang" + # mri + if (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") + # disabled for rbx, because of https://github.com/cowboyd/therubyracer/issues/157 s.add_development_dependency "therubyracer" - else + end + + # jruby + if (defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby") s.add_development_dependency "therubyrhino", ">=1.73.3" + else + s.add_development_dependency "mustang" end s.authors = ["Sam Stephenson", "Josh Peek"]