Sha256: 6749c450e9bee8a38db4e1d6dad8f57c074d16289ff58f9dc58a2342ac8a94cb
Contents?: true
Size: 986 Bytes
Versions: 15
Compression:
Stored size: 986 Bytes
Contents
require 'fileutils' module Uricp::Strategy class PipedCacheConvert include Uricp::Strategy::Common include Uricp::Strategy::CacheCommon def appropriate? if conversion_required? && supported_source? case from.scheme when 'pipe' validate_cache! if cache_root return proposal end debug "#{self.class.name}: not appropriate" else debug "#{self.class.name}: no non-stream conversion detected" end false end def command "cp --sparse=always /dev/stdin #{proposed_path};" end def proposal @proposed_options = options.dup if cache_root @proposed_options['from_uri'] = temp_cache_uri @proposed_options['sweep'] = [temp_cache_file, cache_file] @proposed_options.delete('cache') @proposed_options.delete('cache_name') else @proposed_options['from_uri'] = temp_uri @proposed_options['clean'] ||= [] @proposed_options['clean'] << proposed_path end self end end end
Version data entries
15 entries across 15 versions & 1 rubygems