homebrew-cask/Casks/inspec.rb

26 lines
916 B
Ruby

cask 'inspec' do
version '1.31.1-1'
sha256 '9a3fbc0560cdeaa89df1de261d58dd1d993caac74482c073b550ff3602374dd6'
# 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.12/inspec-#{version}.dmg"
appcast 'https://github.com/chef/inspec/releases.atom',
checkpoint: '3727b9ad3e4b0e0db23aa01da65d7a127e30a34106ee9116c87dede7d87502a5'
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 delete: '~/.inspec/'
end