Sha256: 6b13b14561148324dfb287d279b51ce84cccd50f4588c71553e2c5319a4903d2
Contents?: true
Size: 1.04 KB
Versions: 2
Compression:
Stored size: 1.04 KB
Contents
require "pact_broker/repositories" module PactBroker module Tags module Service extend self extend PactBroker::Repositories def create args pacticipant = pacticipant_repository.find_by_name_or_create args.fetch(:pacticipant_name) version = version_repository.find_by_pacticipant_id_and_number_or_create pacticipant.id, args.fetch(:pacticipant_version_number) tag_repository.create version: version, name: args.fetch(:tag_name) end def find args tag_repository.find args end def delete args version = version_repository.find_by_pacticipant_name_and_number args.fetch(:pacticipant_name), args.fetch(:pacticipant_version_number) connection = PactBroker::Domain::Tag.new.db connection.run("delete from tags where name = '#{args.fetch(:tag_name)}' and version_id = '#{version.id}'") end def find_all_tag_names_for_pacticipant pacticipant_name tag_repository.find_all_tag_names_for_pacticipant pacticipant_name end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pact_broker-2.81.0 | lib/pact_broker/tags/service.rb |
pact_broker-2.80.0 | lib/pact_broker/tags/service.rb |