blob: 1063b856400d104b780ca24d76d7861b9edc666d (
plain)
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
|
unless defined? BASE_DIR
BASE_DIR = Pathname.new(__FILE__) + '../..'
end
module Tapicero
class <<self
attr_accessor :logger
attr_accessor :config
end
#
# Load Config
# this must come first, because CouchRest needs the connection
# defined before the models are defined.
#
require 'couchrest/changes'
self.config = CouchRest::Changes::Config.load(BASE_DIR, *CONFIGS)
self.logger = CouchRest::Changes::Config.logger
# hand flags over to CouchRest::Changes
if defined? FLAGS
config.flags = FLAGS
puts "flags: #{FLAGS}" if FLAGS.any?
end
end
|