Sha256: dcf3e6bbb4bc3f833e8bd11ea5fa6fe7d56b644fd1a94088fd7a4f102e2b50ac

Contents?: true

Size: 495 Bytes

Versions: 8

Compression:

Stored size: 495 Bytes

Contents

module Uricp::Strategy
  class PipedLocalPut
    include Uricp::Strategy::Common

    def appropriate?
      return proposal if to.scheme == 'file' &&
                         from.scheme == 'pipe'

      debug "#{self.class.name}: not appropriate"
      false
    end

    def command
      "cp --sparse=always /dev/stdin #{to.path};"
    end

    def proposal
      @proposed_options = options.dup
      @proposed_options['from_uri'] = @proposed_options['to_uri']
      self
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
uricp-0.0.24 lib/uricp/strategy/piped_local_put.rb
uricp-0.0.23 lib/uricp/strategy/piped_local_put.rb
uricp-0.0.22 lib/uricp/strategy/piped_local_put.rb
uricp-0.0.21 lib/uricp/strategy/piped_local_put.rb
uricp-0.0.20 lib/uricp/strategy/piped_local_put.rb
uricp-0.0.18 lib/uricp/strategy/piped_local_put.rb
uricp-0.0.17 lib/uricp/strategy/piped_local_put.rb
uricp-0.0.16 lib/uricp/strategy/piped_local_put.rb