Rails Documentation Builder
It always frustrates me when I’m working with an older version of Rails that the only documentation available at api.rubyonrails.org is for the latest version of Rails. Sure, you could go hunting and picking through
~/.rvm/gems/ruby-1.X.X-pXXX@XXX/gems/activeXXX-X.X.X/lib and find the documentation in the source, but that would make me a hacker and I would prefer to remain a humble bard and not some anarchist neckbearded malcontent. So, in the grand tradition of Byron and Keates, I created this script to use SDoc to generate documentation for every version of Rails.
The documentation generated by this script is available at rails.documentation.codyrobbins.com.
To build all the documentation, run
It takes a long time.
A few environment variables control some build options. To set them when invoking the script, just do
GOOGLE_ANALYTICS=12345 GZIP=true zsh build.zsh
GOOGLE_ANALYTICS to a Google Analytics tracking ID to have the Google Analytics tracking code added to every page in the documentation.
.gz extension. This is useful if you’re going to serve the files with a
Content-Encoding: gzip header.
To send patches, please fork on GitHub and submit a pull request.
© 2011 Cody Robbins. See LICENSE for details.