Class: PactBroker::Pacts::VerifiablePactMessages
- Inherits:
-
Object
- Object
- PactBroker::Pacts::VerifiablePactMessages
- Extended by:
- Forwardable
- Defined in:
- lib/pact_broker/pacts/verifiable_pact_messages.rb
Constant Summary collapse
- READ_MORE =
"Read more at https://pact.io/pending"
Instance Method Summary collapse
- #inclusion_reason ⇒ Object
-
#initialize(verifiable_pact) ⇒ VerifiablePactMessages
constructor
A new instance of VerifiablePactMessages.
- #pending_reason ⇒ Object
Constructor Details
#initialize(verifiable_pact) ⇒ VerifiablePactMessages
Returns a new instance of VerifiablePactMessages.
10 11 12 |
# File 'lib/pact_broker/pacts/verifiable_pact_messages.rb', line 10 def initialize(verifiable_pact) @verifiable_pact = verifiable_pact end |
Instance Method Details
#inclusion_reason ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/pact_broker/pacts/verifiable_pact_messages.rb', line 14 def inclusion_reason if .any? version_text = .size == 1 ? "version" : "versions" "This pact is being verified because it is the pact for the latest #{version_text} of Foo tagged with #{}" else "This pact is being verified because it is the latest pact between #{consumer_name} and #{provider_name}." end end |
#pending_reason ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/pact_broker/pacts/verifiable_pact_messages.rb', line 23 def pending_reason if pending? "This pact is in pending state because it has not yet been successfully verified by #{}. If this verification fails, it will not cause the overall build to fail. #{READ_MORE}" else "This pact has previously been successfully verified by #{}. If this verification fails, it will fail the build. #{READ_MORE}" end end |