Class: Gem::Guardian::VerificationResult
- Inherits:
-
Data
- Object
- Data
- Gem::Guardian::VerificationResult
- Defined in:
- lib/gem/guardian/verifier.rb
Overview
Result object for a single verification attempt.
Instance Attribute Summary collapse
-
#actual_sha256 ⇒ Object
readonly
Returns the value of attribute actual_sha256.
-
#artifact_path ⇒ Object
readonly
Returns the value of attribute artifact_path.
-
#checksum_source ⇒ Object
readonly
Returns the value of attribute checksum_source.
-
#dependency ⇒ Object
readonly
Returns the value of attribute dependency.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#expected_sha256 ⇒ Object
readonly
Returns the value of attribute expected_sha256.
-
#registry_checksum_provider ⇒ Object
readonly
Returns the value of attribute registry_checksum_provider.
-
#registry_checksum_uri ⇒ Object
readonly
Returns the value of attribute registry_checksum_uri.
-
#registry_sha256 ⇒ Object
readonly
Returns the value of attribute registry_sha256.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#ok? ⇒ Boolean
Indicates whether the verification result is successful.
Instance Attribute Details
#actual_sha256 ⇒ Object (readonly)
Returns the value of attribute actual_sha256
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/gem/guardian/verifier.rb', line 28 VerificationResult = Data.define(:dependency, :expected_sha256, :actual_sha256, :artifact_path, :status, :error, :checksum_source, :registry_sha256, :registry_checksum_provider, :registry_checksum_uri) do # Indicates whether the verification result is successful. # # For +:artifact+ results, success means the artifact digest was recorded, # not that an independent checksum comparison occurred. # # @return [Boolean] +true+ when +status+ is +:ok+ def ok? status == :ok end end |
#artifact_path ⇒ Object (readonly)
Returns the value of attribute artifact_path
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/gem/guardian/verifier.rb', line 28 VerificationResult = Data.define(:dependency, :expected_sha256, :actual_sha256, :artifact_path, :status, :error, :checksum_source, :registry_sha256, :registry_checksum_provider, :registry_checksum_uri) do # Indicates whether the verification result is successful. # # For +:artifact+ results, success means the artifact digest was recorded, # not that an independent checksum comparison occurred. # # @return [Boolean] +true+ when +status+ is +:ok+ def ok? status == :ok end end |
#checksum_source ⇒ Object (readonly)
Returns the value of attribute checksum_source
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/gem/guardian/verifier.rb', line 28 VerificationResult = Data.define(:dependency, :expected_sha256, :actual_sha256, :artifact_path, :status, :error, :checksum_source, :registry_sha256, :registry_checksum_provider, :registry_checksum_uri) do # Indicates whether the verification result is successful. # # For +:artifact+ results, success means the artifact digest was recorded, # not that an independent checksum comparison occurred. # # @return [Boolean] +true+ when +status+ is +:ok+ def ok? status == :ok end end |
#dependency ⇒ Object (readonly)
Returns the value of attribute dependency
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/gem/guardian/verifier.rb', line 28 VerificationResult = Data.define(:dependency, :expected_sha256, :actual_sha256, :artifact_path, :status, :error, :checksum_source, :registry_sha256, :registry_checksum_provider, :registry_checksum_uri) do # Indicates whether the verification result is successful. # # For +:artifact+ results, success means the artifact digest was recorded, # not that an independent checksum comparison occurred. # # @return [Boolean] +true+ when +status+ is +:ok+ def ok? status == :ok end end |
#error ⇒ Object (readonly)
Returns the value of attribute error
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/gem/guardian/verifier.rb', line 28 VerificationResult = Data.define(:dependency, :expected_sha256, :actual_sha256, :artifact_path, :status, :error, :checksum_source, :registry_sha256, :registry_checksum_provider, :registry_checksum_uri) do # Indicates whether the verification result is successful. # # For +:artifact+ results, success means the artifact digest was recorded, # not that an independent checksum comparison occurred. # # @return [Boolean] +true+ when +status+ is +:ok+ def ok? status == :ok end end |
#expected_sha256 ⇒ Object (readonly)
Returns the value of attribute expected_sha256
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/gem/guardian/verifier.rb', line 28 VerificationResult = Data.define(:dependency, :expected_sha256, :actual_sha256, :artifact_path, :status, :error, :checksum_source, :registry_sha256, :registry_checksum_provider, :registry_checksum_uri) do # Indicates whether the verification result is successful. # # For +:artifact+ results, success means the artifact digest was recorded, # not that an independent checksum comparison occurred. # # @return [Boolean] +true+ when +status+ is +:ok+ def ok? status == :ok end end |
#registry_checksum_provider ⇒ Object (readonly)
Returns the value of attribute registry_checksum_provider
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/gem/guardian/verifier.rb', line 28 VerificationResult = Data.define(:dependency, :expected_sha256, :actual_sha256, :artifact_path, :status, :error, :checksum_source, :registry_sha256, :registry_checksum_provider, :registry_checksum_uri) do # Indicates whether the verification result is successful. # # For +:artifact+ results, success means the artifact digest was recorded, # not that an independent checksum comparison occurred. # # @return [Boolean] +true+ when +status+ is +:ok+ def ok? status == :ok end end |
#registry_checksum_uri ⇒ Object (readonly)
Returns the value of attribute registry_checksum_uri
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/gem/guardian/verifier.rb', line 28 VerificationResult = Data.define(:dependency, :expected_sha256, :actual_sha256, :artifact_path, :status, :error, :checksum_source, :registry_sha256, :registry_checksum_provider, :registry_checksum_uri) do # Indicates whether the verification result is successful. # # For +:artifact+ results, success means the artifact digest was recorded, # not that an independent checksum comparison occurred. # # @return [Boolean] +true+ when +status+ is +:ok+ def ok? status == :ok end end |
#registry_sha256 ⇒ Object (readonly)
Returns the value of attribute registry_sha256
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/gem/guardian/verifier.rb', line 28 VerificationResult = Data.define(:dependency, :expected_sha256, :actual_sha256, :artifact_path, :status, :error, :checksum_source, :registry_sha256, :registry_checksum_provider, :registry_checksum_uri) do # Indicates whether the verification result is successful. # # For +:artifact+ results, success means the artifact digest was recorded, # not that an independent checksum comparison occurred. # # @return [Boolean] +true+ when +status+ is +:ok+ def ok? status == :ok end end |
#status ⇒ Object (readonly)
Returns the value of attribute status
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/gem/guardian/verifier.rb', line 28 VerificationResult = Data.define(:dependency, :expected_sha256, :actual_sha256, :artifact_path, :status, :error, :checksum_source, :registry_sha256, :registry_checksum_provider, :registry_checksum_uri) do # Indicates whether the verification result is successful. # # For +:artifact+ results, success means the artifact digest was recorded, # not that an independent checksum comparison occurred. # # @return [Boolean] +true+ when +status+ is +:ok+ def ok? status == :ok end end |
Instance Method Details
#ok? ⇒ Boolean
Indicates whether the verification result is successful.
For +:artifact+ results, success means the artifact digest was recorded, not that an independent checksum comparison occurred.
37 38 39 |
# File 'lib/gem/guardian/verifier.rb', line 37 def ok? status == :ok end |