Permalink
Browse files

Documentation and Rakefile updates! Yay!

Conflicts:

	Rakefile
  • Loading branch information...
1 parent 7d3c3fd commit 49ed319210c0563b9db2e68f822153fecc46ba4b @raggi raggi committed Mar 19, 2012
Showing with 432 additions and 11 deletions.
  1. +2 −0 .gitignore
  2. +18 −11 Rakefile
  3. +412 −0 contrib/rdoc.css
View
@@ -1,8 +1,10 @@
RDOX
+ChangeLog
*.gem
lighttpd.errors
*.rbc
stage
*.tar.gz
Gemfile.lock
.rbx
+doc
View
@@ -11,12 +11,12 @@ task :deps do
reqs = dep.requirements_list
reqs = (["-v"] * reqs.size).zip(reqs).flatten
# Use system over sh, because we want to ignore errors!
- system "gem", "install", '--conservative', dep.name, *reqs
+ system Gem.ruby, "-S", "gem", "install", '--conservative', dep.name, *reqs
end
end
desc "Make an archive as .tar.gz"
-task :dist => [:chmod, :changelog, :rdoc, "SPEC"] do
+task :dist => %w[chmod ChangeLog SPEC rdoc] do
sh "git archive --format=tar --prefix=#{release}/ HEAD^{tree} >#{release}.tar"
sh "pax -waf #{release}.tar -s ':^:#{release}/:' SPEC ChangeLog doc rack.gemspec"
sh "gzip -f -9 #{release}.tar"
@@ -31,7 +31,7 @@ task :officialrelease do
sh "mv stage/#{release}.tar.gz stage/#{release}.gem ."
end
-task :officialrelease_really => ["SPEC", :dist, :gem] do
+task :officialrelease_really => %w[SPEC dist gem] do
sh "sha1sum #{release}.tar.gz #{release}.gem"
end
@@ -46,7 +46,10 @@ task :chmod do
end
desc "Generate a ChangeLog"
-task :changelog do
+task :changelog => %w[ChangeLog]
+
+file '.git/index'
+file "ChangeLog" => '.git/index' do
File.open("ChangeLog", "w") { |out|
`git log -z`.split("\0").map { |chunk|
author = chunk[/Author: (.*)/, 1].strip
@@ -63,7 +66,6 @@ task :changelog do
}
end
-
file 'lib/rack/lint.rb'
desc "Generate Rack Specification"
file "SPEC" => 'lib/rack/lint.rb' do
@@ -99,17 +101,22 @@ task :gem => ["SPEC"] do
sh "gem build rack.gemspec"
end
+task :doc => :rdoc
desc "Generate RDoc documentation"
-task :rdoc => ["SPEC"] do
+task :rdoc => %w[ChangeLog SPEC] do
sh(*%w{rdoc --line-numbers --main README.rdoc
--title 'Rack\ Documentation' --charset utf-8 -U -o doc} +
- %w{README.rdoc KNOWN-ISSUES SPEC} +
- Dir["lib/**/*.rb"])
+ %w{README.rdoc KNOWN-ISSUES SPEC ChangeLog} +
+ `git ls-files lib/\*\*/\*.rb`.strip.split)
+ cp "contrib/rdoc.css", "doc/rdoc.css"
+end
+
+task :pushdoc => %w[rdoc] do
+ sh "rsync -avz doc/ rack.rubyforge.org:/var/www/gforge-projects/rack/doc/"
end
-task :pushsite => [:rdoc] do
+task :pushsite => %w[pushdoc] do
sh "cd site && git gc"
- sh "rsync -avz doc/ chneukirchen@rack.rubyforge.org:/var/www/gforge-projects/rack/doc/"
- sh "rsync -avz site/ chneukirchen@rack.rubyforge.org:/var/www/gforge-projects/rack/"
+ sh "rsync -avz site/ rack.rubyforge.org:/var/www/gforge-projects/rack/"
sh "cd site && git push"
end
Oops, something went wrong.

0 comments on commit 49ed319

Please sign in to comment.