Remove threading and use worker processes instead
[unicorn.git] / Rakefile
blobcb21191a7d7a73a09555ea3082d384f38b207eb4
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
14   p.dependencies = ['daemons', 'rack']
16   p.need_tar_gz = false
17   p.need_tgz = true
19   p.extension_pattern = ["ext/**/extconf.rb"]
21   p.eval = proc do
22     add_dependency('daemons', '>= 1.0.3')
23   end
25 end
27 #### Ragel builder
29 desc "Rebuild the Ragel sources"
30 task :ragel do
31   Dir.chdir "ext/http11" do
32     target = "http11_parser.c"
33     File.unlink target if File.exist? target
34     sh "ragel http11_parser.rl -C -G2 -o #{target}"
35     raise "Failed to build C source" unless File.exist? target
36   end
37 end
39 #### Pre-compiled extensions for alternative platforms
41 def move_extensions
42   Dir["ext/**/*.#{Config::CONFIG['DLEXT']}"].each { |file| mv file, "lib/" }
43 end