Class: PactBroker::Pacts::ProviderStateService
- Inherits:
-
Object
- Object
- PactBroker::Pacts::ProviderStateService
- Extended by:
- Repositories::Scopes, Services
- Defined in:
- lib/pact_broker/pacts/provider_state_service.rb
Constant Summary
Constants included from Services
Class Method Summary collapse
Methods included from Services
badge_service, branch_service, certificate_service, contract_service, deployed_version_service, environment_service, get_service, group_service, index_service, integration_service, label_service, matrix_service, metrics_service, pact_service, pacticipant_service, provider_state_service, register_default_services, register_service, released_version_service, tag_service, verification_service, version_service, webhook_service, webhook_trigger_service
Methods included from Repositories::Scopes
scope_for, unscoped, with_no_scope
Class Method Details
.list_provider_states(provider) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/pact_broker/pacts/provider_state_service.rb', line 14 def self.list_provider_states(provider) query = scope_for(PactPublication).eager_for_domain_with_content.for_provider_and_consumer_version_selector(provider, PactBroker::Pacts::Selector.latest_for_main_branch) query.all.flat_map do | pact_publication | { "providerStates" => pact_publication.to_domain.content_object.provider_states, "consumer" => pact_publication.to_domain.consumer.name } end end |