class Uricp::Strategy::SegmentedRemotePut
Public Instance Methods
appropriate?()
click to toggle source
# File lib/uricp/strategy/segmented_remote_put.rb, line 5 def appropriate? unless segmented? debug "#{self.class.name}: not appropriate" return false end if compression_required? || conversion_required? debug "#{self.class.name}: not ready to upload" return false end case to.scheme when 'http', 'https' case from.scheme when 'file', 'pipe' return proposal if http_authentication? end end unsupported_transfer false end
command()
click to toggle source
# File lib/uricp/strategy/segmented_remote_put.rb, line 25 def command "segment_upload --segment-size '#{options['segment-size']}' #{source_details} #{to};" end
proposal()
click to toggle source
# File lib/uricp/strategy/segmented_remote_put.rb, line 29 def proposal @proposed_options = options.dup @proposed_options['from_uri'] = to @proposed_options['segment-size'] = nil self end
source_details()
click to toggle source
# File lib/uricp/strategy/segmented_remote_put.rb, line 36 def source_details "--from #{from.path}" unless from.scheme == 'pipe' end