Sha256: dddf47845c97a77d451a4a61abe85e103df5ed65549062b7299f853a648023f1

Contents?: true

Size: 1.47 KB

Versions: 59

Compression:

Stored size: 1.47 KB

Contents

require 'pact_broker/domain/verification'

module PactBroker
  module Verifications
    class LatestVerificationForPactVersion < PactBroker::Domain::Verification
      set_dataset(:latest_verifications_for_pact_versions)

      # this view doesn't have a consumer_id
      # TODO add it
      def consumer
        PactBroker::Domain::Pacticipant.find(id: PactBroker::Pacts::AllPactPublications
           .where(pact_version_id: pact_version_id)
           .limit(1).select(:consumer_id))
      end

      # this view doesn't have a provider_id
      # TODO add it
      def provider
        PactBroker::Domain::Pacticipant.find(id: PactBroker::Pacts::AllPactPublications
           .where(pact_version_id: pact_version_id)
           .limit(1).select(:provider_id))
      end
    end
  end
end

# Table: latest_verifications_for_pact_versions
# Columns:
#  id                      | integer                     |
#  number                  | integer                     |
#  success                 | boolean                     |
#  build_url               | text                        |
#  pact_version_id         | integer                     |
#  execution_date          | timestamp without time zone |
#  created_at              | timestamp without time zone |
#  provider_version_id     | integer                     |
#  provider_version_number | text                        |
#  provider_version_order  | integer                     |
#  test_results            | text                        |

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
pact_broker-2.79.1 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.79.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.78.1 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.78.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.77.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.76.2 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.76.1 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.76.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.75.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.74.1 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.74.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.73.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.72.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.71.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.70.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.69.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.68.1 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.68.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.67.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb
pact_broker-2.66.0 lib/pact_broker/verifications/latest_verification_for_pact_version.rb