From fb957ccb6636ce86bd98c141d5818c54bc0d4659 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 14 May 2009 11:36:20 -0500 Subject: Modules now can find their own paths Previously, when you created a module you had to specify the path. Now Module instances can use the module path to look up their paths, and there are methods for determining whether the module is present (if the path is present). Also cleaned up the methods for figuring out what's in the module (plugins, etc.). Signed-off-by: Luke Kanies --- lib/puppet/network/handler/fileserver.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/puppet/network/handler') diff --git a/lib/puppet/network/handler/fileserver.rb b/lib/puppet/network/handler/fileserver.rb index aad3b98be..50e2614aa 100755 --- a/lib/puppet/network/handler/fileserver.rb +++ b/lib/puppet/network/handler/fileserver.rb @@ -254,8 +254,8 @@ class Puppet::Network::Handler end # And use the environment to look up the module. - if mod = Puppet::Node::Environment.new(env).module(module_name) - return @mounts[MODULES].copy(mod.name, mod.files) + if mod = Puppet::Node::Environment.new(env).module(module_name) and mod.files? + return @mounts[MODULES].copy(mod.name, mod.file_directory) else return nil end @@ -744,7 +744,7 @@ class Puppet::Network::Handler private def valid_modules(client) - Puppet::Node::Environment.new.modules.find_all { |mod| mod.plugins? } + Puppet::Node::Environment.new.modules.find_all { |mod| mod.exist? } end def add_to_filetree(f, filetree) -- cgit