Sha256: de6e5032c62148b28f69797f25260a8401675892bb5601ce3f528a66452086d0

Contents?: true

Size: 825 Bytes

Versions: 46

Compression:

Stored size: 825 Bytes

Contents

module Fog
  module Rackspace
    module Files
      class Real

        # Create a new object
        #
        # ==== Parameters
        # * container<~String> - Name for container, should be < 256 bytes and must not contain '/'
        #
        def put_object(container, object, data)
          data = Fog::Rackspace::Files.parse_data(data)
          response = storage_request(
            :body     => data[:body],
            :expects  => 201,
            :headers  => data[:headers],
            :method   => 'PUT',
            :path     => "#{CGI.escape(container)}/#{CGI.escape(object)}"
          )
          response
        end

      end

      class Mock

        def put_object(container, object, data)
          raise MockNotImplemented.new("Contributions welcome!")
        end

      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
fog-0.1.3 lib/fog/rackspace/requests/files/put_object.rb
fog-0.1.2 lib/fog/rackspace/requests/files/put_object.rb
fog-0.1.1 lib/fog/rackspace/requests/files/put_object.rb
fog-0.1.0 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.100 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.99 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.98 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.97 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.96 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.95 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.94 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.93 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.92 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.91 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.90 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.89 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.88 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.87 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.86 lib/fog/rackspace/requests/files/put_object.rb
fog-0.0.85 lib/fog/rackspace/requests/files/put_object.rb