homebrew-cask/Casks/inspec.rb

26 lines
915 B
Ruby

cask 'inspec' do
version '2.1.59-1'
sha256 '6fce3fb0e8d5c142f160f4aba234220ab118404f20ade0c634bc0bcfebb04e4c'
# 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: 'c38f49b4429a80bed55a3e942eb60b4d142f8809ae3584fbefde2f4a01c8344c'
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