class ImageServer::Configuration

Attributes

cdn_host[RW]
cdn_protocol[RW]
log_directory[RW]
logger[RW]
path_to_binary[RW]
sharded_cdn_host[RW]
sharded_host_count[RW]
upload_host[W]

Public Instance Methods

port() click to toggle source
# File lib/image_server/configuration.rb, line 14
def port
  return unless @upload_host

  URI(upload_host).port
end
upload_host() click to toggle source

returns upload_host with a protocol included example: if @upload_host is `example.com` will return `example.com`

# File lib/image_server/configuration.rb, line 22
def upload_host
  return unless @upload_host
  return @upload_host if @upload_host.start_with?('http')

  "http://#{@upload_host}"
end