Class: DependencyProxy::Manifest

Inherits:
ApplicationRecord show all
Includes:
EachBatch, FileStoreMounter, Packages::Destructible, TtlExpirable, UpdateNamespaceStatistics
Defined in:
app/models/dependency_proxy/manifest.rb

Constant Summary collapse

MAX_FILE_SIZE =
10.megabytes.freeze
DIGEST_HEADER =
'Docker-Content-Digest'

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Class Method Summary collapse

Methods included from AfterCommitQueue

#run_after_commit, #run_after_commit_or_now

Methods included from TtlExpirable

#read!

Methods included from FileStoreMounter

#update_file_store

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from SensitiveSerializableHash

#serializable_hash

Class Method Details

.find_by_file_name_or_digest(file_name:, digest:) ⇒ Object


27
28
29
# File 'app/models/dependency_proxy/manifest.rb', line 27

def self.find_by_file_name_or_digest(file_name:, digest:)
  find_by(file_name: file_name) || find_by(digest: digest)
end