0.0
No commit activity in last 3 years
No release in over 3 years
Allows scripts and applications to check the status of your project's build.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.2.9

Runtime

>= 1.5.2
>= 1.2.0
 Project Readme

Cruise Status¶ ↑

CruiseStatus allows your Ruby scripts to check the status of your project’s build. Use this to abort check-ins when the build has failed, for example.

CruiseStatus currently supports checking builds run on cruisecontrol.rb or on runcoderun.com.

CruiseControl.rb Example:¶ ↑

To check a cruise.rb build, pass the url to the project RSS feed to CruiseStatus:

require "cruisestatus"

if CruiseStatus.new( 'http://my.cruise.com/projects.rss' ).pass?
  puts "Build passed!"
else
  abort "Build failed…Boo!"
end

RunCodeRun.com Example:¶ ↑

To check a build on runcoderun.com, simply pass the url for the json API:

require "cruisestatus"

if CruiseStatus.new( 'http://runcoderun.com/api/v1/json/tobytripp' ).pass?
  puts "Build passed!"
else
  abort "Build failed…boo!"
end

Command-line Usage:¶ ↑

The gem’s binary is cruisestatus. Pass a URL to it and cruisestatus will check the build status at that URL and return a non-zero status if any of the builds reported there have failed.

Pass a ‘-p` option to prompt the user when a build has failed. If the user enters ’y’ at the prompt, cruisestatus will return a zero status regardless of build failures.

For example:

$ cruisestatus -p http://runcoderun.com/api/v1/json/tobytripp

Build FAILURES: cruisestatus
Are you sure you want to check in? (y/n): y

$ echo $?
0

$ cruisestatus -p http://runcoderun.com/api/v1/json/tobytripp

Build FAILURES: cruisestatus
Are you sure you want to check in? (y/n): n

$ echo $?
1

You can use this to abort check-ins onto broken builds. (See the post-commit hook in github.com/tobytripp/git-pre-commit/blob/master/git-hooks/post-commit for example). As you know, if the CI build is broken, no one should be checking in new code unless they’re fixing the build. You can use cruisestatus to help keep developers honest in that regard.

Note on Patches/Pull Requests¶ ↑

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request.

Build Status¶ ↑

runcoderun.com/tobytripp/cruisestatus

TODO¶ ↑

  • Cruise.java support?

Copyright © 2010 Toby Tripp. See LICENSE for details.