jashmenn / trollop

mirror of William Morgan's repo at git://gitorious.org/trollop/mainline.git

This URL has Read+Write access

trollop / Rakefile
100644 37 lines (28 sloc) 1.281 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- ruby -*-
 
require 'rubygems'
require 'hoe'
 
$:.unshift "lib"
require 'trollop'
 
class Hoe
  def extra_dev_deps; @extra_dev_deps.reject { |x| x[0] == "hoe" } end
end
 
Hoe.new('trollop', Trollop::VERSION) do |p|
  p.rubyforge_name = 'trollop'
  p.author = "William Morgan"
  p.summary = "Trollop is a commandline option parser for Ruby that just gets out of your way. One line of code per option is all you need to write. For that, you get a nice automatically-generated help page, robust option parsing, command subcompletion, and sensible defaults for everything you don't specify."
  p.description = p.paragraphs_of('README.txt', 4..5, 9..18).join("\n\n").gsub(/== SYNOPSIS/, "Synopsis")
  p.url = "http://trollop.rubyforge.org"
  p.changes = p.paragraphs_of('History.txt', 0..0).join("\n\n")
  p.email = "wmorgan-trollop@masanjin.net"
end
 
WWW_FILES = FileList["www/*"] + %w(README.txt FAQ.txt)
task :upload_webpage => WWW_FILES do |t|
  sh "rsync -Paz -essh #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/trollop/"
end
 
task :rdoc do |t|
  sh "rdoc lib README.txt History.txt -m README.txt"
end
 
task :upload_docs => :rdoc do |t|
  sh "rsync -az -essh doc/* wmorgan@rubyforge.org:/var/www/gforge-projects/trollop/trollop/"
end
 
# vim: syntax=ruby