Integration plugin

Plugin details

Integration is a Ruby on Rails plugin that provides a set of tasks to automate all steps of a synchronous continuous integration process, that is, continuous integration without a server such as CruiseControl. Why? Because that's the way we like it!

Websitehttp://integration.rubyforge.org/ Repositorysvn://rubyforge.org/var/svn/integration Author Marcos Tapajós, Vinícius Teles Tags task, integration LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install svn://rubyforge.org/var/svn/integration

The integration process is composed of several steps that are explained ahead. It's possible to skip one or more steps and add other steps of your own. This will be demonstrated shortly. The complete set of steps are:

task svn:status:check 


Check if all local files are subversion'ed and if no local files have been removed using only rm (file removal should always use svn remove instead).

task log:clear 


Remove log files.

task tmp:clear 


Remove temporary files.

task backup:local 


Backup files locally. This is done before svn update to create a recovery point should you have problems during svn update. If a file merge creates undesirable effects on the software, you can recover from the backup file. Backup file names have a timestamp. By default, the last 30 backups are kept. You may change this number as you'll see shortly. This task won't work on Windows because it uses tar. So, if you're using Windows you'll have to write your own version of this task or just stop using Windows. We highly recommend the later.

task svn:update 


Update files using svn update.

task db:migrate


Execute any new database migration created by other team members since the last integration.

test:units 


Run all unit tests.

test:functionals 


Run all functional tests.

test:integration 


Run all integration tests.

spec:lib 


Run all lib specs.

spec:models 


Run all model specs.

spec:helpers 


Run all helper specs.

spec:controllers 


Run all controller specs.

spec:views 


Run all view specs.

test:rcov:units 


Run coverage analysis of the unit tests.

test:rcov:units:verify 


Check if unit tests cover 100% of the application code.

test:rcov:functionals 


Run coverage analysis of the functional tests.

test:rcov:functionals:verify 


Check if functional tests cover 100% of the application code.

spec:rcov 


Run coverage analysis of the specs.

spec:rcov:verify 


Check if specs cover 100% of the application code.

test:plugins:selected 


Run tests on selected plugins. You might want to always run the tests of plugins you created, for example, while ignoring the tests of third party plugins. We'll show below how you can specify the plugins you want to test.

spec:plugins:selected 


Same as previous step, but with specs, instead of tests.

test:selenium:server:start 


If you use Selenium to test your application, as you certainly should, you'll need to make sure the webserver is up and running before running Selenium tests. That's what this task does.

test_acceptance


Run all Selenium tests.

test:selenium:server:stop


Stop the webserver.

svn:commit


Commit your changes. If any of the previous tasks break, because one test failed, for instance, the script won't commit. Actually this task runs only if every checking done before work well.

Using this almost paranoid sequence of steps it will be hard to check in bad code in your repository, which is good, very good. The idea is that you should treat your repository as a sacred place, where only good code should ever enter.

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (2 older versions) | Last edited by: hardway, 8 months ago