summaryrefslogtreecommitdiff
path: root/lib/oxidized/source/sql.rb
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-02-25 12:59:24 +0200
committerSaku Ytti <saku@ytti.fi>2014-02-25 12:59:24 +0200
commit54275a0576b05813e78aa7707111db3411602048 (patch)
tree5cb0c8c3b00839310e40de08de8502771ebd8eff /lib/oxidized/source/sql.rb
parent596607c8bad948f605fdece2829e24eac3411279 (diff)
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
Diffstat (limited to 'lib/oxidized/source/sql.rb')
-rw-r--r--lib/oxidized/source/sql.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/oxidized/source/sql.rb b/lib/oxidized/source/sql.rb
index c563e15..385f632 100644
--- a/lib/oxidized/source/sql.rb
+++ b/lib/oxidized/source/sql.rb
@@ -18,8 +18,8 @@ class SQL < Source
:model => 'rancid',
}
}
+ CFG.save
end
- CFG.save
end
def load