Sha256: 9a46b0dbe33b142ea3e49dfc444ef51b57eb6b73d716f75ffd4c4fb617b48307

Contents?: true

Size: 1.02 KB

Versions: 55

Compression:

Stored size: 1.02 KB

Contents

require 'pact_broker/repositories'

module PactBroker

  module Versions
    class Service

      extend PactBroker::Repositories

      def self.find_latest_by_pacticpant_name params
        version_repository.find_latest_by_pacticpant_name params.fetch(:pacticipant_name)
      end

      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

      def self.find_by_pacticipant_name_and_latest_tag(pacticipant_name, tag)
        version_repository.find_by_pacticipant_name_and_latest_tag(pacticipant_name, tag)
      end

      def self.delete version
        tag_repository.delete_by_version_id version.id
        webhook_repository.delete_triggered_webhooks_by_version_id version.id
        pact_repository.delete_by_version_id version.id
        verification_repository.delete_by_provider_version_id version.id
        version_repository.delete_by_id version.id
      end
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
pact_broker-2.49.0 lib/pact_broker/versions/service.rb
pact_broker-2.48.0 lib/pact_broker/versions/service.rb
pact_broker-2.47.1 lib/pact_broker/versions/service.rb
pact_broker-2.47.0 lib/pact_broker/versions/service.rb
pact_broker-2.46.0 lib/pact_broker/versions/service.rb
pact_broker-2.45.0 lib/pact_broker/versions/service.rb
pact_broker-2.44.0 lib/pact_broker/versions/service.rb
pact_broker-2.43.0 lib/pact_broker/versions/service.rb
pact_broker-2.42.0 lib/pact_broker/versions/service.rb
pact_broker-2.41.0 lib/pact_broker/versions/service.rb
pact_broker-2.40.0 lib/pact_broker/versions/service.rb
pact_broker-2.39.0 lib/pact_broker/versions/service.rb
pact_broker-2.38.1 lib/pact_broker/versions/service.rb
pact_broker-2.38.0 lib/pact_broker/versions/service.rb
pact_broker-2.37.0 lib/pact_broker/versions/service.rb