Class: PactBroker::Versions::Service

Inherits:
Object
  • Object
show all
Extended by:
Repositories
Defined in:
lib/pact_broker/versions/service.rb

Class Method Summary collapse

Methods included from Repositories

pact_repository, pacticipant_repository, tag_repository, verification_repository, version_repository, webhook_repository

Class Method Details

.delete(version) ⇒ Object



14
15
16
17
18
# File 'lib/pact_broker/versions/service.rb', line 14

def self.delete version
  tag_repository.delete_by_version_id version.id
  pact_repository.delete_by_version_id version.id
  version_repository.delete_by_id version.id
end

.find_by_pacticipant_name_and_number(params) ⇒ Object



10
11
12
# File 'lib/pact_broker/versions/service.rb', line 10

def self.find_by_pacticipant_name_and_number params
  version_repository.find_by_pacticipant_name_and_number params.fetch(:pacticipant_name), params.fetch(:pacticipant_version_number)
end