Module: PactBroker::Labels::Service

Extended by:
Service, Repositories
Included in:
Service
Defined in:
lib/pact_broker/labels/service.rb

Constant Summary

Constants included from Repositories

Repositories::REPOSITORY_FACTORIES

Instance Method Summary collapse

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

#create(args) ⇒ Object



16
17
18
19
# File 'lib/pact_broker/labels/service.rb', line 16

def create args
  pacticipant = pacticipant_repository.find_by_name_or_create args.fetch(:pacticipant_name)
  label_repository.create pacticipant: pacticipant, name: args.fetch(:label_name)
end

#delete(args) ⇒ Object



25
26
27
# File 'lib/pact_broker/labels/service.rb', line 25

def delete args
  label_repository.delete args
end

#find(args) ⇒ Object



21
22
23
# File 'lib/pact_broker/labels/service.rb', line 21

def find args
  label_repository.find args
end

#get_all_unique_labels(pagination_options = {}) ⇒ Object



12
13
14
# File 'lib/pact_broker/labels/service.rb', line 12

def get_all_unique_labels pagination_options = {}
  label_repository.get_all_unique_labels(pagination_options)
end