Sha256: 23e1d4f600fb4187dbb632ada1159e266ab11804fd11208bdd51111b36b60391

Contents?: true

Size: 969 Bytes

Versions: 16

Compression:

Stored size: 969 Bytes

Contents

unless Fog.mocking?

  module Fog
    module Rackspace
      class Files

        # List number of objects and total bytes stored
        #
        # ==== Parameters
        # * container<~String> - Name of container to retrieve info for
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * headers<~Hash>:
        #     * 'X-Container-Object-Count'<~String> - Count of containers
        #     * 'X-Container-Bytes-Used'<~String>   - Bytes used
        def head_container(container)
          response = storage_request(
            :expects  => 204,
            :method   => 'HEAD',
            :path     => container,
            :query    => 'format=json'
          )
          response
        end

      end
    end
  end

else

  module Fog
    module Rackspace
      class Servers

        def head_container(container)
          raise MockNotImplemented.new("Contributions welcome!")
        end

      end
    end
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fog-0.0.58 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.57 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.56 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.55 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.54 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.53 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.52 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.51 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.50 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.49 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.48 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.47 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.46 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.45 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.44 lib/fog/rackspace/requests/files/head_container.rb
fog-0.0.43 lib/fog/rackspace/requests/files/head_container.rb