more documentation fixups
[trollop:mainline.git] / Rakefile
1 require 'rubygems'
2 $:.unshift "lib"
3 require 'trollop'
4 require 'rake/gempackagetask.rb'
5
6 spec = Gem::Specification.new do |s|
7  s.name = "trollop"
8  s.version = Trollop::VERSION
9  s.date = Time.now
10  s.email = "wmorgan-trollop@masanjin.net"
11  s.authors = ["William Morgan"]
12  s.summary = "Trollop is a commandline option parser for Ruby that just gets out of your way."
13  s.homepage = "http://trollop.rubyforge.org"
14  s.files = %w(lib/trollop.rb test/test_trollop.rb) + Dir["*.txt"]
15  s.executables = []
16  s.rubyforge_project = "trollop"
17  s.description = "Trollop is a commandline option parser for Ruby that just
18 gets out of your way. One line of code per option is all you need to write.
19 For that, you get a nice automatically-generated help page, robust option
20 parsing, command subcompletion, and sensible defaults for everything you don't
21 specify."
22 end
23
24 WWW_FILES = FileList["www/*"] + %w(README.txt FAQ.txt)
25 task :upload_webpage => WWW_FILES do |t|
26   sh "rsync -Paz -essh #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/trollop/"
27 end
28
29 task :rdoc do |t|
30   sh "rdoc lib README.txt History.txt -m README.txt"
31 end
32
33 task :upload_docs => :rdoc do |t|
34   sh "rsync -az -essh doc/* wmorgan@rubyforge.org:/var/www/gforge-projects/trollop/trollop/"
35 end
36
37 task :test do
38   sh %!ruby -Ilib:ext:bin:test test/test_trollop.rb!
39 end
40
41 Rake::GemPackageTask.new(spec) do |pkg|
42   pkg.need_tar = true
43 end
44
45 # vim: syntax=ruby