test_upload: trap EPIPE if a connection shuts us down, too
[unicorn.git] / Rakefile
blobf50fd6c5d070cf5fbda4e8099c6b55a830adff25
2 require 'rubygems'
3 require 'echoe'
5 Echoe.new("unicorn") do |p|
6   p.summary = "A small fast HTTP library and server for Rack applications."
7   p.author = "Eric Wong"
8   p.email = "normalperson@yhbt.net"
9   p.clean_pattern = ['ext/http11/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'lib/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'ext/http11/Makefile', 'pkg', 'lib/*.bundle', '*.gem', 'site/output', '.config', 'coverage', 'test_*.log', 'log', 'doc']
10   p.url = "http://unicorn.bogomips.org"
11   p.rdoc_pattern = ['README', 'LICENSE', 'CONTRIBUTORS', 'CHANGELOG', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
12   p.ignore_pattern = /^(pkg|site|projects|doc|log)|CVS|\.log/
13   p.extension_pattern = nil
15   p.need_tar_gz = false
16   p.need_tgz = true
18   p.extension_pattern = ["ext/**/extconf.rb"]
20 end
22 #### Ragel builder
24 desc "Rebuild the Ragel sources"
25 task :ragel do
26   Dir.chdir "ext/http11" do
27     target = "http11_parser.c"
28     File.unlink target if File.exist? target
29     sh "ragel http11_parser.rl -C -G2 -o #{target}"
30     raise "Failed to build C source" unless File.exist? target
31   end
32 end
34 #### Pre-compiled extensions for alternative platforms
36 def move_extensions
37   Dir["ext/**/*.#{Config::CONFIG['DLEXT']}"].each { |file| mv file, "lib/" }
38 end