hacking with code and life

My name is Diego Giorgini. I like building things, learning new technologies and
exploring new ideas.
I study Computer Science at University of Padua (Italy) and UC Irvine (CA).
I love to get my hands dirty with #security #lifehacking #coding #web #ruby and #startups ...

I am @ogeidix on Twitter and Github

Documenting Rails: two gems released

One of the saddest day for a developer is when a project is ending and... the manager asks about its documentation!
I bet that many projects are neverending and the developers keep coding just because they are scared of that word: documentation

That day comes also to me :) so I looked for a way to automate it.

How to document a Rails project

While ruby has great documentation tools and standard as rdoc, yardoc, rubydoc I didn't find a way to generate the documentation of a Rails project which is of course ruby code, but it also has many specific properties and in general doesn't fit very well in the standard documentation template.

So now you can use yard-rails-plugin to have an automatic semi-human documentation for your rails project.

The plugin is just in the beginning of its development and there are really a lot of features that can be added. (listing models, list active-record attributes...)
If you want to contribute join me on the repo! https://github.com/ogeidix/yard-rails-plugin

At the moment it supports:

Going further: RSpec

The ruby community says "tests are our documentation" and then renamed tests in specifications. To truly realize this you can add to your project: yard-spec-plugin This plugin adds to each class and method the documentation auto generated from the specs of your project.

yard-spec-plugin supports:

Last but not least: Cucumber

To include Cucumber features in your documentation take a look at Yard-Cucumber

Tweet this