Sha256: 41c5a732653d9ad4adf0042da954294dddba5aec8863b31a9fd63c71f9fdf51d

Contents?: true

Size: 585 Bytes

Versions: 9

Compression:

Stored size: 585 Bytes

Contents

require 'pact_broker/api/resources/base_resource'
require 'pact_broker/api/renderers/integrations_dot_renderer'

module PactBroker
  module Api
    module Resources
      class Integrations < BaseResource
        def content_types_provided
          [["text/vnd.graphviz", :to_dot]]
        end

        def allowed_methods
          ["GET", "OPTIONS"]
        end

        def to_dot
          PactBroker::Api::Renderers::IntegrationsDotRenderer.call(integrations)
        end

        def integrations
          pact_service.find_latest_pacts
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pact_broker-2.30.0 lib/pact_broker/api/resources/integrations.rb
pact_broker-2.29.0 lib/pact_broker/api/resources/integrations.rb
pact_broker-2.27.6 lib/pact_broker/api/resources/integrations.rb
pact_broker-2.27.5 lib/pact_broker/api/resources/integrations.rb
pact_broker-2.27.4 lib/pact_broker/api/resources/integrations.rb
pact_broker-2.27.3 lib/pact_broker/api/resources/integrations.rb
pact_broker-2.27.2 lib/pact_broker/api/resources/integrations.rb
pact_broker-2.27.0 lib/pact_broker/api/resources/integrations.rb
pact_broker-2.26.1 lib/pact_broker/api/resources/integrations.rb