Class: CityWatch::Watcher

Inherits:
Object
  • Object
show all
Defined in:
lib/city_watch/watcher.rb

Class Method Summary collapse

Class Method Details

.failure?Boolean

Returns:

  • (Boolean)


16
17
18
19
20
# File 'lib/city_watch/watcher.rb', line 16

def failure?
  page    = CityWatch::Page.new
  monitor = CityWatch::BuildMonitor.new
  monitor.failure?(page.build_id)
end

.startObject



6
7
8
9
10
11
12
13
14
# File 'lib/city_watch/watcher.rb', line 6

def start
  loop do
    if failure?
      growl            
      sleep 10 while failure?
    end
    sleep 10
  end
end