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.76.2 lib/pact_broker/versions/service.rb
pact_broker-2.76.1 lib/pact_broker/versions/service.rb
pact_broker-2.76.0 lib/pact_broker/versions/service.rb
pact_broker-2.75.0 lib/pact_broker/versions/service.rb
pact_broker-2.74.1 lib/pact_broker/versions/service.rb
pact_broker-2.74.0 lib/pact_broker/versions/service.rb
pact_broker-2.73.0 lib/pact_broker/versions/service.rb
pact_broker-2.72.0 lib/pact_broker/versions/service.rb
pact_broker-2.71.0 lib/pact_broker/versions/service.rb
pact_broker-2.70.0 lib/pact_broker/versions/service.rb
pact_broker-2.69.0 lib/pact_broker/versions/service.rb
pact_broker-2.68.1 lib/pact_broker/versions/service.rb
pact_broker-2.68.0 lib/pact_broker/versions/service.rb
pact_broker-2.67.0 lib/pact_broker/versions/service.rb
pact_broker-2.66.0 lib/pact_broker/versions/service.rb
pact_broker-2.65.0 lib/pact_broker/versions/service.rb
pact_broker-2.64.0 lib/pact_broker/versions/service.rb
pact_broker-2.63.0 lib/pact_broker/versions/service.rb
pact_broker-2.62.0 lib/pact_broker/versions/service.rb
pact_broker-2.61.0 lib/pact_broker/versions/service.rb