lib/lorj_config.rb in lorj-1.0.0 vs lib/lorj_config.rb in lorj-1.0.1

- old
+ new

@@ -116,12 +116,10 @@ config_layers << define_local_layer # runtime Config layer config_layers << define_runtime_layer - Lorj.defaults.load # Loading global application defaults - if PrcLib.data_path.nil? PrcLib.fatal(1, 'Internal PrcLib.data_path was not set.') end initialize_local(config_layers[1][:config], config_name) @@ -167,9 +165,10 @@ end def initialize_local_filename(config_name = nil) config_default_name = 'config.yaml' + config_name = nil unless config_name.is_a?(String) if config_name if File.dirname(config_name) == '.' config_name = File.join(PrcLib.data_path, config_name) end config_name = File.expand_path(config_name)