diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tapicero.rb | 12 | ||||
-rw-r--r-- | lib/tapicero/version.rb | 1 |
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 |