Sha256: 4e32ecce60c3d24aa1037b460ababcfb13c7f88517e4af09d9dab4cd87f0cac2

Contents?: true

Size: 1.05 KB

Versions: 25

Compression:

Stored size: 1.05 KB

Contents

require 'pact_broker/client/deployments/record_release'
require "pact_broker/client/hash_refinements"

module PactBroker
  module Client
    module Deployments
      class RecordDeployment < PactBroker::Client::Deployments::RecordRelease
        using PactBroker::Client::HashRefinements

        def initialize(params, options, pact_broker_client_options)
          super
          @application_instance = params.fetch(:application_instance)
        end

        private

        attr_reader :application_instance

        def action
          "deployment"
        end

        def action_relation_name
          "pb:record-deployment"
        end

        def record_action_request_body
          # for backwards compatibility with old broker
          { applicationInstance: application_instance, target: application_instance }.compact
        end

        def result_text_message
          if application_instance
            "#{super} (application instance #{application_instance})"
          else
            super
          end
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
pact_broker-client-1.77.0 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.76.2 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.76.1 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.76.0 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.75.4 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.75.3 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.75.1 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.75.0 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.74.0 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.73.0 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.72.0 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.71.0 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.70.0 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.69.0 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.68.0 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.67.0 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.66.1 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.66.0 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.65.0 lib/pact_broker/client/deployments/record_deployment.rb
pact_broker-client-1.64.0 lib/pact_broker/client/deployments/record_deployment.rb