mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
CFINSPEC-82: Remove ppa resource deprecation for backward compatibility
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
This commit is contained in:
parent
273a081247
commit
dfb1ef817e
2 changed files with 12 additions and 11 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue