lib/adhearsion/initializer.rb in adhearsion-3.0.0.beta1 vs lib/adhearsion/initializer.rb in adhearsion-3.0.0.beta2
- old
+ new
@@ -1,7 +1,8 @@
# encoding: utf-8
+require 'adhearsion/application'
require 'adhearsion/linux_proc_name'
require 'adhearsion/rayo/initializer'
require 'adhearsion/http_server'
require 'rbconfig'
@@ -26,10 +27,11 @@
def start
catch :boot_aborted do
configure_plugins
load_lib_folder
+ load_app_file
load_config_file
load_events_file
load_routes_file
Adhearsion.statistics
@@ -134,9 +136,14 @@
Dir.glob(rbfiles).each do |file|
require "#{lib_folder}/#{file}"
end
end
true
+ end
+
+ def load_app_file
+ path = "#{Adhearsion.config.root}/config/app.rb"
+ load path if File.exists?(path)
end
def load_config_file
load "#{Adhearsion.config.root}/config/adhearsion.rb"
end