diff options
author | Luke Kanies <luke@madstop.com> | 2009-08-23 12:10:35 -0700 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-08-24 11:34:38 +1000 |
commit | c0da3bfebb40198703d7d99f2809b315682e28fc (patch) | |
tree | b58b7ebf1cddc3516049d7b178b010cc2025acac /lib/puppet/file_serving/mount/plugins.rb | |
parent | ff39bc707e7f37ddeb28203a9e1bfaddcb9dc641 (diff) | |
download | puppet-c0da3bfebb40198703d7d99f2809b315682e28fc.tar.gz puppet-c0da3bfebb40198703d7d99f2809b315682e28fc.tar.xz puppet-c0da3bfebb40198703d7d99f2809b315682e28fc.zip |
Fixing #2558 - propagating recent fileserving changes
I'd made changes to the internals of the fileserving
system to fix #2544 (mostly switched from passing
the node around and then calculating the environment to just
passing the environment around), but those changes weren't consistent
throughout the fileserving code.
In the process of making them consistent, I realized that the
plain file server actually needs the node name rather than
the environment, so I switched to passing the request around,
because it has both pieces of information.
Also added further integration tests which will hopefully keep
this from cropping up again.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/file_serving/mount/plugins.rb')
-rw-r--r-- | lib/puppet/file_serving/mount/plugins.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/file_serving/mount/plugins.rb b/lib/puppet/file_serving/mount/plugins.rb index 02b838c84..c860e52a7 100644 --- a/lib/puppet/file_serving/mount/plugins.rb +++ b/lib/puppet/file_serving/mount/plugins.rb @@ -5,18 +5,18 @@ require 'puppet/file_serving/mount' # many directories into one. class Puppet::FileServing::Mount::Plugins < Puppet::FileServing::Mount # Return an instance of the appropriate class. - def find(relative_path, environment) - return nil unless mod = environment.modules.find { |mod| mod.plugin(relative_path) } + def find(relative_path, request) + return nil unless mod = request.environment.modules.find { |mod| mod.plugin(relative_path) } path = mod.plugin(relative_path) return path end - def search(relative_path, environment) + def search(relative_path, request) # We currently only support one kind of search on plugins - return # them all. - paths = environment.modules.find_all { |mod| mod.plugins? }.collect { |mod| mod.plugin_directory } + paths = request.environment.modules.find_all { |mod| mod.plugins? }.collect { |mod| mod.plugin_directory } return nil if paths.empty? return paths end |