Sha256: a15aaa6abb20d6cfaeaa27c3f6c690408bf3b40b35d268f95bfbeaf43039f999

Contents?: true

Size: 589 Bytes

Versions: 8

Compression:

Stored size: 589 Bytes

Contents

module Rack
  class GenericProxyURI < Exception
    attr_reader :url

    def intialize(url)
      @url = url
    end

    def to_s
      %Q(Your URL "#{@url}" is too generic. Did you mean "http://#{@url}"?)
    end
  end

  class AmbiguousProxyMatch < Exception
    attr_reader :path, :matches
    def initialize(path, matches)
      @path = path
      @matches = matches
    end

    def to_s
      %Q(Path "#{path}" matched multiple endpoints: #{formatted_matches})
    end

    private

    def formatted_matches
      matches.map {|matcher| matcher.to_s}.join(', ')
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
pact-provider-proxy-2.3.0 vendor/rack-reverse-proxy/lib/rack/exception.rb
pact-provider-proxy-2.2.0 vendor/rack-reverse-proxy/lib/rack/exception.rb
rack-reverse-proxy-0.9.1 lib/rack/exception.rb
rack-reverse-proxy-0.9.0 lib/rack/exception.rb
rack-reverse-proxy-0.8.1 lib/rack/exception.rb
pact-provider-proxy-2.1.0 vendor/rack-reverse-proxy/lib/rack/exception.rb
pact-provider-proxy-2.0.0 vendor/rack-reverse-proxy/lib/rack/exception.rb
pact-provider-proxy-1.2.0 vendor/rack-reverse-proxy/lib/rack/exception.rb