Sha256: 1c931685e23d6b9a230fed8f544db2e08bd6191465b31ae0f46fe69c08768c18
Contents?: true
Size: 780 Bytes
Versions: 149
Compression:
Stored size: 780 Bytes
Contents
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
149 entries across 149 versions & 5 rubygems