class PactBroker::Matrix::ResolvedSelectorsBuilder
Attributes
ignore_selectors[R]
inferred_selectors[R]
specified_selectors[R]
Public Class Methods
new()
click to toggle source
# File lib/pact_broker/matrix/resolved_selectors_builder.rb, line 11 def initialize @inferred_selectors = [] end
Public Instance Methods
all_selectors()
click to toggle source
All the resolved selectors to be used in the matrix query, specified and inferred (if any) @return [Array<PactBroker::Matrix::ResolvedSelector>]
# File lib/pact_broker/matrix/resolved_selectors_builder.rb, line 34 def all_selectors specified_selectors + inferred_selectors end
resolve_inferred_selectors(integrations, options)
click to toggle source
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
# 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
resolve_selectors(unresolved_specified_selectors, unresolved_ignore_selectors)
click to toggle source
@param [Array<PactBroker::Matrix::UnresolvedSelector>] @param [Hash] options
# 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