Stream from the venti server instead of reading into memory.
[webvac] / Rakefile
1 require 'rubygems/package_task'
2 require 'rdoc/task'
3
4 $: << "#{File.dirname(__FILE__)}/lib"
5
6 spec = eval File.read(Dir['*.gemspec'][0])
7
8 Rake::RDocTask.new(:doc) { |t|
9         t.main = 'README'
10         t.rdoc_files.include 'lib/**/*.rb', 'doc/*', 'bin/*', 'ext/**/*.c',
11                 'ext/**/*.rb'
12         t.options << '-S' << '-N'
13         t.rdoc_dir = 'doc/rdoc'
14 }
15
16 Gem::PackageTask.new(spec) { |pkg|
17         pkg.need_tar_bz2 = true
18 }
19 desc "Cleans out the packaged files."
20 task(:clean) {
21         FileUtils.rm_rf 'pkg'
22 }
23
24 desc "Builds and installs the gem for #{spec.name}"
25 task(:install => :package) {
26         g = "pkg/#{spec.name}-#{spec.version}.gem"
27         system "sudo gem install -l #{g}"
28 }
29
30 desc "Runs IRB, automatically require()ing #{spec.name}."
31 task(:irb) {
32         exec "irb -Ilib -r#{spec.name}"
33 }
34
35 desc "Runs IRB, automatically require()ing #{spec.name}, with "\
36         "acme-suitable options"
37 task(:airb) {
38         exec "irb -Ilib -r#{spec.name} --prompt default --noreadline"
39 }
40
41 desc "Runs nginx test server."
42 task(:nginx) {
43         exec "nginx", "-c", "#{__dir__}/doc/nginx.example.conf"
44 }