Class: RuboCop::Cop::Chef::Modernize::OpensslX509Resource
- Extended by:
- AutoCorrector, TargetChefVersion
- Defined in:
- lib/rubocop/cop/chef/modernize/openssl_x509_resource.rb
Overview
The openssl_x509 resource was renamed to openssl_x509_certificate in Chef Infra Client 14.4. The new resource name should be used.
Constant Summary collapse
- MSG =
'The openssl_x509 resource was renamed to openssl_x509_certificate in Chef Infra Client 14.4. The new resource name should be used.'
- RESTRICT_ON_SEND =
[:openssl_x509].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
Instance Method Details
#on_send(node) ⇒ Object
51 52 53 54 55 |
# File 'lib/rubocop/cop/chef/modernize/openssl_x509_resource.rb', line 51 def on_send(node) add_offense(node, severity: :refactor) do |corrector| corrector.replace(node, node.source.gsub(/^openssl_x509/, 'openssl_x509_certificate')) end end |