-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathboot.rb
More file actions
30 lines (24 loc) · 670 Bytes
/
Copy pathboot.rb
File metadata and controls
30 lines (24 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
begin
require 'bundler'
Bundler.setup
rescue LoadError
$stderr.write "Bundler not found. Run `gem install bundler` to install it.\n"
exit(1)
end
# Rack environment configuration.
RACK_ENV = ENV["RACK_ENV"] || 'development'
# Application paths.
ROOT_PATH = File.dirname(__FILE__)
APPS_PATH = File.join(ROOT_PATH, 'apps')
# Configure load path.
[ File.join(ROOT_PATH, 'lib'), APPS_PATH ].each do |path|
$LOAD_PATH.unshift(path)
end
# The app foundation.
require 'desant'
# Load all the configuration files
Dir[File.expand_path('../config/*.rb', __FILE__)].each do |conf|
require conf
end
# Load core and all the applications.
Desant.load_apps(APPS_PATH)