HEAD / didn't work. (The / resource is a placeholder anyway.)
[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 }