2016-10-28 02:35:45 +08:00
|
|
|
cask 'inspec' do
|
2017-07-18 03:42:52 +08:00
|
|
|
version '1.31.1-1'
|
|
|
|
sha256 '9a3fbc0560cdeaa89df1de261d58dd1d993caac74482c073b550ff3602374dd6'
|
2016-10-28 02:35:45 +08:00
|
|
|
|
|
|
|
# packages.chef.io was verified as official when first introduced to the cask
|
2016-12-11 17:51:45 +08:00
|
|
|
url "https://packages.chef.io/files/stable/inspec/#{version.major_minor_patch}/mac_os_x/10.12/inspec-#{version}.dmg"
|
2016-10-28 02:35:45 +08:00
|
|
|
appcast 'https://github.com/chef/inspec/releases.atom',
|
2017-07-18 03:42:52 +08:00
|
|
|
checkpoint: '3727b9ad3e4b0e0db23aa01da65d7a127e30a34106ee9116c87dede7d87502a5'
|
2016-10-28 02:35:45 +08:00
|
|
|
name 'InSpec by Chef'
|
2017-05-02 09:02:48 +08:00
|
|
|
homepage 'https://www.inspec.io/'
|
2016-10-28 02:35:45 +08:00
|
|
|
|
|
|
|
pkg "inspec-#{version}.pkg"
|
|
|
|
|
|
|
|
# As suggested in https://docs.chef.io/install_dk.html#mac-os-x
|
|
|
|
uninstall_postflight do
|
2016-11-18 23:51:50 +08:00
|
|
|
system_command '/usr/bin/find',
|
|
|
|
args: ['/usr/local/bin', '-lname', '/opt/inspec/*', '-delete'],
|
|
|
|
sudo: true
|
2016-10-28 02:35:45 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
uninstall pkgutil: 'com.getchef.pkg.inspec',
|
|
|
|
delete: '/opt/inspec/'
|
|
|
|
|
|
|
|
zap delete: '~/.inspec/'
|
|
|
|
end
|