Class: Gem::Guardian::RegistryAudit::Result
- Inherits:
-
Data
- Object
- Data
- Gem::Guardian::RegistryAudit::Result
- Defined in:
- lib/gem/guardian/registry_audit.rb
Overview
Summary of a registry provenance audit.
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
-
#counts ⇒ Object
Count by provenance status.
-
#errors ⇒ Object
Entries that errored while checking provenance.
-
#mismatches ⇒ Object
Entries whose provenance checksum mismatched the artifact checksum.
-
#total ⇒ Object
Total audited entries.
-
#unsupported ⇒ Object
Entries without Trusted Publishing provenance support.
-
#verified ⇒ Object
Entries with verified provenance.
Instance Attribute Details
#results ⇒ Object (readonly)
Returns the value of attribute results
21 22 23 |
# File 'lib/gem/guardian/registry_audit.rb', line 21 def results @results end |
Instance Method Details
#counts ⇒ Object
Count by provenance status.
23 24 25 26 27 |
# File 'lib/gem/guardian/registry_audit.rb', line 23 def counts results.each_with_object(Hash.new(0)) do |result, memo| memo[result.provenance.status] += 1 end end |
#errors ⇒ Object
Entries that errored while checking provenance.
40 41 42 |
# File 'lib/gem/guardian/registry_audit.rb', line 40 def errors by_status(:error) end |
#mismatches ⇒ Object
Entries whose provenance checksum mismatched the artifact checksum.
45 46 47 |
# File 'lib/gem/guardian/registry_audit.rb', line 45 def mismatches by_status(:mismatch) end |
#total ⇒ Object
Total audited entries.
50 51 52 |
# File 'lib/gem/guardian/registry_audit.rb', line 50 def total results.size end |
#unsupported ⇒ Object
Entries without Trusted Publishing provenance support.
35 36 37 |
# File 'lib/gem/guardian/registry_audit.rb', line 35 def unsupported by_status(:unsupported) end |
#verified ⇒ Object
Entries with verified provenance.
30 31 32 |
# File 'lib/gem/guardian/registry_audit.rb', line 30 def verified by_status(:verified) end |