Sha256: 1f81e25c1dc64c24dd06b0ad8c1eca4a39b99fa5e847c4f7a7eb161e367a06fe

Contents?: true

Size: 1.1 KB

Versions: 9

Compression:

Stored size: 1.1 KB

Contents

require_relative 'base_decorator'
require 'pact_broker/api/pact_broker_urls'

module PactBroker
  module Api
    module Decorators
      class IntegrationDecorator < BaseDecorator
        include PactBroker::Api::PactBrokerUrls

        property :consumer do
          property :name
        end

        property :provider do
          property :name
        end

        link "pb:dashboard" do | options |
          {
            title: "BETA: Pacts to show on the dashboard",
            href: dashboard_url_for_integration(represented.consumer.name, represented.provider.name, options.fetch(:base_url))
          }
        end

        link "pb:matrix" do | options |
          {
            title: "Matrix of pacts/verification results for #{represented.consumer.name} and #{represented.provider.name}",
            href: matrix_url(represented.consumer.name, represented.provider.name, options.fetch(:base_url))
          }
        end

        link "pb:group" do | options |
          {
            href: group_url(represented.consumer.name, options.fetch(:base_url))
          }
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pact_broker-2.38.1 lib/pact_broker/api/decorators/integration_decorator.rb
pact_broker-2.38.0 lib/pact_broker/api/decorators/integration_decorator.rb
pact_broker-2.37.0 lib/pact_broker/api/decorators/integration_decorator.rb
pact_broker-2.36.1 lib/pact_broker/api/decorators/integration_decorator.rb
pact_broker-2.36.0 lib/pact_broker/api/decorators/integration_decorator.rb
pact_broker-2.35.0 lib/pact_broker/api/decorators/integration_decorator.rb
pact_broker-2.34.0 lib/pact_broker/api/decorators/integration_decorator.rb
pact_broker-2.33.0 lib/pact_broker/api/decorators/integration_decorator.rb
pact_broker-2.32.0 lib/pact_broker/api/decorators/integration_decorator.rb