lib/rake/extensiontask.rb in luislavena-rake-compiler-0.4.0 vs lib/rake/extensiontask.rb in luislavena-rake-compiler-0.4.1

- old
+ new

@@ -186,10 +186,15 @@ end # include the files in the gem specification spec.files += ext_files + # Make sure that the required ruby version matches the ruby version + # we've used for cross compiling: + target_version = RUBY_VERSION =~ /^1.8/ ? '1.8.6' : '1.9.0' + spec.required_ruby_version = "~> #{target_version}" + # Generate a package for this gem gem_package = Rake::GemPackageTask.new(spec) do |pkg| pkg.need_zip = false pkg.need_tar = false end @@ -227,10 +232,11 @@ # tmp_path tmp_path = "#{@tmp_dir}/#{cross_platform}/#{@name}" unless rbconfig_file = config_file["rbconfig-#{ruby_ver}"] then - fail "no configuration section for specified version of Ruby (rbconfig-#{ruby_ver})" + warn "no configuration section for specified version of Ruby (rbconfig-#{ruby_ver})" + return end # define compilation tasks for cross platfrom! define_compile_tasks(cross_platform)