Sha256: ca6836a22350c7234f1dd74254827b72fb06f5390b3ebfa9254cba3a07145a75

Contents?: true

Size: 1.17 KB

Versions: 2

Compression:

Stored size: 1.17 KB

Contents

require 'chicanery/cctray'
require 'chicanery/git'

include Chicanery::Git

git_repo 'chicanery', '.', branches: [:master], 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_run do |state|
  puts state.has_failure? ? "something is wrong" : "all builds are fine"
end

when_commit do |repo, commit, previous|
  growlnotify "commit #{previous}..#{commit} detected in repo #{repo}"
end

when_started do |job_name, job|
  growlnotify "job #{job_name} has started"
  `afplay ~/build_sounds/ticktock.mp3`
end

when_succeeded do |job_name, job|
  growlnotify "job #{job_name} #{job[:last_label]} has succeeded"
end

when_failed do |job_name, job|
  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`
end

when_fixed do |job_name, job|
  growlnotify "job #{job_name} is fixed"
  `afplay ~/build_sounds/applause.mp3`
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chicanery-0.0.7 examples/chicanery.rb
chicanery-0.0.6 examples/chicanery.rb