summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-07-11 18:06:46 +0300
committerSaku Ytti <saku@ytti.fi>2014-07-11 18:06:46 +0300
commita7b2236d3a77fd268ffa9b76ee2c04a8e8f9e348 (patch)
treea8ccc9c3771e3938a32aca7c770e43768589d0f7
parent2b7c2f06d104736789f629f58f4d82f65616f586 (diff)
support local models
if ~/.config/oxidized/model/ios.rb exists it is used, iinstead of the system-wide model
-rw-r--r--[-rwxr-xr-x]extra/syslog.rb0
-rw-r--r--lib/oxidized/manager.rb4
2 files changed, 3 insertions, 1 deletions
diff --git a/extra/syslog.rb b/extra/syslog.rb
index 7671d22..7671d22 100755..100644
--- a/extra/syslog.rb
+++ b/extra/syslog.rb
diff --git a/lib/oxidized/manager.rb b/lib/oxidized/manager.rb
index 251f0cc..b4eaecd 100644
--- a/lib/oxidized/manager.rb
+++ b/lib/oxidized/manager.rb
@@ -41,7 +41,9 @@ module Oxidized
@output.merge! method
end
def add_model _model
- _model = Manager.load Config::ModelDir, _model
+ name = _model
+ _model = Manager.load File.join(Config::Root, 'model'), name
+ _model = Manager.load Config::ModelDir, name if _model.empty?
return false if _model.empty?
@model.merge! _model
end