Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: cond-0.3.0
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (33 sloc) 0.941 kb
$LOAD_PATH.unshift "devel"
require 'jumpstart'
readme_file = nil
Jumpstart.new('cond') do |s|
s.developer('James M. Lawrence', 'quixoticsycophant@gmail.com')
s.rubyforge_user = "quix"
s.description_sentences = 2
s.rdoc_files = %w[
lib/cond/cond.rb
lib/cond/dsl_definition.rb
lib/cond/error.rb
lib/cond/handler.rb
lib/cond/message_proc.rb
lib/cond/restart.rb
lib/cond/wrapping.rb
]
readme_file = s.readme_file
end
task :readme do
readme = File.read(readme_file)
restarts = File.read("readmes/restarts.rb")
run_re = %r!\A\# !
update = readme.sub(%r!(= Restart Example\n)(.*?)(?=^Run)!m) {
$1 + "\n" +
restarts[%r!^(require.*?)(?=^\#)!m].
gsub(%r!^!m, " ")
}.sub(%r!^(Run:\n)(.*?)(?=^\S)!m) {
$1 + "\n" +
restarts.lines.grep(run_re).map { |t| t.sub(run_re, " ") }.join + "\n"
}
File.open(readme_file, "w") { |f| f.print update }
end
task :prerelease => :readme
Jump to Line
Something went wrong with that request. Please try again.