mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Load C extension using 'fat-binary' approach.
This commit is contained in:
parent
b2379ce4ba
commit
0ef6f47c24
3 changed files with 13 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
* Better RubyGems support thanks to added env she-bang to mongrel_rails executable.
|
||||
* Fixed proper version reporting under 1.9
|
||||
* Consider MinGW as valid Windows platform.
|
||||
* Smartly load http11 extension using fat-binary approach.
|
||||
|
||||
=== 1.1.5 / 2008-05-22
|
||||
|
||||
|
|
|
@ -9,7 +9,13 @@ require 'uri'
|
|||
require 'stringio'
|
||||
|
||||
# Compiled Mongrel extension
|
||||
require 'http11'
|
||||
# support multiple ruby version (fat binaries under windows)
|
||||
begin
|
||||
require 'http11'
|
||||
rescue LoadError
|
||||
RUBY_VERSION =~ /(\d+.\d+)/
|
||||
require "#{$1}/http11"
|
||||
end
|
||||
|
||||
# Gem conditional loader
|
||||
require 'mongrel/gems'
|
||||
|
|
|
@ -3,6 +3,11 @@ require 'rake/extensiontask'
|
|||
|
||||
# build http11 C extension
|
||||
Rake::ExtensionTask.new('http11', HOE.spec) do |ext|
|
||||
# define target for extension (supporting fat binaries)
|
||||
if RUBY_PLATFORM =~ /mingw/ then
|
||||
RUBY_VERSION =~ /(\d+\.\d+)/
|
||||
ext.lib_dir = "lib/#{$1}"
|
||||
end
|
||||
end
|
||||
|
||||
# ensure things are built prior testing
|
||||
|
|
Loading…
Add table
Reference in a new issue