1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Try loading versioned http parser first.

Also, add the versioned directory to the clean task
This commit is contained in:
Luis Lavena 2010-04-28 02:22:58 -03:00
parent 7e1bf76c4c
commit c79c3b786a
2 changed files with 7 additions and 6 deletions

View file

@ -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

View file

@ -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
else
# define cross-compilation tasks when not on Windows.
unless RUBY_PLATFORM =~ /mingw|mswin/ then
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