lib/riemann/dash.rb in riemann-dash-0.0.5 vs lib/riemann/dash.rb in riemann-dash-0.1.0
- old
+ new
@@ -3,16 +3,16 @@
require 'sinatra/base'
module Riemann
class Dash < Sinatra::Base
# A little dashboard sinatra application.
-
+
require 'yaml'
require 'find'
require 'erubis'
require 'sass'
-
+
def self.config
@config ||= {
:client => {},
:age_scale => 60 * 30,
:state_order => {
@@ -38,9 +38,12 @@
end
config[:controllers].each { |d| load_controllers d }
config[:helpers].each { |d| load_helpers d }
set :views, File.expand_path(config[:views])
+
+ # Fallback pub dir
+ public_dir(File.join(File.dirname(__FILE__), 'dash', 'public'))
end
# Executes the configuration file.
def self.load_config(filename)
begin