examples/travis.rb in chicanery-0.0.4 vs examples/travis.rb in chicanery-0.0.5

- old
+ new

@@ -1,26 +1,41 @@ require 'chicanery/cctray' +require 'chicanery/git' +include Chicanery::Git + +git_repo 'chicanery', '.', remotes: { + github: { url: 'git://github.com/markryall/chicanery.git' } +} + server Chicanery::Cctray.new 'travis', 'https://api.travis-ci.org/repositories/markryall/chicanery/cc.xml' +def growlnotify message + `growlnotify -t "some new chicanery ..." --image ~/icons/chicanery.png -m \"#{message}\"` +end + +when_commit do |repo, commit, previous| + growlnotify "commit #{previous}..#{commit} detected in repo #{repo}" +end + when_started do |job_name, job| - `afplay ~/build_sounds/startup.mp3` - puts "job #{job_name} has started" + growlnotify "job #{job_name} has started" + `afplay ~/build_sounds/ticktock.mp3` end when_succeeded do |job_name, job| - puts "job #{job_name} #{job[:last_label]} has succeeded" + growlnotify "job #{job_name} #{job[:last_label]} has succeeded" end when_failed do |job_name, job| - puts "job #{job_name} #{job[:last_label]} has failed" + growlnotify "job #{job_name} #{job[:last_label]} has failed" end when_broken do |job_name, job| + growlnotify "job #{job_name} is broken" `afplay ~/build_sounds/ambulance.mp3` - puts "job #{job_name} is broken" end when_fixed do |job_name, job| + growlnotify "job #{job_name} is fixed" `afplay ~/build_sounds/applause.mp3` - puts "job #{job_name} is fixed" end \ No newline at end of file