Class: RuboCop::Cop::Chef::Modernize::SevenZipArchiveResource

Inherits:
Base
  • Object
show all
Extended by:
TargetChefVersion
Defined in:
lib/rubocop/cop/chef/modernize/seven_zip_archive.rb

Overview

Use the archive_file resource built into Chef Infra Client 15+ instead of the seven_zip_archive

Examples:


### incorrect
seven_zip_archive "C:\file.zip" do
  path 'C:\expand_here'
end

Constant Summary collapse

MSG =
'Use the archive_file resource built into Chef Infra Client 15+ instead of the seven_zip_archive'
RESTRICT_ON_SEND =
[:seven_zip_archive].freeze

Instance Method Summary collapse

Methods included from TargetChefVersion

minimum_target_chef_version, required_minimum_chef_version, support_target_chef_version?

Methods inherited from Base

#target_chef_version

Instance Method Details

#on_send(node) ⇒ Object



39
40
41
# File 'lib/rubocop/cop/chef/modernize/seven_zip_archive.rb', line 39

def on_send(node)
  add_offense(node, severity: :refactor)
end