Sha256: a56dcbd451ec39f7d9d75d7ce2b501947d20ecf495297967c4eb419d7c6f69ad

Contents?: true

Size: 1.3 KB

Versions: 14

Compression:

Stored size: 1.3 KB

Contents

require_relative 'base_decorator'

module PactBroker
  module Api
    module Decorators
      class VerificationDecorator < BaseDecorator

        property :provider_name, as: :providerName, writeable: false
        property :provider_version_number, as: :providerApplicationVersion, writeable: false
        property :success
        property :execution_date, as: :verificationDate
        property :build_url, as: :buildUrl
        property :test_results, as: :testResults

        link :self do | options |
          {
            title: 'Verification result',
            name: "Verification result #{represented.number} for #{represented.latest_pact_publication.name}",
            href: verification_url(represented, options.fetch(:base_url), )
          }
        end

        link 'pb:pact-version' do | options |
          {
            title: 'Pact',
            name: represented.latest_pact_publication.name,
            href: pact_url(options.fetch(:base_url), represented.latest_pact_publication)
          }
        end

        link 'pb:triggered-webhooks' do | options |
          {
            title: 'Webhooks triggered by the publication of this verification result',
            href: verification_triggered_webhooks_url(represented, options.fetch(:base_url))
          }
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
pact_broker-2.35.0 lib/pact_broker/api/decorators/verification_decorator.rb
pact_broker-2.34.0 lib/pact_broker/api/decorators/verification_decorator.rb
pact_broker-2.33.0 lib/pact_broker/api/decorators/verification_decorator.rb
pact_broker-2.32.0 lib/pact_broker/api/decorators/verification_decorator.rb
pact_broker-2.31.0 lib/pact_broker/api/decorators/verification_decorator.rb
pact_broker-2.30.0 lib/pact_broker/api/decorators/verification_decorator.rb
pact_broker-2.29.0 lib/pact_broker/api/decorators/verification_decorator.rb
pact_broker-2.27.6 lib/pact_broker/api/decorators/verification_decorator.rb
pact_broker-2.27.5 lib/pact_broker/api/decorators/verification_decorator.rb
pact_broker-2.27.4 lib/pact_broker/api/decorators/verification_decorator.rb
pact_broker-2.27.3 lib/pact_broker/api/decorators/verification_decorator.rb
pact_broker-2.27.2 lib/pact_broker/api/decorators/verification_decorator.rb
pact_broker-2.27.0 lib/pact_broker/api/decorators/verification_decorator.rb
pact_broker-2.26.1 lib/pact_broker/api/decorators/verification_decorator.rb