summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2014-02-04 10:33:27 -0800
committerjessib <jessib@riseup.net>2014-02-04 10:33:27 -0800
commitc7f376cdc02fe10c7e2a51c7d52475ab34451577 (patch)
tree75c52cbbd43bb55d155c301855677fcba123a2c7 /lib
parentcda7ebacf35bcc0fcf233e5a23b958ed751fb108 (diff)
parentc3cb71ca5e6d32960e4493d85799f3706ea91fe8 (diff)
Merge pull request #9 from azul/test/integration-with-travis
Test/integration with travis
Diffstat (limited to 'lib')
-rw-r--r--lib/tapicero.rb12
-rw-r--r--lib/tapicero/version.rb1
2 files changed, 6 insertions, 7 deletions
diff --git a/lib/tapicero.rb b/lib/tapicero.rb
index e2a8f38..390257d 100644
--- a/lib/tapicero.rb
+++ b/lib/tapicero.rb
@@ -1,9 +1,6 @@
unless defined? BASE_DIR
BASE_DIR = Pathname.new(__FILE__) + '../..'
end
-unless defined? TAPICERO_CONFIG
- TAPICERO_CONFIG = '/etc/leap/tapicero.yaml'
-end
module Tapicero
class <<self
@@ -18,13 +15,14 @@ module Tapicero
# defined before the models are defined.
#
require 'couchrest/changes'
- configs = ['config/default.yaml', TAPICERO_CONFIG, ARGV.grep(/\.ya?ml$/).first]
- self.config = CouchRest::Changes::Config.load(BASE_DIR, *configs)
+ self.config = CouchRest::Changes::Config.load(BASE_DIR, *CONFIGS)
self.logger = CouchRest::Changes::Config.logger
# hand flags over to CouchRest::Changes
- config.flags = FLAGS
- puts "flags: #{FLAGS}" if FLAGS.any?
+ if defined? FLAGS
+ config.flags = FLAGS
+ puts "flags: #{FLAGS}" if FLAGS.any?
+ end
#
# Load Tapicero Parts
diff --git a/lib/tapicero/version.rb b/lib/tapicero/version.rb
index ea964e3..8b7a6b0 100644
--- a/lib/tapicero/version.rb
+++ b/lib/tapicero/version.rb
@@ -2,4 +2,5 @@ module Tapicero
VERSION = "0.4.0"
REQUIRE_PATHS = ['lib']
FLAGS = []
+ CONFIGS = ['config/default.yaml', '/etc/leap/tapicero.yaml']
end