lib/herbert/loader.rb in herbert-0.0.2 vs lib/herbert/loader.rb in herbert-0.0.3
- old
+ new
@@ -1,11 +1,9 @@
require 'logger'
require 'mongo'
require 'memcache'
-require 'sinatra/base'
require 'kwalify'
-require 'active_support'
$:.unshift(File.dirname(__FILE__))
require 'version'
module Herbert
::Logger.class_eval do
@@ -32,13 +30,12 @@
module Loader
$HERBERT_PATH = File.dirname(__FILE__)
log.h_info("Here comes Herbert (v#{Herbert::VERSION}). He's a berserker!")
# because order matters
%w{Utils Jsonify Configurator Error Services Ajaxify AppLogger Log Resource}.each {|file|
- require $HERBERT_PATH + "/#{file}.rb"
+ require file
}
-
# Sets up some default settings and loads all components
def self.registered(app)
# Set some default
# TODO to external file?
app.set :log_requests, :db unless app.respond_to? :log_requests
@@ -64,8 +61,9 @@
end
app.register Herbert::Ajaxify
app.helpers Sinatra::Log
app.register Sinatra::Log::Extension
app.register Herbert::ResourceLoader if app.respond_to?(:resources) && app.resources
+ app.register Herbert::Utils::Helpers
end
end
end
\ No newline at end of file