lib/odania_ops/helper/config.rb in odania_ops-0.0.5 vs lib/odania_ops/helper/config.rb in odania_ops-0.0.6

- old
+ new

@@ -8,10 +8,13 @@ config_file = retrieve_config_folder '/etc' rescue RuntimeError config_file = retrieve_config_folder folder end + $config = {} + return unless File.exists? config_file + $logger.debug "Loading config file #{config_file}" $config = YAML.load_file(config_file) $logger.debug $config.inspect end @@ -27,11 +30,12 @@ break if next_folder.eql?(folder) folder = next_folder end - raise "No configuration found! Looking in #{start_folder} and above." + $logger.error "No configuration found! Looking in #{start_folder} and above." + '' end end end end -end \ No newline at end of file +end