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:
		
							parent
							
								
									7e1bf76c4c
								
							
						
					
					
						commit
						c79c3b786a
					
				
					 2 changed files with 7 additions and 6 deletions
				
			
		| 
						 | 
					@ -11,10 +11,10 @@ require 'stringio'
 | 
				
			||||||
# Compiled Mongrel extension
 | 
					# Compiled Mongrel extension
 | 
				
			||||||
# support multiple ruby version (fat binaries under windows)
 | 
					# support multiple ruby version (fat binaries under windows)
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  require 'http11'
 | 
					 | 
				
			||||||
rescue LoadError
 | 
					 | 
				
			||||||
  RUBY_VERSION =~ /(\d+.\d+)/
 | 
					  RUBY_VERSION =~ /(\d+.\d+)/
 | 
				
			||||||
  require "#{$1}/http11"
 | 
					  require "#{$1}/http11"
 | 
				
			||||||
 | 
					rescue LoadError
 | 
				
			||||||
 | 
					  require 'http11'
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Gem conditional loader
 | 
					# Gem conditional loader
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,10 +7,8 @@ Rake::ExtensionTask.new('http11', HOE.spec) do |ext|
 | 
				
			||||||
  if RUBY_PLATFORM =~ /mingw|mswin/ then
 | 
					  if RUBY_PLATFORM =~ /mingw|mswin/ then
 | 
				
			||||||
    RUBY_VERSION =~ /(\d+\.\d+)/
 | 
					    RUBY_VERSION =~ /(\d+\.\d+)/
 | 
				
			||||||
    ext.lib_dir = "lib/#{$1}"
 | 
					    ext.lib_dir = "lib/#{$1}"
 | 
				
			||||||
  end
 | 
					  else
 | 
				
			||||||
 | 
					 | 
				
			||||||
    # define cross-compilation tasks when not on Windows.
 | 
					    # define cross-compilation tasks when not on Windows.
 | 
				
			||||||
  unless RUBY_PLATFORM =~ /mingw|mswin/ then
 | 
					 | 
				
			||||||
    ext.cross_compile = true
 | 
					    ext.cross_compile = true
 | 
				
			||||||
    ext.cross_platform = ['i386-mswin32', 'i386-mingw32']
 | 
					    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' }
 | 
					      gs.dependencies.delete gs.dependencies.find { |d| d.name == 'daemons' }
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # cleanup versioned library directory
 | 
				
			||||||
 | 
					  CLEAN.include 'lib/{1.8,1.9}'
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ensure things are built prior testing
 | 
					# ensure things are built prior testing
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue