summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-02-18 12:16:39 -0600
committerLuke Kanies <luke@madstop.com>2009-02-19 16:22:49 -0600
commit058266feebb3be90f6af29d0ff70b22ceeb9b3e7 (patch)
tree05a49a8f69d66d4b2432fea1f2c77a88743ab94e /lib/puppet
parent19b85346a60a05fd146fe39742cb873490eb6b4c (diff)
downloadpuppet-058266feebb3be90f6af29d0ff70b22ceeb9b3e7.tar.gz
puppet-058266feebb3be90f6af29d0ff70b22ceeb9b3e7.tar.xz
puppet-058266feebb3be90f6af29d0ff70b22ceeb9b3e7.zip
Switching the ModuleFiles Indirection terminus to the new Module/Env api
Again, much cleaner and simpler. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/indirector/module_files.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/indirector/module_files.rb b/lib/puppet/indirector/module_files.rb
index 7c5cf278f..fbf40aa70 100644
--- a/lib/puppet/indirector/module_files.rb
+++ b/lib/puppet/indirector/module_files.rb
@@ -37,7 +37,7 @@ class Puppet::Indirector::ModuleFiles < Puppet::Indirector::Terminus
# Try to find our module.
def find_module(module_name, node_name)
- Puppet::Module::find(module_name, environment(node_name))
+ environment(node_name).module(module_name)
end
# Search for a list of files.
@@ -56,9 +56,9 @@ class Puppet::Indirector::ModuleFiles < Puppet::Indirector::Terminus
# Determine the environment to use, if any.
def environment(node_name)
if node_name and node = Puppet::Node.find(node_name)
- node.environment
+ Puppet::Node::Environment.new(node.environment)
else
- Puppet::Node::Environment.new.name
+ Puppet::Node::Environment.new
end
end