Module: Hbc::Verify

Included in:
Installer
Defined in:
Library/Homebrew/cask/lib/hbc/verify.rb,
Library/Homebrew/cask/lib/hbc/verify/gpg.rb,
Library/Homebrew/cask/lib/hbc/verify/checksum.rb

Defined Under Namespace

Classes: Checksum, Gpg

Class Method Summary collapse

Class Method Details

.all(cask, downloaded_path) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'Library/Homebrew/cask/lib/hbc/verify.rb', line 15

def all(cask, downloaded_path)
  odebug "Verifying download"
  verifications = for_cask(cask)
  odebug "#{verifications.size} verifications defined", verifications
  verifications.each do |verification|
    odebug "Running verification of class #{verification}"
    verification.new(cask, downloaded_path).verify
  end
end

.for_cask(cask) ⇒ Object



25
26
27
28
29
30
31
# File 'Library/Homebrew/cask/lib/hbc/verify.rb', line 25

def for_cask(cask)
  odebug "Determining which verifications to run for Cask #{cask}"
  verifications.select do |verification|
    odebug "Checking for verification class #{verification}"
    verification.me?(cask)
  end
end

.verificationsObject



8
9
10
11
12
13
# File 'Library/Homebrew/cask/lib/hbc/verify.rb', line 8

def verifications
  [
    Hbc::Verify::Checksum
    # TODO: Hbc::Verify::Gpg
  ]
end