lib/riemann/dash.rb in riemann-dash-0.0.3 vs lib/riemann/dash.rb in riemann-dash-0.0.4
- old
+ new
@@ -1,5 +1,6 @@
+require 'rubygems'
require 'riemann/client'
require 'sinatra/base'
module Riemann
class Dash < Sinatra::Base
@@ -10,20 +11,20 @@
require 'erubis'
require 'sass'
def self.config
@config ||= {
- client: {},
- age_scale: 60 * 30,
- state_order: {
+ :client => {},
+ :age_scale => 60 * 30,
+ :state_order => {
'critical' => 3,
'warning' => 2,
'ok' => 1
},
- strftime: '%H:%M:%S',
- controllers: [File.join(File.dirname(__FILE__), 'dash', 'controller')],
- helpers: [File.join(File.dirname(__FILE__), 'dash', 'helper')],
- views: File.join(File.dirname(__FILE__), 'dash', 'views')
+ :strftime => '%H:%M:%S',
+ :controllers => [File.join(File.dirname(__FILE__), 'dash', 'controller')],
+ :helpers => [File.join(File.dirname(__FILE__), 'dash', 'helper')],
+ :views => File.join(File.dirname(__FILE__), 'dash', 'views')
}
end
def self.client
@client ||= Riemann::Client.new(config[:client])