summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Tajima <john@shopify.com>2013-10-30 19:57:07 -0400
committerJohn Tajima <john@shopify.com>2013-10-30 19:57:07 -0400
commit4177623a7a5e7967514a0d92095e0dcb32896026 (patch)
tree90e060974dbd4ef156f6848cefd20c9585d6ad79 /lib
parent7ca9e828423d6e19a9b85fc3dbc8f5d8696e937e (diff)
require config/settings.rb if exists
Diffstat (limited to 'lib')
-rw-r--r--lib/dashing.rb6
1 files changed, 5 insertions, 1 deletions
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.