cookstyle 7.11.1 → 7.11.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/config/cookstyle.yml +7 -6
  3. data/lib/cookstyle/version.rb +1 -1
  4. data/lib/rubocop/cop/chef/correctness/block_guard_clause_string_only.rb +2 -2
  5. data/lib/rubocop/cop/chef/correctness/invalid_platform_metadata.rb +1 -1
  6. data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_family_helper.rb +1 -1
  7. data/lib/rubocop/cop/chef/correctness/node_normal.rb +2 -6
  8. data/lib/rubocop/cop/chef/correctness/node_normal_unless.rb +2 -6
  9. data/lib/rubocop/cop/chef/correctness/node_save.rb +1 -3
  10. data/lib/rubocop/cop/chef/correctness/notifies_action_not_symbol.rb +1 -1
  11. data/lib/rubocop/cop/chef/correctness/openssl_password_helpers.rb +1 -1
  12. data/lib/rubocop/cop/chef/correctness/resource_sets_internal_properties.rb +1 -3
  13. data/lib/rubocop/cop/chef/correctness/scoped_file_exist.rb +1 -1
  14. data/lib/rubocop/cop/chef/correctness/tmp_path.rb +1 -1
  15. data/lib/rubocop/cop/chef/deprecation/chef_handler_recipe.rb +2 -2
  16. data/lib/rubocop/cop/chef/deprecation/chef_handler_supports.rb +1 -1
  17. data/lib/rubocop/cop/chef/deprecation/chef_rest.rb +1 -1
  18. data/lib/rubocop/cop/chef/deprecation/chef_rewind.rb +2 -2
  19. data/lib/rubocop/cop/chef/deprecation/chef_shellout.rb +2 -4
  20. data/lib/rubocop/cop/chef/deprecation/chefdk_generators.rb +1 -1
  21. data/lib/rubocop/cop/chef/deprecation/chefspec_legacy_runner.rb +1 -1
  22. data/lib/rubocop/cop/chef/deprecation/chocolatey_package_uninstall_action.rb +1 -1
  23. data/lib/rubocop/cop/chef/deprecation/depends_compat_resource.rb +1 -1
  24. data/lib/rubocop/cop/chef/deprecation/depends_partial_search.rb +1 -1
  25. data/lib/rubocop/cop/chef/deprecation/deprecated_chefspec_platform.rb +1 -1
  26. data/lib/rubocop/cop/chef/deprecation/deprecated_mixins.rb +1 -1
  27. data/lib/rubocop/cop/chef/deprecation/deprecated_platform_methods.rb +1 -1
  28. data/lib/rubocop/cop/chef/deprecation/deprecated_shellout_methods.rb +1 -1
  29. data/lib/rubocop/cop/chef/deprecation/deprecated_windows_version_check.rb +1 -1
  30. data/lib/rubocop/cop/chef/deprecation/deprecated_yum_repository_actions.rb +1 -1
  31. data/lib/rubocop/cop/chef/deprecation/deprecated_yum_repository_properties.rb +1 -1
  32. data/lib/rubocop/cop/chef/deprecation/easy_install.rb +1 -1
  33. data/lib/rubocop/cop/chef/deprecation/eol_audit_mode.rb +2 -2
  34. data/lib/rubocop/cop/chef/deprecation/epic_fail.rb +2 -2
  35. data/lib/rubocop/cop/chef/deprecation/erl_call.rb +1 -1
  36. data/lib/rubocop/cop/chef/deprecation/{ use_automatic_resource_name.rb → use_automatic_resource_name.rb} +0 -0
  37. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfa1f90dbcd8306cfac33378dc6b1307538dc6284e3f6dc97c531d8c500bebb6
4
- data.tar.gz: f8906785afaf49726de9e324f85057dd2540b05361a6a8b654873152b8313cb2
3
+ metadata.gz: 2da2b22b8cbec39156ae6f213739615fac386c943b19062270624f49733692eb
4
+ data.tar.gz: e294eddf92cf044629ad569af5f2cef1775044c599952a546529212e79bceb45
5
5
  SHA512:
