spec/lib/jspec.growl.js
function(msg, options) {
      options = options || {}
      var args = ['growlnotify', '-m', msg]
      if (!this.binVersion()) throw new Error('growlnotify executable is required')
      if (image = options.image) {
        var flag, ext = this.extname(image)
        flag = flag || ext == 'icns' && 'iconpath'
        flag = flag || /^[A-Z]/.test(image) && 'appIcon'
        flag = flag || /^png|gif|jpe?g$/.test(ext) && 'image'
        flag = flag || ext && (image = ext) && 'icon'
        flag = flag || 'icon'
        args.push('--' + flag, image)
      }
      if (options.sticky) args.push('--sticky')
      if (options.name) args.push('--name', options.name)
      if (options.title) args.push(options.title)
      this.exec.apply(this, args)
    }
function(msg, options) {
      options = options || {}
      var args = ['growlnotify', '-m', msg]
      if (!this.binVersion()) throw new Error('growlnotify executable is required')
      if (image = options.image) {
        var flag, ext = this.extname(image)
        flag = flag || ext == 'icns' && 'iconpath'
        flag = flag || /^[A-Z]/.test(image) && 'appIcon'
        flag = flag || /^png|gif|jpe?g$/.test(ext) && 'image'
        flag = flag || ext && (image = ext) && 'icon'
        flag = flag || 'icon'
        args.push('--' + flag, image)
      }
      if (options.sticky) args.push('--sticky')
      if (options.name) args.push('--name', options.name)
      if (options.title) args.push(options.title)
      this.exec.apply(this, args)
    }
function ( msg , options ) { options = options || { } var args = [ 'growlnotify' , '-m' , msg ] if ( ! this . binVersion ( ) ) throw new Error ( 'growlnotify executable is required' ) if ( image = options . image ) { var flag , ext = this . extname ( image ) flag = flag || ext == 'icns' && 'iconpath' flag = flag || / ^[A-Z] / . test ( image ) && 'appIcon' flag = flag || / ^png|gif|jpe?g$ / . test ( ext ) && 'image' flag = flag || ext && ( image = ext ) && 'icon' flag = flag || 'icon' args . push ( '--' + flag , image ) } if ( options . sticky ) args . push ( '--sticky' ) if ( options . name ) args . push ( '--name' , options . name ) if ( options . title ) args . push ( options . title ) this . exec . apply ( this , args ) }
Send growl notification _msg_ with _options_.

Options:

- title   Notification title
- sticky  Make the notification stick (defaults to false)
- name    Application name (defaults to growlnotify)
- image
- path to an icon sets --iconpath
- path to an image sets --image
- capitalized word sets --appIcon
- filename uses extname as --icon
- otherwise treated as --icon

Examples:

Growl.notify('New email')
Growl.notify('5 new emails', { title: 'Thunderbird' })

@param {string} msg
@param {options} hash
@api public
Send growl notification _msg_ with _options_ .