-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboot.rb
More file actions
30 lines (24 loc) · 815 Bytes
/
boot.rb
File metadata and controls
30 lines (24 loc) · 815 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
period_dir = File.expand_path('.')
$LOAD_PATH.unshift(period_dir) unless $LOAD_PATH.include?(period_dir)
begin
require File.expand_path(".bundle/environment", __FILE__)
rescue LoadError
require "rubygems"
require "bundler"
Bundler.setup(:default)
end
Bundler.require
require 'yaml'
database = YAML.load_file(File.expand_path('config/database.yml'))
database = database['database']
require 'config/environment'
Configuration.config do |config|
config.logger_filename = "logs/rubycasts.log"
config.load_paths = %w(. app/models app/helpers app/views app/lib app/requests)
config.datamapper(:default, {
:adapter => database['adapter'],
:host => database['host'],
:database => database['name'],
:username => database['username'],
:password => database['password']})
end