A useful task for Cruisecontrol.rb

A useful CruiseControl.rb tasks that adds some extra checks to your application.

By mixing some good posts (this, this and also this) we were able to create a :cruise task that:

  • Check ruby, yaml and erb code syntax;
  • Run all rspec tests;
  • Check for code quality.

To use this task simply download ‘custom_cc.rake’ inside your app/lib/tasks folder. The next time CruiseControl.rb builds your application this task will be executed instead the standard one.

Requirements:

  • A bootstrap task (here and here)
  • Roodi 1.3.0 ( gem install roodi)
  • CruiseControl.rb of course :)

A note:
Don’t try to include the roodi gem inside your application; that was one of our first mistakes we did as Roodi requires facets and this gem seems to break things up inside Rails. That’s why we decided to call this quality checker using the Kernel.exec method.