lib/configliere/config_file.rb in configliere-0.4.12 vs lib/configliere/config_file.rb in configliere-0.4.13
- old
+ new
@@ -1,10 +1,12 @@
+require 'pathname'
+
module Configliere
# Default locations where config files live
DEFAULT_CONFIG_LOCATION = {
machine: ->(scope){ Pathname('/etc').join(scope) },
user: ->(scope){ Pathname(ENV['HOME'] || '/').join(".#{scope}") },
- app: ->(scope){ app_dir = '/' ; Pathname(Dir.pwd).ascend{ |path| app_dir = path.join('config') if path.join('config').exist? } ; app_dir }
+ app: ->(scope){ app_dir = Pathname('/') ; Pathname(Dir.pwd).ascend{ |path| app_dir = path.join('config') if path.join('config').exist? } ; app_dir }
} unless defined?(DEFAULT_CONFIG_LOCATION)
#
# ConfigFile -- load configuration from a simple YAML file
#