Class: PactBroker::Client::BaseCommand
- Inherits:
-
Object
- Object
- PactBroker::Client::BaseCommand
- Includes:
- HalClientMethods
- Defined in:
- lib/pact_broker/client/base_command.rb
Direct Known Subclasses
PactBroker::Client::Branches::DeleteBranch, Deployments::RecordRelease, Deployments::RecordSupportEnded, Deployments::RecordUndeployment, Environments::EnvironmentCommand, Matrix::Query, Pacticipants2::Create, Pacticipants2::Describe, Pacticipants2::List, Versions::Create, Pactflow::Client::ProviderContracts::Publish, Pactflow::Client::ProviderContracts::PublishTheOldWay
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(params, options, pact_broker_client_options) ⇒ BaseCommand
constructor
A new instance of BaseCommand.
Methods included from HalClientMethods
#create_entry_point, #create_http_client, #create_index_entry_point, #index_entry_point, #index_resource, #is_pactflow?, #pact_broker_name
Constructor Details
#initialize(params, options, pact_broker_client_options) ⇒ BaseCommand
Returns a new instance of BaseCommand.
16 17 18 19 20 21 |
# File 'lib/pact_broker/client/base_command.rb', line 16 def initialize(params, , ) @params = params @options = @pact_broker_base_url = .fetch(:pact_broker_base_url) @pact_broker_client_options = end |
Class Method Details
.call(params, options, pact_broker_client_options) ⇒ Object
12 13 14 |
# File 'lib/pact_broker/client/base_command.rb', line 12 def self.call(params, , ) new(params, , ).call end |
Instance Method Details
#call ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/pact_broker/client/base_command.rb', line 23 def call check_if_command_supported do_call rescue PactBroker::Client::Hal::ErrorResponseReturned => e handle_http_error(e) rescue PactBroker::Client::Error => e handle_ruby_error(e) rescue StandardError => e handle_ruby_error(e, verbose?) end |