homebrew-cask/Casks/inspec.rb

26 lines
915 B
Ruby

cask 'inspec' do
version '1.45.9-1'
sha256 '941eb14d6d4c8244e09ca5d36e3133acb96f7b7ed8bf74d2fb282aed287a7197'
# packages.chef.io was verified as official when first introduced to the cask
url "https://packages.chef.io/files/stable/inspec/#{version.major_minor_patch}/mac_os_x/10.13/inspec-#{version}.dmg"
appcast 'https://github.com/chef/inspec/releases.atom',
checkpoint: '258068d87ceb42345489532f668d14a631c37c50fed79659f5a0df8e9a1008a4'
name 'InSpec by Chef'
homepage 'https://www.inspec.io/'
pkg "inspec-#{version}.pkg"
# As suggested in https://docs.chef.io/install_dk.html#mac-os-x
uninstall_postflight do
system_command '/usr/bin/find',
args: ['/usr/local/bin', '-lname', '/opt/inspec/*', '-delete'],
sudo: true
end
uninstall pkgutil: 'com.getchef.pkg.inspec',
delete: '/opt/inspec/'
zap trash: '~/.inspec/'
end