6
- metadata.gz: f9524392df8ec6b820d81a9568928eb6ef5c27c4f75c5b9faca728b59b20923bf3e25084121df974dc72bcfc03c6063fe9e3d5f7957f57dc0719efa50fafeba8
7
- data.tar.gz: 5659fd48d73fee64ab4301681e0aacbe0fda1698f8084650fa20d60835416b3b64799098a7b022ab49f403502b2cac5a8802db1e924ea25b638da037d1a1a313
6
+ metadata.gz: cf63786305a68c636fabd90f597b8f11e3936cf70180899435d3a520d45227fdfd007fe862facbe7a584413bcf6d00b8cc43fa3a56ec7ef986a96a5f7b798673
7
+ data.tar.gz: fef011328aae08ad9bf62a8f6b772da9a20e28baa8ef1c4fbcdd251269a9d62f2e15df1f79794c1fc84fcfb7c4c341fad910ff1e2689a4446a763fae254f889b
data/config/cookstyle.yml CHANGED
@@ -221,7 +221,7 @@ Chef/Correctness/MetadataMissingName:
221
221
  - '**/metadata.rb'
222
222
 
223
223
  Chef/Correctness/BlockGuardWithOnlyString:
224
- Description: A resource guard (not_if/only_if) that is a string should not be wrapped in {}. Wrapping a guard string in {} causes it to be executed as Ruby code which will always returns true instead of a shell command that will actually run.
224
+ Description: A resource guard (not_if/only_if) that is a string should not be wrapped in {}. Wrapping a guard string in {} causes it to be executed as Ruby code which will always return true instead of a shell command that will actually run.
225
225
  StyleGuide: 'chef_correctness_blockguardwithonlystring'
226
226
  Enabled: true
227
227
  VersionAdded: '5.2.0'
@@ -584,7 +584,7 @@ Chef/Deprecations/NodeSetUnless:
584
584
  - '**/Berksfile'
585
585
 
586
586
  Chef/Deprecations/EpicFail:
587
- Description: Use ignore_failure method instead of the deprecated epic_fail method
587
+ Description: Use `ignore_failure` in resources to continue when failures occur instead of the deprecated `epic_fail` property
588
588
  StyleGuide: 'chef_deprecations_epicfail'
589
589
  Enabled: true
590
590
  VersionAdded: '5.1.0'
@@ -843,7 +843,7 @@ Chef/Deprecations/DeprecatedYumRepositoryProperties:
843
843
  - '**/Berksfile'
844
844
 
845
845
  Chef/Deprecations/EOLAuditModeUsage:
846
- Description: The beta Audit Mode feature in Chef Infra Client was removed in Chef Infra Client 15.0. Users should instead use InSpec and the audit cookbook. See https://www.inspec.io/ for more information.
846
+ Description: The beta Audit Mode feature in Chef Infra Client was removed in Chef Infra Client 15.0.
847
847
  StyleGuide: 'chef_deprecations_eolauditmodeusage'
848
848
  Enabled: true
849
849
  VersionAdded: '5.10.0'
@@ -1071,7 +1071,7 @@ Chef/Deprecations/ChefDKGenerators:
1071
1071
  - '**/Berksfile'
1072
1072
 
1073
1073
  Chef/Deprecations/ChefHandlerRecipe:
1074
- Description: There is no need to include the empty and deprecated chef_handler::default recipe in order to use the chef_handler resource.
1074
+ Description: There is no need to include the empty and deprecated chef_handler::default recipe to use the chef_handler resource.
1075
1075
  StyleGuide: 'chef_deprecations_chefhandlerrecipe'
1076
1076
  Enabled: true
1077
1077
  VersionAdded: '6.12.0'
@@ -1107,7 +1107,7 @@ Chef/Deprecations/CookbooksDependsOnSelf:
1107
1107
  - '**/metadata.rb'
1108
1108
 
1109
1109
  Chef/Deprecations/ChefShellout:
