Class: PactBroker::Client::CanIDeploy
- Inherits:
-
Object
- Object
- PactBroker::Client::CanIDeploy
- Defined in:
- lib/pact_broker/client/can_i_deploy.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Result
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(version_selectors, matrix_options, options, pact_broker_client_options) ⇒ CanIDeploy
constructor
A new instance of CanIDeploy.
Constructor Details
#initialize(version_selectors, matrix_options, options, pact_broker_client_options) ⇒ CanIDeploy
Returns a new instance of CanIDeploy.
26 27 28 29 30 31 |
# File 'lib/pact_broker/client/can_i_deploy.rb', line 26 def initialize(version_selectors, , , ) @version_selectors = version_selectors @matrix_options = @options = @pact_broker_client_options = end |
Class Method Details
.call(version_selectors, matrix_options, options, pact_broker_client_options = {}) ⇒ Object
22 23 24 |
# File 'lib/pact_broker/client/can_i_deploy.rb', line 22 def self.call(version_selectors, , , ={}) new(version_selectors, , , ).call end |
Instance Method Details
#call ⇒ Object
33 34 35 36 37 |
# File 'lib/pact_broker/client/can_i_deploy.rb', line 33 def call create_result(fetch_matrix_with_retries) rescue StandardError => e Result.new(dry_run_or_false, for_dry_run(Term::ANSIColor.red("Error retrieving matrix. #{e.class} - #{e.}") + "\n#{e.backtrace.join("\n")}")) end |