Skip to content
Newer
Older
100644 44 lines (37 sloc) 1.02 KB
33cdcd1 @quix update jumpstart
authored
1 $LOAD_PATH.unshift "devel"
090ceaf @quix add gemspec, rake tasks; tweak docs
authored
2
d2e8bc2 @quix update build tools
authored
3 require 'levitate'
33cdcd1 @quix update jumpstart
authored
4
5 readme_file = nil
6
d2e8bc2 @quix update build tools
authored
7 Levitate.new "cond" do |s|
485265f @quix remove rubyforge from readme; update tools
authored
8 s.developers << ['James M. Lawrence', 'quixoticsycophant@gmail.com']
d2e8bc2 @quix update build tools
authored
9 s.username = "quix"
10 s.rubyforge_info = ["quix", "cond"]
33cdcd1 @quix update jumpstart
authored
11 s.description_sentences = 2
d2e8bc2 @quix update build tools
authored
12 s.development_dependencies = [
13 ["rspec", "~> 1.3.0"],
14 ]
15
2acde6c @quix add cond/dsl; remove CondPrivate
authored
16 s.rdoc_files = %w[
17 lib/cond/cond.rb
18 lib/cond/dsl_definition.rb
19 lib/cond/error.rb
20 lib/cond/handler.rb
21 lib/cond/message_proc.rb
22 lib/cond/restart.rb
23 lib/cond/wrapping.rb
24 ]
33cdcd1 @quix update jumpstart
authored
25 readme_file = s.readme_file
26 end
1ca4004 @quix docs
authored
27
28 task :readme do
33cdcd1 @quix update jumpstart
authored
29 readme = File.read(readme_file)
1ca4004 @quix docs
authored
30 restarts = File.read("readmes/restarts.rb")
31 run_re = %r!\A\# !
32 update = readme.sub(%r!(= Restart Example\n)(.*?)(?=^Run)!m) {
33 $1 + "\n" +
34 restarts[%r!^(require.*?)(?=^\#)!m].
35 gsub(%r!^!m, " ")
b454912 @quix cleaned up restart example
authored
36 }.sub(%r!^(Run:\n)(.*?)(?=^\S)!m) {
1ca4004 @quix docs
authored
37 $1 + "\n" +
38 restarts.lines.grep(run_re).map { |t| t.sub(run_re, " ") }.join + "\n"
39 }
33cdcd1 @quix update jumpstart
authored
40 File.open(readme_file, "w") { |f| f.print update }
1ca4004 @quix docs
authored
41 end
42
442cf51 @quix offload tasks to jumpstart.rake
authored
43 task :prerelease => :readme
Something went wrong with that request. Please try again.