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-15 18:17:23 -05:00
|
|
|
setup_clean ["ext/http11/*.{bundle,so,obj,pdb,lib,def,exp}", "ext/http11/Makefile", "pkg", "lib/*.bundle", "*.gem", "doc/site/output", ".config"]
|
|
|
|
|
2006-03-04 14:10:26 -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]
|
2006-03-04 13:01:12 -05:00
|
|
|
task :package => [:clean,:compile]
|
2006-01-28 14:03:53 -05:00
|
|
|
|
|
|
|
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-03-06 00:31:39 -05:00
|
|
|
sh %{ cd projects/gem_plugin; rake site }
|
2006-01-28 14:03:53 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
setup_extension("http11", "http11")
|
|
|
|
|
2006-03-07 19:52:20 -05:00
|
|
|
version="0.3.10"
|
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-16 02:04:18 -05:00
|
|
|
author="Zed A. Shaw"
|
|
|
|
name="mongrel"
|
2006-02-18 15:32:05 -05:00
|
|
|
scripts=['mongrel_rails']
|
2006-02-16 02:04:18 -05:00
|
|
|
|
2006-02-22 12:10:19 -05:00
|
|
|
setup_gem(name, version, author, summary, scripts, test_file) do |spec|
|
2006-02-11 22:37:38 -05:00
|
|
|
spec.add_dependency('daemons', '>= 0.4.2')
|
2006-03-06 00:31:39 -05:00
|
|
|
spec.add_dependency('gem_plugin', ">= 0.1")
|
2006-02-11 22:37:38 -05:00
|
|
|
end
|
2006-02-15 18:17:23 -05:00
|
|
|
|
|
|
|
desc "Build a binary gem for Win32"
|
2006-02-22 12:10:19 -05:00
|
|
|
task :win32_gem => [:clean, :compile, :test, :rerdoc, :package_win32]
|
2006-02-15 18:17:23 -05:00
|
|
|
|
2006-02-22 12:59:10 -05:00
|
|
|
scripts_win32 = scripts + ['mongrel_rails_service']
|
2006-02-15 18:17:23 -05:00
|
|
|
task :package_win32 do
|
2006-02-22 12:10:19 -05:00
|
|
|
setup_win32_gem(name, version, version, summary, scripts_win32, test_file) do |spec|
|
|
|
|
spec.add_dependency('win32-service', '>= 0.5.0')
|
2006-03-06 00:31:39 -05:00
|
|
|
spec.add_dependency('gem_plugin', ">= 0.1")
|
2006-02-15 18:17:23 -05:00
|
|
|
spec.files << 'ext/http11/http11.so'
|
|
|
|
spec.extensions = []
|
|
|
|
spec.platform = Gem::Platform::WIN32
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2006-03-06 00:31:39 -05:00
|
|
|
task :gem_plugin_project do
|
|
|
|
sh %{cd projects/gem_plugin; rake gem_test; }
|
|
|
|
end
|
|
|
|
|
|
|
|
task :gem_test => [:gem_plugin_project, :package] do
|
|
|
|
sh %{sudo gem install pkg/mongrel-#{version}}
|
|
|
|
end
|