summaryrefslogtreecommitdiffstats
path: root/lib/puppet/file_serving
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-07-18 17:51:25 -0500
committerLuke Kanies <luke@madstop.com>2008-07-18 17:51:25 -0500
commitebb219e496682862ac98d382afe014cf1c763f2f (patch)
treed754de01560f8724e2cfad5ff3a53d714e37e9ba /lib/puppet/file_serving
parentd8937acb8c9b108e61330cbac703a17b2eaba9b3 (diff)
downloadpuppet-ebb219e496682862ac98d382afe014cf1c763f2f.tar.gz
puppet-ebb219e496682862ac98d382afe014cf1c763f2f.tar.xz
puppet-ebb219e496682862ac98d382afe014cf1c763f2f.zip
Fixed all of the fileserving termini so they use indirection requests.
This looks like a much larger commit than it is -- it doesn't change any behaviour at all, it just adds some integration tests (which expose the problem) and then switches from an ad-hoc api to a request-based api. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/file_serving')
-rw-r--r--lib/puppet/file_serving/terminus_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/file_serving/terminus_helper.rb b/lib/puppet/file_serving/terminus_helper.rb
index d465aa493..e5da0e29f 100644
--- a/lib/puppet/file_serving/terminus_helper.rb
+++ b/lib/puppet/file_serving/terminus_helper.rb
@@ -8,11 +8,11 @@ require 'puppet/file_serving/fileset'
# Define some common methods for FileServing termini.
module Puppet::FileServing::TerminusHelper
# Create model instances for all files in a fileset.
- def path2instances(key, path, options = {})
- args = [:links, :ignore, :recurse].inject({}) { |hash, param| hash[param] = options[param] if options[param]; hash }
+ def path2instances(request, path)
+ args = [:links, :ignore, :recurse].inject({}) { |hash, param| hash[param] = request.options[param] if request.options[param]; hash }
Puppet::FileServing::Fileset.new(path, args).files.collect do |file|
- inst = model.new(File.join(key, file), :path => path, :relative_path => file)
- inst.links = options[:links] if options[:links]
+ inst = model.new(File.join(request.key, file), :path => path, :relative_path => file)
+ inst.links = request.options[:links] if request.options[:links]
inst
end
end