summaryrefslogtreecommitdiff
path: root/lib/tapicero.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2013-09-10 09:44:38 +0200
committerAzul <azul@riseup.net>2013-09-10 09:44:38 +0200
commit57140b80f00aab43918a3ec3276062823971dec7 (patch)
tree759de1356d0cee24e44a4229629ddaf2fc662ad0 /lib/tapicero.rb
parentc221405796270f46d8d4881183fd55fd4d977da9 (diff)
bringing over couch_changes from leap_ca including tests
Diffstat (limited to 'lib/tapicero.rb')
-rw-r--r--lib/tapicero.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/tapicero.rb b/lib/tapicero.rb
new file mode 100644
index 0000000..ee52db4
--- /dev/null
+++ b/lib/tapicero.rb
@@ -0,0 +1,19 @@
+unless defined? BASE_DIR
+ BASE_DIR = File.expand_path('../..', __FILE__)
+end
+unless defined? LEAP_CA_CONFIG
+ LEAP_CA_CONFIG = '/etc/leap/tapicero.yaml'
+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/couch_stream'
+require 'tapicero/couch_changes'