Practical Hpricot: CruiseControl.rb results
1 2 3 4 5 6 7 8 9 10 |
require 'hpricot' require 'open-uri' url = "http://mydomain.com/builds/myapp/#{ARGV[0]}" doc = Hpricot(open(url)) puts (doc/"div#build_details h1").first.inner_text.gsub(/^\s*/, '') (doc/"div.test-results").each do |results| puts results.inner_html end |
Grabs the current build status from CruiseControl.rb. Especially handy since our build server isn’t sending emails at the moment.