Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (16 sloc) 905 Bytes
$:.unshift File.dirname(__FILE__) + '/../lib'
require 'growl'
Growl.bin_path = ARGV[0] unless ARGV.empty?
puts "using growlnotify located at #{Growl.bin_path}" unless ARGV.empty?
puts "growlnotify version #{Growl.version} installed"
imagepath = File.dirname(__FILE__) + '/../spec/fixtures/image.png'
iconpath = File.dirname(__FILE__) + '/../spec/fixtures/icon.icns'
include Growl
notify_info 'New email received', :sticky => true, :title => 'Some app'; sleep 0.2
notify_ok 'Deployment complete' ; sleep 0.2
notify_error 'Deployment failure' ; sleep 0.2
notify 'Safari icon', :icon => :Safari ; sleep 0.2
notify 'Jpeg icon', :icon => :jpeg ; sleep 0.2
notify 'Image icon', :icon => imagepath ; sleep 0.2
notify 'Icns icon', :icon => iconpath ; sleep 0.2
notify 'Path extname icon', :icon => 'foo.rb' ; sleep 0.2