#!/usr/bin/env ruby require 'matrixci' scope = ARGV[0] if ["", "all"].include?(scope) MatrixCi::Project.all.each do |project| project.all_recent_builds.each do |build| puts build.to_s end end elsif ["show", "cancel", "retry"].include?(scope) buildid = ARGV[1] MatrixCi::Project.send(scope, buildid) end