Module: Autotest::Growl::Remote

Defined in:
lib/autotest-growl-remote.rb,
lib/autotest/growl/remote.rb

Constant Summary collapse

VERSION =
'0.1.0'
@@remote_host =
nil
@@remote_password =
nil
@@one_notification_per_run =
false
@@clear_terminal =
false
@@hide_label =
false
@@show_modified_files =
false

Class Method Summary collapse

Class Method Details

.clear_terminal=(boolean) ⇒ Object

Whether to clear the terminal before running tests (default) or not.



49
50
51
# File 'lib/autotest/growl/remote.rb', line 49

def self.clear_terminal=(boolean)
  @@clear_terminal = boolean
end

.growl(title, message, icon, priority = 0, stick = "") ⇒ Object

Display a message through Growl.



64
65
66
67
68
69
# File 'lib/autotest/growl/remote.rb', line 64

def self.growl(title, message, icon, priority=0, stick="")
  raise "Remote host not configured" if @@remote_host.nil?

  g = ::Growl.new( @@remote_host, "autotest", [ "autotest Notification"], nil, @@remote_password )
  g.notify "autotest Notification", title, message, priority, stick
end

.hide_label=(boolean) ⇒ Object

Whether to display the label (default) or not.



54
55
56
# File 'lib/autotest/growl/remote.rb', line 54

def self.hide_label=(boolean)
  @@hide_label = boolean
end

.one_notification_per_run=(boolean) ⇒ Object

Whether to limit the number of notifications per run to one or not (default).



44
45
46
# File 'lib/autotest/growl/remote.rb', line 44

def self.one_notification_per_run=(boolean)
  @@one_notification_per_run = boolean
end

.remote_host=(hostname_or_ip) ⇒ Object

Hostname or IP address to send the notifications to



34
35
36
# File 'lib/autotest/growl/remote.rb', line 34

def self.remote_host=(hostname_or_ip)
  @@remote_host = hostname_or_ip
end

.remote_password=(password) ⇒ Object

Growl password



39
40
41
# File 'lib/autotest/growl/remote.rb', line 39

def self.remote_password=( password )
  @@remote_password = password
end

.show_modified_files=(boolean) ⇒ Object

Whether to display the modified files or not (default).



59
60
61
# File 'lib/autotest/growl/remote.rb', line 59

def self.show_modified_files=(boolean)
  @@show_modified_files = boolean
end