Sha256: 808e471f69c5f6c6c944316056c2c19305d4aa8ef874b9532bed98c5c81a76c9
Contents?: true
Size: 674 Bytes
Versions: 11
Compression:
Stored size: 674 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 CAN_I_DEPLOY_BADGE_PATH = %r{^/pacticipants/[^/]+/latest-version/[^/]+/can-i-deploy/to/[^/]+/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 || path =~ CAN_I_DEPLOY_BADGE_PATH) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems