continuous4r
Get Version
0.0.3
What is it ?
continuous4r is a continuous integration tool for Ruby on Rails. With it, you can aggregate reports of the best analysis, quality, and tests tools for Ruby on Rails. By just launching one Rake task and customizing a XML file describing your project, continuous4r builds for you an entire website in a Maven-like form/design.
Requirements
- RubyGems
- rails (erb)
- hpricot
- XmlElements
Installing
[sudo] gem install continuous4r
Release notes for 0.0.3 version
- Major bug fixes on rcov, ZenTest, tests, and changelog builders.
- Various bug fixes on gems and tasks management.
- Tests made on other projects than mine !!! (Apologies, everyone).
- Introduction of reporting quality indicators (will be completed for 0.0.4).
- The release of 0.0.4 will be here very shortly, this release is here for build capability.
Release notes for 0.0.2 version
- Full Windows support, and no need for the user to define the HOME environment variable.
- Only quality and code-related tools kept (goodbye Capistrano, httperf, railroad…).
- No need to create the project file from scratch now, type ‘rake continuous4r:init’ in your Rails project directory, and there you go.
- Full extensibility : the tasks are now defined in [task]_builder.rb files, and instanciated dynamically.
- Full refactoring (Ruby and HTML/RHTML parts).
- Git support added.
- HTTP Proxy support (for those who are constrained by a proxy).
- No need to have eruby installed, now uses the Rails erb compiler.
- HTML global template fixes.
- No need to define or configure your tasks anymore.
The basics
Preparing your project
In order to have access to continuous4r Rake tasks, you must open your Rakefile, and add to the end :
require 'continuous4r'
Initializing your project
In order to initialize your project, you must create your continuous4r-project.xml file.
Just type this command and the file will be created :
rake continuous4r:init
Here is the content of this file, you can customize it to suite your needs :
<project name="FIXME project name" auto-install-gems="true" auto-install-tools="true" ignore-tests-failures="true"> <description>FIXME project description</description> <url>FIXME project URL</url> <logo>FIXME Logo URL</logo> <company> <denomination>FIXME your company name here</denomination> <url>FIXME your company website URL here</url> <logo>FIXME your company logo URL here</logo> </company> <members> <member id="FIXME user login" name="FIXME user name" email="FIXME user email" roles="FIXME user roles, separated by commas" company="FIXME company/organisation name"/> </members> <bugtracker> <tracker_type>[Trac|Bugzilla|Mantis|etc...]</tracker_type> <tracker_url>BUGTRACKER_URL</tracker_url> <tracker_account_create>BUGTRACKER_URL_ACCOUNT_CREATION</tracker_account_create> <search>BUGTRACKER_URL_SEARCH_TICKETS</search> <url>BUGTRACKER_URL_TICKETS_LIST</url> <add>BUGTRACKER_URL_TICKET_ADD</add> </bugtracker> <!-- Gems mandatory for your project --> <gems repository="http://gems.rubyforge.org/gems/"> <gem name="GEM_NAME" version="GEM_VERSION"/> </gems> </project>
Building your project
When your project file is suitable, type :
rake continuous4r:build
When the build is finished, you can find your site in the RAILS_ROOT/tmp/continuous4r directory.
Features
Proxy configuration
If you are behind a HTTP proxy within your company, you can configure it with a simple YAML file.
Create a file named proxy.yml within your USER_HOME/.continuous4r directory, with the following content :
proxy: server: my.proxy.server port: my_port login: my_login password: my_password
When you will run the build task, if there is a need for continuous4r to find something on the internet (via Rubygems), it will automatically use this configuration.
CruiseControl.rb integration
If you heard about Continuous Integration, and are a fan of CruiseControl.rb, just customize your project to build the ‘continuous4r:build’ Rake task, and a ‘continuous4r’ artifact will appear on your build page.
Running tests
By default the behaviour of continuous4r is to ignore the fact that there are failures in your tests (because the failures are noticed within the tests report).
If you want continuous4r to stop on tests failures, then you must set the “ignore-tests-failures” flag to false in your project file.
Tasks
continuous4r built-in tasks are the core of the gem. They produce reports with some of the best code-related tools for Ruby on Rails. These tasks are described below :
dcov
Dcov task produces a report related to the coverage of your Ruby documentation (rdoc). If there is a class, a module or a method which is not documented, this task finds it and reports it.
Screenshot :
rcov
Rcov is a tool which produces a report for the coverage of your Ruby code against you tests.
Screenshot :
rdoc
Produces your project documentation.
stats
Produces what you get if you run ‘rake stats’, but in HTML format.
changelog
Produces a HTML report of your code changes in your favorite source content manager. Git and Subversion are supported.
Screenshot :
flog
Flog is a tool which measures the complexity of your Ruby code.
Screenshot :
xdoclet
A task which transforms your Ruby files in HTML format with syntax highlighting support. This task is used via links in other tasks (look flog screenshot for example).
Screenshot :
flay
Flay task finds duplicates in your Ruby code.
Screenshot :
reek
Reek is code smell detector for Ruby. If there is something bad in your code, it tells you.
Screenshot :
roodi
Roodi parses your Ruby code and warns you about design issues.
Screenshot :
saikuro
Saikuro analyzes the cyclomatic complexity of your Ruby code.
Screenshot :
tests
Task to run your tests and make a report with details (type, success/failure, result).
Screenshot :
zentest
ZenTest is a test tool. It runs a Ruby file against its test file, and generates a convention-delta report if your tests are not good enough.
Screenshot :
Help needed
This version 0.0.2 has many improvements, but is still a pre-RC version of continuous4r. I’m planning on orienting the gem to collect some statistics about the tasks, and make a global quality report with graphs.
I’m searching for volunteers to test, or work on this tool. With a more substancial amount of quality and work, this tool will be really great.
License
This code is free to use under the terms of the MIT license.
Contact
Comments are welcome. Send an email to Vincent Dubois,
or post a message on the forum.
Vincent Dubois, 3rd March 2009
Theme extended from Paul Battley












