diff --git a/lib/mongrel.rb b/lib/mongrel.rb index eb659cb0..6c935b3f 100644 --- a/lib/mongrel.rb +++ b/lib/mongrel.rb @@ -11,10 +11,10 @@ require 'stringio' # Compiled Mongrel extension # support multiple ruby version (fat binaries under windows) begin - require 'http11' -rescue LoadError RUBY_VERSION =~ /(\d+.\d+)/ require "#{$1}/http11" +rescue LoadError + require 'http11' end # Gem conditional loader diff --git a/tasks/native.rake b/tasks/native.rake index 7a5107ef..4d5d71b3 100644 --- a/tasks/native.rake +++ b/tasks/native.rake @@ -7,10 +7,8 @@ Rake::ExtensionTask.new('http11', HOE.spec) do |ext| if RUBY_PLATFORM =~ /mingw|mswin/ then RUBY_VERSION =~ /(\d+\.\d+)/ ext.lib_dir = "lib/#{$1}" - end - - # define cross-compilation tasks when not on Windows. - unless RUBY_PLATFORM =~ /mingw|mswin/ then + else + # define cross-compilation tasks when not on Windows. ext.cross_compile = true ext.cross_platform = ['i386-mswin32', 'i386-mingw32'] @@ -18,6 +16,9 @@ Rake::ExtensionTask.new('http11', HOE.spec) do |ext| gs.dependencies.delete gs.dependencies.find { |d| d.name == 'daemons' } end end + + # cleanup versioned library directory + CLEAN.include 'lib/{1.8,1.9}' end # ensure things are built prior testing