Sha256: 8c36eee6f4753f648fa8b62fe62be66600488b5b8be25ad5a7c58b97cd41f29f

Contents?: true

Size: 697 Bytes

Versions: 15

Compression:

Stored size: 697 Bytes

Contents

require 'fileutils'

module Uricp::Strategy

  class PipedCache
    
    include Uricp::Strategy::Common
    include Uricp::Strategy::CacheCommon

    def appropriate?
      if cache_root
	case from.scheme
	when 'pipe'
	  validate_cache!
	  return proposal
	end
	debug "#{self.class.name}: not appropriate"
      else
	debug "#{self.class.name}: no cacheing requested" 
      end
      false
    end

    def command
      "tee #{temp_cache_file} |"
    end

    def proposal
      @proposed_options = options.dup
      @proposed_options['sweep'] = [temp_cache_file, cache_file]
      @proposed_options.delete('cache')
      @proposed_options.delete('cache_name')
      self
    end

  end

end


Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
uricp-0.0.15 lib/uricp/strategy/piped_cache.rb
uricp-0.0.14 lib/uricp/strategy/piped_cache.rb
uricp-0.0.13 lib/uricp/strategy/piped_cache.rb
uricp-0.0.12 lib/uricp/strategy/piped_cache.rb
uricp-0.0.11 lib/uricp/strategy/piped_cache.rb
uricp-0.0.10 lib/uricp/strategy/piped_cache.rb
uricp-0.0.9 lib/uricp/strategy/piped_cache.rb
uricp-0.0.8 lib/uricp/strategy/piped_cache.rb
uricp-0.0.7 lib/uricp/strategy/piped_cache.rb
uricp-0.0.6 lib/uricp/strategy/piped_cache.rb
uricp-0.0.5 lib/uricp/strategy/piped_cache.rb
uricp-0.0.4 lib/uricp/strategy/piped_cache.rb
uricp-0.0.3 lib/uricp/strategy/piped_cache.rb
uricp-0.0.2 lib/uricp/strategy/piped_cache.rb
uricp-0.0.1 lib/uricp/strategy/piped_cache.rb