Sha256: bfbb54492090a64000cfbe2722f1cf9ee0ee08727a950db144969c357b8e278a

Contents?: true

Size: 451 Bytes

Versions: 8

Compression:

Stored size: 451 Bytes

Contents

begin
  require 'composite_io'
  require 'parts'
  require 'stringio'
rescue LoadError
  $stderr.puts "Install the multipart-post gem."
  raise
end

module Faraday
  class CompositeReadIO < ::CompositeReadIO
    attr_reader :length
    
    def initialize(parts)
      @length = parts.inject(0) { |sum, part| sum + part.length }
      ios = parts.map{ |part| part.to_io }
      super(*ios)
    end
  end

  UploadIO = ::UploadIO
  Parts = ::Parts
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
faraday-0.7.5 lib/faraday/upload_io.rb
faraday-0.7.4 lib/faraday/upload_io.rb
faraday-0.7.3 lib/faraday/upload_io.rb
faraday-0.7.2 lib/faraday/upload_io.rb
faraday-0.7.1 lib/faraday/upload_io.rb
faraday-0.7.0 lib/faraday/upload_io.rb
faraday-0.6.1 lib/faraday/upload_io.rb
faraday-0.6.0 lib/faraday/upload_io.rb