diff options
author | Claire McQuin <claire@opscode.com> | 2013-09-03 21:12:51 -0700 |
---|---|---|
committer | Claire McQuin <claire@opscode.com> | 2013-09-06 09:46:28 -0700 |
commit | 2c6cd5508f5e1eddac20cae505d1947c575bb494 (patch) | |
tree | aa2919e77cc6683b469ad7523da93d2bbe3df6a1 /lib/ohai/system.rb | |
parent | a7401d3bd7c4e1032796ec37824318ffb1c4d894 (diff) | |
download | ohai-2c6cd5508f5e1eddac20cae505d1947c575bb494.tar.gz |
store relative plugin paths in v6_dependency_solver
Diffstat (limited to 'lib/ohai/system.rb')
-rw-r--r-- | lib/ohai/system.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ohai/system.rb b/lib/ohai/system.rb index c31a1d50..b63b4c08 100644 --- a/lib/ohai/system.rb +++ b/lib/ohai/system.rb @@ -59,9 +59,10 @@ module Ohai file_regex = Regexp.new("#{File.expand_path(path)}#{File::SEPARATOR}(.+).rb$") md = file_regex.match(file) if md - unless @v6_dependency_solver.has_key?(file) + plugin_name = md[1].gsub(File::SEPARATOR, "::") + unless @v6_dependency_solver.has_key?(plugin_name) plugin = loader.load_plugin(file) - @v6_dependency_solver[file] = plugin unless plugin.nil? + @v6_dependency_solver[plugin_name] = plugin unless plugin.nil? else Ohai::Log.debug("Already loaded plugin at #{file}") end |