Class: PactBroker::Matrix::Repository
- Inherits:
-
Object
- Object
- PactBroker::Matrix::Repository
- Includes:
- Repositories
- Defined in:
- lib/pact_broker/matrix/repository.rb
Constant Summary collapse
- TP_COLS =
Used when using table_print to output query results
[ :consumer_version_number, :pact_revision_number, :provider_version_number, :verification_number]
- GROUP_BY_CONSUMER_VERSION_AND_PROVIDER_VERSION =
[:consumer_name, :consumer_version_number, :provider_name, :provider_version_number]
- GROUP_BY_CONSUMER_VERSION_AND_PROVIDER =
[:consumer_name, :consumer_version_number, :provider_name]
- GROUP_BY_CONSUMER_AND_PROVIDER =
[:consumer_name, :provider_name]
Constants included from Repositories
Repositories::REPOSITORY_FACTORIES
Instance Method Summary collapse
-
#find(unresolved_specified_selectors, options = {}) ⇒ Object
THE METHOD for querying the Matrix.
- #find_for_consumer_and_provider(pacticipant_1_name, pacticipant_2_name) ⇒ Object
Methods included from Repositories
#branch_repository, #branch_version_repository, #get_repository, #integration_repository, #label_repository, #matrix_repository, #pact_repository, #pacticipant_repository, #register_default_repositories, #register_repository, #tag_repository, #verification_repository, #version_repository, #webhook_repository
Instance Method Details
#find(unresolved_specified_selectors, options = {}) ⇒ Object
THE METHOD for querying the Matrix
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/pact_broker/matrix/repository.rb', line 28 def find(unresolved_specified_selectors, = {}) infer_selectors = infer_selectors_for_integrations?() resolved_selectors_builder = ResolvedSelectorsBuilder.new resolved_selectors_builder.resolve_selectors(unresolved_specified_selectors, .fetch(:ignore_selectors, [])) integrations = matrix_integration_repository.find_integrations_for_specified_selectors(resolved_selectors_builder.specified_selectors, infer_selectors) resolved_selectors_builder.resolve_inferred_selectors(integrations, ) if infer_selectors considered_rows, ignored_rows = find_considered_and_ignored_rows(resolved_selectors_builder.all_selectors, resolved_selectors_builder.ignore_selectors, ) QueryResults.new( considered_rows.sort, ignored_rows.sort, unresolved_specified_selectors, , resolved_selectors_builder.all_selectors, resolved_selectors_builder.ignore_selectors, integrations ) end |
#find_for_consumer_and_provider(pacticipant_1_name, pacticipant_2_name) ⇒ Object
47 48 49 50 51 |
# File 'lib/pact_broker/matrix/repository.rb', line 47 def find_for_consumer_and_provider(pacticipant_1_name, pacticipant_2_name) selectors = [ UnresolvedSelector.new(pacticipant_name: pacticipant_1_name), UnresolvedSelector.new(pacticipant_name: pacticipant_2_name)] = { latestby: "cvpv" } find(selectors, ) end |