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.13.0 lib/pact_broker/services/tag_service.rb
pact_broker-1.12.0 lib/pact_broker/services/tag_service.rb
pact_broker-1.11.2 lib/pact_broker/services/tag_service.rb
pact_broker-1.11.1 lib/pact_broker/services/tag_service.rb
pact_broker-1.11.0 lib/pact_broker/services/tag_service.rb
pact_broker-1.10.0 lib/pact_broker/services/tag_service.rb
pact_broker-1.9.3 lib/pact_broker/services/tag_service.rb
pact_broker-1.9.2 lib/pact_broker/services/tag_service.rb
pact_broker-1.9.1 lib/pact_broker/services/tag_service.rb
pact_broker-1.9.0 lib/pact_broker/services/tag_service.rb
pact_broker-1.9.0.rc1 lib/pact_broker/services/tag_service.rb
pact_broker-1.8.1 lib/pact_broker/services/tag_service.rb
pact_broker-1.8.0 lib/pact_broker/services/tag_service.rb
pact_broker-1.7.0 lib/pact_broker/services/tag_service.rb
pact_broker-1.6.0 lib/pact_broker/services/tag_service.rb
pact_broker-1.5.0 lib/pact_broker/services/tag_service.rb
pact_broker-1.4.0 lib/pact_broker/services/tag_service.rb
pact_broker-1.3.2.rc1 lib/pact_broker/services/tag_service.rb
pact_broker-1.3.1 lib/pact_broker/services/tag_service.rb
pact_broker-1.3.0 lib/pact_broker/services/tag_service.rb