Class: BlinkyMonitor::CruiseControlServer
- Inherits:
-
Object
- Object
- BlinkyMonitor::CruiseControlServer
- Defined in:
- lib/blinky_monitor/cruise_control_server.rb
Instance Method Summary collapse
-
#initialize(url) ⇒ CruiseControlServer
constructor
A new instance of CruiseControlServer.
- #status ⇒ Object
Constructor Details
#initialize(url) ⇒ CruiseControlServer
Returns a new instance of CruiseControlServer.
5 6 7 |
# File 'lib/blinky_monitor/cruise_control_server.rb', line 5 def initialize url @url = url end |
Instance Method Details
#status ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/blinky_monitor/cruise_control_server.rb', line 9 def status xml = open("#{@url}/cc.xml").read status = :success if xml.include? 'lastBuildStatus="Success"' status = :failure if xml.include? 'lastBuildStatus="Failure"' status = :building if xml.include? 'activity="Building"' status end |