Sha256: 3f0d2ed15c2795f0e40b235a6aa9c0a1ca6abf5bf540aef2452b39bd3611045c

Contents?: true

Size: 580 Bytes

Versions: 27

Compression:

Stored size: 580 Bytes

Contents

require 'pact_broker/repositories'

module PactBroker

  module Services
    module TagService

      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

    end
  end

end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
pact_broker-1.2.0 lib/pact_broker/services/tag_service.rb
pact_broker-1.1.0 lib/pact_broker/services/tag_service.rb
pact_broker-1.0.0 lib/pact_broker/services/tag_service.rb
pact_broker-1.0.0.alpha3 lib/pact_broker/services/tag_service.rb
pact_broker-1.0.0.alpha2 lib/pact_broker/services/tag_service.rb
pact_broker-1.0.0.alpha1 lib/pact_broker/services/tag_service.rb
pact_broker-0.0.10 lib/pact_broker/services/tag_service.rb