Sha256: b2295490a287e3cb7c82bc0b1c12f3a260396de48dcf4d35fb789862f62064e1

Contents?: true

Size: 774 Bytes

Versions: 45

Compression:

Stored size: 774 Bytes

Contents

require 'pact_broker/client/environments/environment_command'
require 'pact_broker/client/describe_text_formatter'

module PactBroker
  module Client
    module Environments
      class DescribeEnvironment < PactBroker::Client::Environments::EnvironmentCommand
        private

        def do_call
          existing_environment_resource!
          PactBroker::Client::CommandResult.new(true, result_message)
        end

        def result_message
          if json_output?
            existing_environment_resource.response.raw_body
          else
            properties = existing_environment_resource.response.body.except("_links", "_embedded")
            PactBroker::Client::DescribeTextFormatter.call(properties)
          end
        end
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

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