From 54275a0576b05813e78aa7707111db3411602048 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Tue, 25 Feb 2014 12:59:24 +0200 Subject: Fix crashes on missing config We now merge user config with bootstrap config ensuring all configuratio options are set even if not in configuratatin. Allowing us to add new configuration options, without needing for users to touch their existing configuration. All default values are still written to user config when ever CFG.save is called, which means when you change your output/input/source models and configuration is missing, instead of just adding the configuration needed for that particular module, it'll save full config to file. Don't really think that is a bug, but might be something to fix later on with maybe parameter to 'save'. Which would load user config, merge it with 'save' argument level and save user config. But unless someone is bothered by it, I won't do it. This commit fixes #1 --- lib/oxidized/source/csv.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized/source/csv.rb') diff --git a/lib/oxidized/source/csv.rb b/lib/oxidized/source/csv.rb index 6b08b18..cf73fc8 100644 --- a/lib/oxidized/source/csv.rb +++ b/lib/oxidized/source/csv.rb @@ -15,8 +15,8 @@ class CSV < Source :model => 1, } } + CFG.save end - CFG.save end def load -- cgit v1.2.1