Created
June 24, 2009 07:21
Revisions
-
matthewtodd revised this gist
Jun 24, 2009 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,8 +4,8 @@ class DeployNotifier include Appscript def initialize(*names) @ichat = app('iChat') @accounts = names.map { |name| bonjour_account(name) } end def spam(message) @@ -15,11 +15,11 @@ def spam(message) private def bonjour_account(name) @ichat.services['Bonjour'].accounts[name] end def send_spam(message, account) @ichat.send_(message, :to => @account) rescue $stderr.puts "Error spamming #{account}." end -
matthewtodd renamed this gist
Jun 24, 2009 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
matthewtodd created this gist
Jun 24, 2009 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ require 'appscript' class DeployNotifier include Appscript def initialize(*names) @application = app('iChat') @accounts = names.map { |name| bonjour_account(name) } end def spam(message) @accounts.each { |account| send_spam(message, account) } end private def bonjour_account(name) @application.services['Bonjour'].accounts[name] end def send_spam(message, account) @application.send_(message, :to => @account) rescue $stderr.puts "Error spamming #{account}." end end