Sha256: dbff07fb27266e1a0dd2739803daff89e5860ff13f143afaaa0ac44785596ba0
Contents?: true
Size: 495 Bytes
Versions: 13
Compression:
Stored size: 495 Bytes
Contents
module PactBroker module Api module Paths PACT_BADGE_PATH = %r{^/pacts/provider/[^/]+/consumer/.*/badge(?:\.[A-Za-z]+)?$}.freeze MATRIX_BADGE_PATH = %r{^/matrix/provider/[^/]+/latest/[^/]+/consumer/[^/]+/latest/[^/]+/badge(?:\.[A-Za-z]+)?$}.freeze extend self def is_badge_path?(path) # Optimise by checking include? first - regexp slow path.include?('/badge') && (path =~ PACT_BADGE_PATH || path =~ MATRIX_BADGE_PATH) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems