homebrew-cask/Casks/inspec.rb

26 lines
915 B
Ruby

cask 'inspec' do
version '2.1.21-1'
sha256 'cc2945be4df5dee867e293a6a6753383189780aa4f464f29422898843a1f3497'
# 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: 'f17c168734bc29a6a7e92fc83bb9014df84dadbefb59442eb872c673e4811ea6'
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