26 lines
915 B
Ruby
26 lines
915 B
Ruby
cask 'inspec' do
|
|
version '2.0.32-1'
|
|
sha256 '5a1db8e21e02f22e25482e2fee62c8b1c0f7e1c2fd978db37f4af406f6029fd7'
|
|
|
|
# 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: 'b436bb4ff68fb2a53a19fa94f81b2e18436f4f449d8f07dff537ba15ebe91887'
|
|
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
|