Sha256: 0cb3ac00eee6d2d193b624759be3fca6265b11f5e1821c8800e57dc173eb1dde

Contents?: true

Size: 354 Bytes

Versions: 14

Compression:

Stored size: 354 Bytes

Contents

class CoalescingPanda::BearcatUri
  attr_accessor :uri

  def initialize(uri)
    Rails.logger.info "Parsing Bearcat URI: #{uri}"
    @uri = URI.parse(uri)
  end

  def api_domain
    uri.port.present? ? "#{uri.host}:#{uri.port.to_s}" : uri.host
  end

  def scheme
    [uri.scheme, '://'].join
  end

  def prefix
    [scheme, api_domain].join
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
coalescing_panda-4.0.11 lib/coalescing_panda/bearcat_uri.rb
coalescing_panda-4.0.10 lib/coalescing_panda/bearcat_uri.rb
coalescing_panda-4.0.9 lib/coalescing_panda/bearcat_uri.rb
coalescing_panda-4.0.8 lib/coalescing_panda/bearcat_uri.rb
coalescing_panda-4.0.7 lib/coalescing_panda/bearcat_uri.rb
coalescing_panda-4.1.18 lib/coalescing_panda/bearcat_uri.rb
coalescing_panda-4.1.17 lib/coalescing_panda/bearcat_uri.rb
coalescing_panda-4.1.16 lib/coalescing_panda/bearcat_uri.rb
coalescing_panda-4.1.15 lib/coalescing_panda/bearcat_uri.rb
coalescing_panda-4.0.6 lib/coalescing_panda/bearcat_uri.rb
coalescing_panda-4.0.5 lib/coalescing_panda/bearcat_uri.rb
coalescing_panda-4.1.14 lib/coalescing_panda/bearcat_uri.rb
coalescing_panda-4.1.13 lib/coalescing_panda/bearcat_uri.rb
coalescing_panda-4.1.12 lib/coalescing_panda/bearcat_uri.rb