summaryrefslogtreecommitdiff
path: root/lib/tapicero.rb
blob: fd660302217c793217ecf184d44255ad653609d3 (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
28
unless defined? BASE_DIR
  BASE_DIR = File.expand_path('../..', __FILE__)
end
unless defined? LEAP_CA_CONFIG
  LEAP_CA_CONFIG = '/etc/leap/tapicero.yaml'
end

module Tapicero
  class <<self
    attr_accessor :logger
  end
end


#
# Load Config
# this must come first, because CouchRest needs the connection defined before the models are defined.
#
require 'tapicero/config'
Tapicero::Config.load(BASE_DIR, 'config/default.yaml', LEAP_CA_CONFIG, ARGV.grep(/\.ya?ml$/).first)

#
# Load Tapicero
#
# require 'tapicero/json_stream'
# require 'tapicero/couch_stream'
require 'tapicero/couch_changes'
require 'tapicero/user_database'