CFINSPEC-82: Remove ppa resource deprecation for backward compatibility

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
This commit is contained in:
Sonu Saha 2022-03-17 11:11:41 +05:30
parent 273a081247
commit dfb1ef817e
2 changed files with 12 additions and 11 deletions

View file

@ -83,11 +83,6 @@
"suffix": "This resource was removed in InSpec 4.0.",
"comment": "Needed for ServerSpec compatibility"
},
"resource_ppa": {
"action": "exit",
"suffix": "This resource was removed in InSpec 4.0.",
"comment": "Needed for ServerSpec compatibility"
},
"resource_script": {
"action": "exit",
"suffix": "This resource will be removed in InSpec 4.0"

View file

@ -135,19 +135,25 @@ module Inspec::Resources
class PpaRepository < AptRepository
name "ppa"
desc "Use the ppa InSpec audit resource to verify PPA repositories on the Debian-based linux platforms."
example <<~EXAMPLE
describe ppa('ubuntu-wine/ppa') do
it { should exist }
it { should be_enabled }
end
describe ppa('ppa:ubuntu-wine/ppa') do
it { should exist }
it { should be_enabled }
end
EXAMPLE
def exists?
deprecated
super()
end
def enabled?
deprecated
super()
end
def deprecated
Inspec.deprecate(:resource_ppa, "The `ppa` resource is deprecated. Please use `apt`")
end
end
end