1110
- Description: Don't use deprecated Chef::ShellOut which was removed in Chef Infra Client 13. Use Mixlib::ShellOut instead, which behaves identically.
1110
+ Description: Don't use the deprecated `Chef::ShellOut` class which was removed in Chef Infra Client 13. Use the `Mixlib::ShellOut` class instead, which behaves identically.
1111
1111
  StyleGuide: 'chef_deprecations_chefshellout'
1112
1112
  Enabled: true
1113
1113
  VersionAdded: '6.17.0'
@@ -2247,8 +2247,9 @@ Style/Proc:
2247
2247
  Enabled: true
2248
2248
  Style/RaiseArgs:
2249
2249
  Enabled: true
2250
+ # disabled for now as this breaks ruby_block resources
2250
2251
  Style/RedundantBegin:
2251
- Enabled: true
2252
+ Enabled: false
2252
2253
  Style/RedundantException:
2253
2254
  Enabled: true
2254
2255
  Style/RedundantFreeze:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Cookstyle
3
- VERSION = "7.11.1" # rubocop: disable Style/StringLiterals
3
+ VERSION = "7.11.3" # rubocop: disable Style/StringLiterals
4
4
  RUBOCOP_VERSION = '1.14.0'
5
5
  end
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # A resource guard (not_if/only_if) that is a string should not be wrapped in `{}`. Wrapping a guard string in {} causes it to be executed as Ruby code which will always returns true instead of a shell command that will actually run.
22
+ # A resource guard (not_if/only_if) that is a string should not be wrapped in `{}`. Wrapping a guard string in {} causes it to be executed as Ruby code which will always return true instead of a shell command that will actually run.
23
23
  #
24
24
  # @example
25
25
  #
@@ -40,7 +40,7 @@ module RuboCop
40
40
  class BlockGuardWithOnlyString < Base
41
41
  extend AutoCorrector
42
42
 
43
- MSG = 'A resource guard (not_if/only_if) that is a string should not be wrapped in {}. Wrapping a guard string in {} causes it to be executed as Ruby code which will always returns true instead of a shell command that will actually run.'
43
+ MSG = 'A resource guard (not_if/only_if) that is a string should not be wrapped in {}. Wrapping a guard string in {} causes it to be executed as Ruby code which will always return true instead of a shell command that will actually run.'
44
44
 
45
45
  def_node_matcher :block_guard_with_only_string?, <<-PATTERN
46
46
  (block (send nil? ${:not_if :only_if}) (args) (str $_) )
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Correctness
23
- # metadata.rb supports methods should contain valid platforms. See [Infra Language: Platform](https://docs.chef.io/infra_language/checking_platforms/#platform-values) for a list of many common platform values.
23
+ # metadata.rb `supports` methods should contain valid platforms. See [Infra Language: Platform](https://docs.chef.io/infra_language/checking_platforms/#platform-values) for a list of many common platform values.
24
24
  #
25
25
  # @example
