Sha256: 9e35f03cac2b880b7293794c325bbe7e5c0d41ea1819b9c849928b1ae8e19998

Contents?: true

Size: 638 Bytes

Versions: 27

Compression:

Stored size: 638 Bytes

Contents

module Fog
  module Storage
    class OpenStack
      class Real

        # Get public_url for an object
        #
        # ==== Parameters
        # * container<~String> - Name of container to look in
        # * object<~String> - Name of object to look for
        #
        def public_url(container=nil, object=nil)
          return nil if container.nil?
          u = "#{url}/#{Fog::OpenStack.escape(container)}"
          u << "/#{Fog::OpenStack.escape(object)}" unless object.nil?
          u
        end

        private

        def url
          "#{@scheme}://#{@host}:#{@port}#{@path}"
        end

      end
    end
  end
end

Version data entries

27 entries across 27 versions & 4 rubygems

Version Path
fog-openstack-0.1.10 lib/fog/openstack/requests/storage/public_url.rb
fog-openstack-0.1.9 lib/fog/openstack/requests/storage/public_url.rb
fog-openstack-0.1.8 lib/fog/openstack/requests/storage/public_url.rb
fog-openstack-0.1.7 lib/fog/openstack/requests/storage/public_url.rb
fog-openstack-0.1.6 lib/fog/openstack/requests/storage/public_url.rb
fog-openstack-0.1.5 lib/fog/openstack/requests/storage/public_url.rb
fog-openstack-0.1.4 lib/fog/openstack/requests/storage/public_url.rb
fog-openstack-0.1.3 lib/fog/openstack/requests/storage/public_url.rb
fog-openstack-0.1.2 lib/fog/openstack/requests/storage/public_url.rb
fog-openstack-0.1.1 lib/fog/openstack/requests/storage/public_url.rb
fog-openstack-0.1.0 lib/fog/openstack/requests/storage/public_url.rb
fog-1.37.0 lib/fog/openstack/requests/storage/public_url.rb
fog-1.36.0 lib/fog/openstack/requests/storage/public_url.rb
fog-1.35.0 lib/fog/openstack/requests/storage/public_url.rb
fog-2.0.0.pre.0 lib/fog/openstack/requests/storage/public_url.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/openstack/requests/storage/public_url.rb
fog-1.34.0 lib/fog/openstack/requests/storage/public_url.rb
fog-1.33.0 lib/fog/openstack/requests/storage/public_url.rb
fog-1.32.0 lib/fog/openstack/requests/storage/public_url.rb
fog-1.31.0 lib/fog/openstack/requests/storage/public_url.rb