unicorn.git  about / heads / tags
Rack HTTP server for Unix and fast clients
blob bbffdb0a834d23451a7c41dd7f457de3d5e53d3c 1243 bytes (raw)
$ git show v0.5.0:Rakefile	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 

require 'rubygems'
require 'echoe'

Echoe.new("unicorn") do |p|
  p.summary = "A small fast HTTP library and server for Rack applications."
  p.author = "Eric Wong"
  p.email = "normalperson@yhbt.net"
  p.clean_pattern = ['ext/unicorn/http11/*.{bundle,so,o,obj,pdb,lib,def,exp}',
                     'lib/*.{bundle,so,o,obj,pdb,lib,def,exp}',
                     'ext/unicorn/http11/Makefile',
                     'pkg', 'lib/*.bundle', '*.gem',
                     'site/output', '.config', 'coverage',
                     'test_*.log', 'log', 'doc']
  p.url = "http://unicorn.bogomips.org"
  p.ignore_pattern = /^(pkg|site|projects|doc|log)|CVS|\.log/
  p.need_tar_gz = false
  p.need_tgz = true

  p.extension_pattern = ["ext/**/extconf.rb"]

  # Eric hasn't bothered to figure out running exec tests properly
  # from Rake, but Eric prefers GNU make to Rake for tests anyways...
  p.test_pattern = [ 'test/unit/test*.rb' ]
end

#### Ragel builder

desc "Rebuild the Ragel sources"
task :ragel do
  Dir.chdir "ext/unicorn/http11" do
    target = "http11_parser.c"
    File.unlink target if File.exist? target
    sh "ragel http11_parser.rl -C -G2 -o #{target}"
    raise "Failed to build C source" unless File.exist? target
  end
end

git clone https://yhbt.net/unicorn.git