class PactBroker::Matrix::ResolvedSelectorsBuilder
Attributes
Public Class Methods
Source
# File lib/pact_broker/matrix/resolved_selectors_builder.rb, line 11 def initialize @inferred_selectors = [] end
Public Instance Methods
Source
# File lib/pact_broker/matrix/resolved_selectors_builder.rb, line 34 def all_selectors specified_selectors + inferred_selectors end
All the resolved selectors to be used in the matrix query, specified and inferred (if any) @return [Array<PactBroker::Matrix::ResolvedSelector>]
Source
# File lib/pact_broker/matrix/resolved_selectors_builder.rb, line 28 def resolve_inferred_selectors(integrations, options) @inferred_selectors = SelectorResolver.resolve_inferred_selectors(specified_selectors, ignore_selectors, integrations, options) end
Use the given Integrations
to work out what the selectors are for the versions that the versions for the specified selectors should be deployed with. eg. For ‘can-i-deploy –pacticipant Foo –version adfjkwejr –to-environment prod`, work out the selectors for the integrated application versions in the prod environment. @param [Array<PactBroker::Matrix::Integration>] integrations
Source
# File lib/pact_broker/matrix/resolved_selectors_builder.rb, line 17 def resolve_selectors(unresolved_specified_selectors, unresolved_ignore_selectors) # must do this first because we need the ignore selectors to resolve the specified selectors @ignore_selectors = SelectorResolver.resolved_ignore_selectors(unresolved_ignore_selectors) @specified_selectors = SelectorResolver.resolve_specified_selectors(unresolved_specified_selectors, ignore_selectors) end
@param [Array<PactBroker::Matrix::UnresolvedSelector>] @param [Hash] options