Module: BlinkyMonitor

Defined in:
lib/blinky_monitor.rb,
lib/blinky_monitor/monitor.rb,
lib/blinky_monitor/jenkins_server.rb,
lib/blinky_monitor/cruise_control_server.rb

Defined Under Namespace

Classes: CruiseControlServer, JenkinsServer, Monitor

Class Method Summary collapse

Class Method Details

.run(file) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/blinky_monitor.rb', line 8

def self.run file
  config = YAML.load_file file
  server_class = BlinkyMonitor.const_get "#{config['server'].split('_').map(&:capitalize).join}Server"
  server = server_class.new config['url']
  blinky = Blinky.new
  
  Monitor.new(server, blinky).run
end