diff options
author | florian <florian@debian-Florian> | 2015-04-24 09:57:15 +0200 |
---|---|---|
committer | root <florian.doublet@hotmail.fr> | 2015-06-03 11:01:13 +0200 |
commit | fae1a8e189c1b2fbc6b7463081c682946a4d3ef3 (patch) | |
tree | d9b991c9187495cf3967d7fee1b2e02c680c068f /lib/oxidized/nodes.rb | |
parent | eb753e2d8c19bd99ea36d8b0f492aaff5bb996bf (diff) |
add feature about versions and diffs for oxidized-web
Diffstat (limited to 'lib/oxidized/nodes.rb')
-rw-r--r-- | lib/oxidized/nodes.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/oxidized/nodes.rb b/lib/oxidized/nodes.rb index cb2fbc5..d25fbe7 100644 --- a/lib/oxidized/nodes.rb +++ b/lib/oxidized/nodes.rb @@ -148,6 +148,35 @@ module Oxidized end end end + + public + + def version node, group + with_lock do + i = find_node_index node + output = self[i].output.new + raise Oxidized::NotSupported unless output.respond_to? :fetch + output.version node, group + end + end + + def get_version node, group, oid + with_lock do + i = find_node_index node + output = self[i].output.new + raise Oxidized::NotSupported unless output.respond_to? :fetch + output.get_version node, group, oid + end + end + + def get_diff node, group, oid1, oid2 + with_lock do + i = find_node_index node + output = self[i].output.new + raise Oxidized::NotSupported unless output.respond_to? :fetch + output.get_diff node, group, oid1, oid2 + end + end end end |