2006-01-28 14:03:53 -05:00
|
|
|
require 'rake'
|
|
|
|
require 'rake/testtask'
|
|
|
|
require 'rake/clean'
|
|
|
|
require 'rake/gempackagetask'
|
|
|
|
require 'rake/rdoctask'
|
|
|
|
require 'tools/rakehelp'
|
|
|
|
require 'fileutils'
|
|
|
|
include FileUtils
|
|
|
|
|
|
|
|
setup_tests
|
2006-02-12 15:02:56 -05:00
|
|
|
setup_clean ["ext/http11/Makefile", "pkg", "lib/*.bundle", "ext/http11/*.bundle", "doc/site/output"]
|
2006-02-11 14:35:06 -05:00
|
|
|
setup_rdoc ['README', 'LICENSE', 'COPYING', 'lib/*.rb', 'doc/**/*.rdoc', 'ext/http11/http11.c']
|
2006-01-28 14:03:53 -05:00
|
|
|
|
|
|
|
desc "Does a full compile, test run"
|
|
|
|
task :default => [:compile, :test]
|
|
|
|
|
|
|
|
desc "Compiles all extensions"
|
|
|
|
task :compile => [:http11]
|
|
|
|
task :package => [:clean]
|
|
|
|
|
|
|
|
task :ragel do
|
2006-02-12 15:02:56 -05:00
|
|
|
sh %{/usr/local/bin/ragel ext/http11/http11_parser.rl | /usr/local/bin/rlcodegen -G2 -o ext/http11/http11_parser.c}
|
|
|
|
end
|
|
|
|
|
|
|
|
task :site do
|
|
|
|
sh %{pushd doc/site; webgen; scp -r output/* #{ENV['SSH_USER']}@rubyforge.org:/var/www/gforge-projects/mongrel/; popd }
|
|
|
|
sh %{ scp -r doc/rdoc/* #{ENV['SSH_USER']}@rubyforge.org:/var/www/gforge-projects/mongrel/rdoc/ }
|
2006-01-28 14:03:53 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
setup_extension("http11", "http11")
|
|
|
|
|
2006-02-11 22:37:38 -05:00
|
|
|
summary = "A small fast HTTP library and server that runs Rails, Camping, and Nitro apps."
|
2006-01-28 14:03:53 -05:00
|
|
|
test_file = "test/test_ws.rb"
|
2006-02-14 08:13:14 -05:00
|
|
|
setup_gem("mongrel", "0.3.3", "Zed A. Shaw", summary, ['mongrel_rails'], test_file) do |spec|
|
2006-02-11 22:37:38 -05:00
|
|
|
spec.add_dependency('daemons', '>= 0.4.2')
|
|
|
|
end
|