26
26
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Pass valid platforms families to the value_for_platform_family helper. See [Infra Language: Platform Family](https://docs.chef.io/infra_language/checking_platforms/#platform_family-values) for a complete list of platform families.
22
+ # Pass valid platform families to the value_for_platform_family helper. See [Infra Language: Platform Family](https://docs.chef.io/infra_language/checking_platforms/#platform_family-values) for a complete list of platform families.
23
23
  #
24
24
  # @example
25
25
  #
@@ -18,13 +18,9 @@ module RuboCop
18
18
  module Cop
19
19
  module Chef
20
20
  module Correctness
21
- # Normal attributes are discouraged since their semantics differ importantly from the
22
- # default and override levels. Their values persist in the node object even after
23
- # all code referencing them has been deleted, unlike default and override.
21
+ # Normal attributes are discouraged since their semantics differ importantly from the default and override levels. Their values persist in the node object even after all code referencing them has been deleted, unlike default and override.
24
22
  #
25
- # Code should be updated to use default or override levels, but this will change
26
- # attribute merging behavior so needs to be validated manually and force_default or
27
- # force_override levels may need to be used in recipe code.
23
+ # Code should be updated to use default or override levels, but this will change attribute merging behavior so needs to be validated manually and force_default or force_override levels may need to be used in recipe code.
28
24
  #
29
25
  # @example
30
26
  #
@@ -18,13 +18,9 @@ module RuboCop
18
18
  module Cop
19
19
  module Chef
20
20
  module Correctness
21
- # Normal attributes are discouraged since their semantics differ importantly from the
22
- # default and override levels. Their values persist in the node object even after
23
- # all code referencing them has been deleted, unlike default and override.
21
+ # Normal attributes are discouraged since their semantics differ importantly from the default and override levels. Their values persist in the node object even after all code referencing them has been deleted, unlike default and override.
24
22
  #
25
- # Code should be updated to use default or override levels, but this will change
26
- # attribute merging behavior so needs to be validated manually and force_default or
27
- # force_override levels may need to be used in recipe code.
23
+ # Code should be updated to use default or override levels, but this will change attribute merging behavior so needs to be validated manually and force_default or force_override levels may need to be used in recipe code.
28
24
  #
29
25
  # @example
30
26
  #
@@ -19,9 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Don't use node.save to save partial node data to the Chef Infra Server mid-run unless it's
23
- # absolutely necessary. Node.save can result in failed Chef Infra runs appearing in search and
24
- # increases load on the Chef Infra Server."
22
+ # Don't use node.save to save partial node data to the Chef Infra Server mid-run unless it's a requirement of cookbook design that can't be avoided. Node.save can result in failed Chef Infra runs appearing in search and increases load on the Chef Infra Server."
25
23
  #
26
24
  # @example
27
25
  #
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Correctness
23
- # When notifying or subscribing an action within a resource the action should always be a symbol. In Chef Infra Client releases before 14.0 this may result in double notification.
23
+ # When notifying or subscribing actions within a resource the action should always be a symbol. In Chef Infra Client releases before 14.0, this may result in double notification.
24
24
  #
25
25
  # @example
26
26
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # The openSSL cookbook provides a deprecated `secure_password` helper in the `Opscode::OpenSSL::Password` class, which should not longer be used. This helper would generate a random password that would be used when a data bag or attribute was no present. The practice of generating passwords to be stored on the node is bad security as it exposes the password to anyone that can view the nodes, and deleting a node deletes the password. Passwords should be retrieved from a secure source for use in cookbooks.
22
+ # The OpenSSL cookbook provides a deprecated `secure_password` helper in the `Opscode::OpenSSL::Password` class, which should no longer be used. This helper would generate a random password that would be used when a data bag or attribute was no present. The practice of generating passwords to be stored on the node is bad security as it exposes the password to anyone that can view the nodes, and deleting a node deletes the password. Passwords should be retrieved from a secure source for use in cookbooks.
23
23
  #
24
24
  # #### incorrect
25
25
  # ::Chef::Recipe.send(:include, Opscode::OpenSSL::Password)
@@ -19,9 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Chef Infra Client uses properties in several resources to track state. These
23
- # should not be set in recipes as they break the internal workings of the Chef
24
- # Infra Client
22
+ # Chef Infra Client uses properties in several resources to track state. These should not be set in recipes as they break the internal workings of the Chef Infra Client
25
23
  #
26
24
  # @example
27
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Scope file exist to access the correct File class by using ::File.exist? not File.exist?.
22
+ # Scope file exist to access the correct `File` class by using `::File.exist?` not `File.exist?`.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Use file_cache_path rather than hard-coding tmp paths
22
+ # Use file_cache_path rather than hard-coding system temp paths
23
23
  #
24
24
  # @example downloading a large file into /tmp/
25
25
  #
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # There is no need to include the empty and deprecated chef_handler::default recipe in order to use the chef_handler resource
23
+ # There is no need to include the empty and deprecated chef_handler::default recipe to use the chef_handler resource
24
24
  #
25
25
  # @example
26
26
  #
@@ -32,7 +32,7 @@ module RuboCop
32
32
  include RangeHelp
33
33
  extend AutoCorrector
34
34
 
35
- MSG = 'There is no need to include the empty and deprecated chef_handler::default recipe in order to use the chef_handler resource'
35
+ MSG = 'There is no need to include the empty and deprecated chef_handler::default recipe to use the chef_handler resource'
36
36
  RESTRICT_ON_SEND = [:include_recipe].freeze
37
37
 
38
38
  def_node_matcher :chef_handler_recipe?, <<-PATTERN
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # Use the type property instead of the deprecated supports property in the chef_handler resource. The supports property was removed in chef_handler cookbook version 3.0 (June 2017) and Chef Infra Client 14.0.
23
+ # Use the type `property` instead of the deprecated `supports` property in the `chef_handler` resource. The `supports` property was removed in `chef_handler` cookbook version 3.0 (June 2017) and Chef Infra Client 14.0.
24
24
  #
25
25
  # @example
26
26
  #
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # Chef::REST was removed in Chef Infra Client 13.
23
+ # The `Chef::REST` class was removed in Chef Infra Client 13.
24
24
  #
25
25
  # @example
26
26
  #
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # Use delete_resource / edit_resource introduced in Chef Infra Client 12.10 instead of functionality in the deprecated chef-rewind gem
23
+ # Use `delete_resource` or `edit_resource` helpers introduced in Chef Infra Client 12.10 instead of functionality in the deprecated `chef-rewind` gem
24
24
  #
25
25
  # @example
26
26
  #
@@ -48,7 +48,7 @@ module RuboCop
48
48
  unwind: 'delete_resource',
49
49
  }.freeze
