diff options
Diffstat (limited to 'lib/ohai/runner.rb')
-rw-r--r-- | lib/ohai/runner.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/ohai/runner.rb b/lib/ohai/runner.rb index 05fd7cfc..ba3985dc 100644 --- a/lib/ohai/runner.rb +++ b/lib/ohai/runner.rb @@ -42,11 +42,8 @@ module Ohai end begin - case plugin.version - when :version7 + if plugin.version == :version7 run_v7_plugin(plugin) - when :version6 - run_v6_plugin(plugin) else raise Ohai::Exceptions::InvalidPlugin, "Invalid plugin version #{plugin.version} for plugin #{plugin}" end @@ -61,12 +58,6 @@ module Ohai Ohai::Log.debug("Plugin #{plugin.name} took #{elapsed.total} seconds to run.") end - def run_v6_plugin(plugin) - return true if plugin.has_run? - - @safe_run ? plugin.safe_run : plugin.run - end - def run_v7_plugin(plugin) visited = [ plugin ] until visited.empty? |