From 4177623a7a5e7967514a0d92095e0dcb32896026 Mon Sep 17 00:00:00 2001 From: John Tajima Date: Wed, 30 Oct 2013 19:57:07 -0400 Subject: require config/settings.rb if exists --- lib/dashing.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/dashing.rb b/lib/dashing.rb index f1b18fc..a8e9f33 100644 --- a/lib/dashing.rb +++ b/lib/dashing.rb @@ -8,7 +8,6 @@ require 'json' require 'yaml' SCHEDULER = Rufus::Scheduler.start_new -KEYS = {} set :root, Dir.pwd @@ -155,6 +154,11 @@ def tilt_html_engines end end +settings_file = File.join(settings.root, 'config/settings.rb') +if (File.exists?(settings_file)) + require settings_file +end + Dir[File.join(settings.root, 'lib', '**', '*.rb')].each {|file| require file } {}.to_json # Forces your json codec to initialize (in the event that it is lazily loaded). Does this before job threads start. -- cgit v1.2.3