50
50
 
51
- MSG = 'Use delete_resource / edit_resource introduced in Chef Infra Client 12.10 instead of functionality in the deprecated chef-rewind gem'
51
+ MSG = 'Use delete_resource or edit_resource helpers introduced in Chef Infra Client 12.10 instead of functionality in the deprecated chef-rewind gem'
52
52
  RESTRICT_ON_SEND = [:chef_gem, :require, :rewind, :unwind].freeze
53
53
 
54
54
  def_node_matcher :rewind_gem_install?, <<-PATTERN
@@ -20,9 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # Don't use deprecated Chef::ShellOut which was removed in Chef Infra Client 13.
24
- # Use Mixlib::ShellOut instead, which behaves identically or convert to the shell_out
25
- # helper provided in chef-utils.
23
+ # Don't use the deprecated `Chef::ShellOut` class which was removed in Chef Infra Client 13. Use the `Mixlib::ShellOut` class instead, which behaves identically or convert to the simpler `shell_out` helper.
26
24
  #
27
25
  # @example
28
26
  #
@@ -40,7 +38,7 @@ module RuboCop
40
38
  include RangeHelp
41
39
  extend AutoCorrector
42
40
 
43
- MSG = "Don't use deprecated Chef::ShellOut which was removed in Chef Infra Client 13. Use Mixlib::ShellOut instead, which behaves identically."
41
+ MSG = "Don't use the deprecated `Chef::ShellOut` class which was removed in Chef Infra Client 13. Use the `Mixlib::ShellOut` class instead, which behaves identically."
44
42
  RESTRICT_ON_SEND = [:new, :require, :include].freeze
45
43
 
46
44
  def_node_matcher :include_shellout?, <<-PATTERN
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # Chef Workstation 0.8 and later renamed the ChefDK module used when writing custom cookbook generators from ChefDK to ChefCLI. For compatibility with the latest Chef Workstation releases you'll need to reference the new class names.
23
+ # Chef Workstation 0.8 and later renamed the `ChefDK` module used when writing custom cookbook generators from `ChefDK` to `ChefCLI`. For compatibility with the latest Chef Workstation releases you'll need to reference the new class names.
24
24
  #
25
25
  # @example
