Sha256: b89c03739434bdf5f6bf3c89a4056c3aafa238e79ebe85dafc8f9276dac20c68

Contents?: true

Size: 1.02 KB

Versions: 60

Compression:

Stored size: 1.02 KB

Contents

module Fog
  module Storage
    class Softlayer
      class Mock

        def delete_object(container, object)
          response = Excon::Response.new
          if @containers[container].nil? || @containers[container][object].nil? # Container or object doesn't exist.
            response.body = '<html><h1>Not Found</h1><p>The resource could not be found.</p></html>'
            response.status = 404
          else # Success
            response.body = ''
            response.status = 204
          end
          response
        end

      end


      class Real

        # Delete an existing object
        #
        # ==== Parameters
        # * container<~String> - Name of container to delete
        # * object<~String> - Name of object to delete
        #
        def delete_object(container, object)
          request(
            :expects  => 204,
            :method   => 'DELETE',
            :path     => "#{Fog::Softlayer.escape(container)}/#{Fog::Softlayer.escape(object)}"
          )
        end

      end
    end
  end
end

Version data entries

60 entries across 58 versions & 3 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-softlayer-1.1.4/lib/fog/softlayer/requests/storage/delete_object.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-softlayer-1.1.4/lib/fog/softlayer/requests/storage/delete_object.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-softlayer-1.1.4/lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-1.1.4 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-1.1.3 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-1.1.2 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-1.1.1 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-1.1.0 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-1.0.3 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-1.0.2 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-1.0.1 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-1.0.0 lib/fog/softlayer/requests/storage/delete_object.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-softlayer-0.4.7/lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-0.4.7 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-0.4.6 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-0.4.5 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-0.4.4 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-0.4.3 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-0.4.2 lib/fog/softlayer/requests/storage/delete_object.rb
fog-softlayer-0.4.2.pre lib/fog/softlayer/requests/storage/delete_object.rb