Sha256: af2ff7ab0e3bef4563620a4351a9a0864aa4e5d3ae34c9e4d118a353ab098f02
Contents?: true
Size: 932 Bytes
Versions: 1
Compression:
Stored size: 932 Bytes
Contents
# # Created by Luke Kanies on 2007-10-22. # Copyright (c) 2007. All rights reserved. require 'puppet/file_serving' 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(request, *paths) filesets = paths.collect do |path| # Filesets support indirector requests as an options collection Puppet::FileServing::Fileset.new(path, request) end Puppet::FileServing::Fileset.merge(*filesets).collect do |file, base_path| inst = model.new(base_path, :relative_path => file) inst.checksum_type = request.options[:checksum_type] if request.options[:checksum_type] inst.links = request.options[:links] if request.options[:links] inst.collect inst end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
puppet-0.25.5 | lib/puppet/file_serving/terminus_helper.rb |