26
26
  #
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # Use ChefSpec::SoloRunner or ChefSpec::ServerRunner instead of the deprecated ChefSpec::Runner. These new runners were introduced in ChefSpec 4.1 (Oct 2014).
23
+ # Use `ChefSpec::SoloRunner` or `ChefSpec::ServerRunner` instead of the deprecated `ChefSpec::Runner`. These new runners were introduced in ChefSpec 4.1 (Oct 2014).
24
24
  #
25
25
  # @example
26
26
  #
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # Use the :remove action in the chocolatey_package resource instead of :uninstall which was removed in Chef Infra Client 14+
23
+ # Use the `:remove` action in the `chocolatey_package` resource instead of `:uninstall` which was removed in Chef Infra Client 14+.
24
24
  #
25
25
  # @example
26
26
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Deprecations
22
- # Don't depend on the deprecated compat_resource cookbook made obsolete by Chef Infra Client 12.19+
22
+ # Don't depend on the deprecated `compat_resource` cookbook made obsolete by Chef Infra Client 12.19+.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Deprecations
22
- # Don't depend on the partial_search cookbook made obsolete by Chef Infra Client 13
22
+ # Don't depend on the `partial_search` cookbook made obsolete by Chef Infra Client 13.
23
23
  #
24
24
  # @example
25
25
  #
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # Use currently supported platforms in ChefSpec listed at https://github.com/chefspec/fauxhai/blob/master/PLATFORMS.md. Fauxhai / ChefSpec will perform fuzzy matching on platform version so it's always best to be less specific ie. 10 instead of 10.3
23
+ # Use currently supported platforms in ChefSpec listed at https://github.com/chefspec/fauxhai/blob/master/PLATFORMS.md. Fauxhai / ChefSpec will perform fuzzy matching on platform version values so it's always best to be less specific ie. 10 instead of 10.3
24
24
  #
25
25
  # @example
26
26
  #
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # Don't use deprecated Mixins no longer included in Chef Infra Client 14 and later
23
+ # Don't use deprecated Mixins no longer included in Chef Infra Client 14 and later.
24
24
  #
25
25
  # @example
26
26
  #
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # Use provider_for_action or provides instead of the deprecated Chef::Platform methods in resources, which were removed in Chef Infra Client 13.
23
+ # Use `provider_for_action` or provides instead of the deprecated `Chef::Platform` methods in resources, which were removed in Chef Infra Client 13.
24
24
  #
25
25
  # @example
26
26
  #
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # The large number of shell_out helper methods in Chef Infra Client has been reduced to just shell_out and shell_out! methods. The legacy methods were removed in Chef Infra Client and cookbooks using these legacy helpers will need to be updated.
23
+ # The large number of `shell_out` helper methods in Chef Infra Client has been reduced to just `shell_out` and `shell_out!` methods. The legacy methods were removed in Chef Infra Client and cookbooks using these legacy helpers will need to be updated.
24
24
  #
25
25
  # @example
26
26
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Deprecations
22
- # Don't use the deprecated older_than_win_2012_or_8? helper. Windows versions before 2012 and 8 are now end of life and this helper will always return false.
22
+ # Don't use the deprecated `older_than_win_2012_or_8?` helper. Windows versions before 2012 and 8 are now end of life and this helper will always return false.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Deprecations
22
- # With the release of Chef Infra Client 12.14 and the yum cookbook 3.0 the actions the yum_repository resource actions were renamed. The `add` action became `create` and `delete` became `remove` to better match other resources in Chef Infra Client.
22
+ # With the release of Chef Infra Client 12.14 and the yum cookbook 3.0 the actions the `yum_repository` resource actions were renamed. The `add` action became `create` and `delete` became `remove` to better match other resources in Chef Infra Client.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Deprecations
22
- # With the release of Chef Infra Client 12.14 and the yum cookbook 3.0 several properties in the yum_repository resource were renamed. url -> baseurl, keyurl -> gpgkey, and mirrorexpire -> mirror_expire.
22
+ # With the release of Chef Infra Client 12.14 and the yum cookbook 3.0 several properties in the `yum_repository` resource were renamed. `url` -> `baseurl`, `keyurl` -> `gpgkey`, and `mirrorexpire` -> `mirror_expire`.
23
23
  #
24
24
  # @example
25
25
  #
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # Don't use the deprecated easy_install resource removed in Chef Infra Client 13
23
+ # Don't use the deprecated easy_install resource removed in Chef Infra Client 13.
24
24
  #
25
25
  # @example
26
26
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Deprecations
22
- # The beta Audit Mode for Chef Infra Client was removed in Chef Infra Client 15.0. Users should instead use InSpec and the audit cookbook. See https://www.inspec.io/ for more information.
22
+ # The beta Audit Mode for Chef Infra Client was removed in Chef Infra Client 15.0. Users should instead use InSpec and the audit cookbook or the Compliance Phase introduced in Chef Infra Client 17. See https://www.inspec.io/ for more information.
23
23
  #
24
24
  # @example
25
25
  #
@@ -33,7 +33,7 @@ module RuboCop
33
33
  # end
34
34
 
35
35
  class EOLAuditModeUsage < Base
36
- MSG = 'The beta Audit Mode feature in Chef Infra Client was removed in Chef Infra Client 15.0. Users should instead use InSpec and the audit cookbook. See https://www.inspec.io/ for more information.'
36
+ MSG = 'The beta Audit Mode feature in Chef Infra Client was removed in Chef Infra Client 15.0.'
37
37
  RESTRICT_ON_SEND = [:control_group].freeze
38
38
 
39
39
  def_node_matcher :control_group?, '(send nil? :control_group ...)'
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # Make sure ignore_failure is used instead of epic_fail
23
+ # Use `ignore_failure` in resources to continue when failures occur instead of the deprecated `epic_fail` property.
24
24
  #
25
25
  # @example
26
26
  #
@@ -37,7 +37,7 @@ module RuboCop
37
37
  class EpicFail < Base
38
38
  extend AutoCorrector
39
39
 
40
- MSG = 'Use ignore_failure method instead of the deprecated epic_fail method'
40
+ MSG = 'Use `ignore_failure` in resources to continue when failures occur instead of the deprecated `epic_fail` property'
41
41
  RESTRICT_ON_SEND = [:epic_fail].freeze
42
42
 
43
43
  def on_send(node)
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Deprecations
23
- # Don't use the deprecated erl_call resource
23
+ # Don't use the deprecated `erl_call` resource removed in Chef Infra Client 13."
24
24
  #
25
25
  # @example
26
26
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cookstyle
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.11.1
4
+ version: 7.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom May
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-05-05 00:00:00.000000000 Z
12
+ date: 2021-05-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubocop
@@ -85,7 +85,6 @@ files:
85
85
  - lib/rubocop/cop/chef/correctness/service_resource.rb
86
86
  - lib/rubocop/cop/chef/correctness/supports_must_be_float.rb
87
87
  - lib/rubocop/cop/chef/correctness/tmp_path.rb
88
- - lib/rubocop/cop/chef/deprecation/ use_automatic_resource_name.rb
89
88
  - lib/rubocop/cop/chef/deprecation/cb_depends_on_self.rb
90
89
  - lib/rubocop/cop/chef/deprecation/chef_handler_recipe.rb
91
90
  - lib/rubocop/cop/chef/deprecation/chef_handler_supports.rb
@@ -145,6 +144,7 @@ files:
145
144
  - lib/rubocop/cop/chef/deprecation/ruby_block_create_action.rb
146
145
  - lib/rubocop/cop/chef/deprecation/run_command_helper.rb
147
146
  - lib/rubocop/cop/chef/deprecation/search_uses_positional_parameters.rb
147
+ - lib/rubocop/cop/chef/deprecation/use_automatic_resource_name.rb
148
148
  - lib/rubocop/cop/chef/deprecation/use_inline_resources.rb
149
149
  - lib/rubocop/cop/chef/deprecation/use_yaml_dump.rb
150
150
  - lib/rubocop/cop/chef/deprecation/user_supports_property.rb