cookstyle 7.9.0 → 7.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/cookstyle.yml +24 -7
- data/config/disable_all.yml +8 -0
- data/config/upstream.yml +47 -3
- data/cookstyle.gemspec +1 -1
- data/lib/cookstyle.rb +1 -1
- data/lib/cookstyle/version.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/block_guard_clause_string_only.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/invalid_default_action.rb +10 -11
- data/lib/rubocop/cop/chef/correctness/invalid_platform_metadata.rb +1 -2
- data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_family_helper.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_version_metadata.rb +0 -1
- data/lib/rubocop/cop/chef/correctness/lazy_eval_node_attribute_defaults.rb +0 -1
- data/lib/rubocop/cop/chef/correctness/metadata_missing_name.rb +9 -10
- data/lib/rubocop/cop/chef/correctness/node_normal.rb +2 -6
- data/lib/rubocop/cop/chef/correctness/node_normal_unless.rb +2 -6
- data/lib/rubocop/cop/chef/correctness/node_save.rb +1 -3
- data/lib/rubocop/cop/chef/correctness/notifies_action_not_symbol.rb +1 -2
- data/lib/rubocop/cop/chef/correctness/openssl_password_helpers.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/resource_sets_internal_properties.rb +1 -3
- data/lib/rubocop/cop/chef/correctness/resource_sets_name_property.rb +0 -1
- data/lib/rubocop/cop/chef/correctness/resource_with_none_action.rb +0 -1
- data/lib/rubocop/cop/chef/correctness/scoped_file_exist.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/service_resource.rb +0 -1
- data/lib/rubocop/cop/chef/correctness/supports_must_be_float.rb +0 -1
- data/lib/rubocop/cop/chef/correctness/tmp_path.rb +1 -2
- data/lib/rubocop/cop/chef/deprecation/cb_depends_on_self.rb +11 -12
- data/lib/rubocop/cop/chef/deprecation/chef_handler_recipe.rb +2 -3
- data/lib/rubocop/cop/chef/deprecation/chef_handler_supports.rb +1 -2
- data/lib/rubocop/cop/chef/deprecation/chef_rest.rb +1 -2
- data/lib/rubocop/cop/chef/deprecation/chef_rewind.rb +2 -3
- data/lib/rubocop/cop/chef/deprecation/chef_shellout.rb +2 -5
- data/lib/rubocop/cop/chef/deprecation/chef_sugar_helpers.rb +22 -23
- data/lib/rubocop/cop/chef/deprecation/chefdk_generators.rb +1 -2
- data/lib/rubocop/cop/chef/deprecation/cheffile.rb +2 -3
- data/lib/rubocop/cop/chef/deprecation/chefspec_coverage_report.rb +0 -1
- data/lib/rubocop/cop/chef/deprecation/chefspec_legacy_runner.rb +1 -2
- data/lib/rubocop/cop/chef/deprecation/chocolatey_package_uninstall_action.rb +1 -2
- data/lib/rubocop/cop/chef/deprecation/depends_compat_resource.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/depends_partial_search.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/deprecated_chefspec_platform.rb +1 -2
- data/lib/rubocop/cop/chef/deprecation/deprecated_mixins.rb +1 -2
- data/lib/rubocop/cop/chef/deprecation/deprecated_platform_methods.rb +1 -2
- data/lib/rubocop/cop/chef/deprecation/deprecated_shellout_methods.rb +1 -2
- data/lib/rubocop/cop/chef/deprecation/deprecated_windows_version_check.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/deprecated_yum_repository_actions.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/deprecated_yum_repository_properties.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/easy_install.rb +1 -2
- data/lib/rubocop/cop/chef/deprecation/eol_audit_mode.rb +2 -3
- data/lib/rubocop/cop/chef/deprecation/epic_fail.rb +2 -3
- data/lib/rubocop/cop/chef/deprecation/erl_call.rb +1 -2
- data/lib/rubocop/cop/chef/deprecation/execute_path_property.rb +0 -1
- data/lib/rubocop/cop/chef/deprecation/execute_relative_creates_without_cwd.rb +0 -1
- data/lib/rubocop/cop/chef/deprecation/hwrp_without_provides.rb +0 -1
- data/lib/rubocop/cop/chef/deprecation/hwrp_without_unified_mode_true.rb +86 -0
- data/lib/rubocop/cop/chef/deprecation/inherits_compat_resource.rb +0 -1
- data/lib/rubocop/cop/chef/deprecation/log_resource_notifications.rb +0 -1
- data/lib/rubocop/cop/chef/deprecation/macos_userdefaults_global_property.rb +0 -1
- data/lib/rubocop/cop/chef/deprecation/require_recipe.rb +0 -1
- data/lib/rubocop/cop/chef/deprecation/resource_without_unified_mode_true.rb +84 -0
- data/lib/rubocop/cop/chef/deprecation/ruby_27_keyword_argument_warnings.rb +0 -1
- data/lib/rubocop/cop/chef/deprecation/ruby_block_create_action.rb +0 -1
- data/lib/rubocop/cop/chef/deprecation/{ use_automatic_resource_name.rb → use_automatic_resource_name.rb} +0 -0
- data/lib/rubocop/cop/chef/deprecation/windows_package_installer_type_string.rb +0 -1
- data/lib/rubocop/cop/chef/effortless/berksfile.rb +0 -1
- data/lib/rubocop/cop/chef/effortless/chef_vault_used.rb +0 -2
- data/lib/rubocop/cop/chef/effortless/depends_chef_vault.rb +0 -2
- data/lib/rubocop/cop/chef/modernize/chef_gem_nokogiri.rb +0 -1
- data/lib/rubocop/cop/chef/modernize/foodcritic_comments.rb +0 -1
- data/lib/rubocop/cop/chef/modernize/includes_mixin_shellout.rb +0 -1
- data/lib/rubocop/cop/chef/modernize/libarchive_file.rb +0 -1
- data/lib/rubocop/cop/chef/modernize/resource_set_or_return.rb +0 -1
- data/lib/rubocop/cop/chef/modernize/resource_with_attributes.rb +0 -1
- data/lib/rubocop/cop/chef/modernize/seven_zip_archive.rb +0 -1
- data/lib/rubocop/cop/chef/modernize/shell_out_helper.rb +0 -1
- data/lib/rubocop/cop/chef/modernize/simplify_apt_ppa_setup.rb +0 -1
- data/lib/rubocop/cop/chef/modernize/unnecessary_mixlib_shellout_require.rb +0 -1
- data/lib/rubocop/cop/chef/modernize/zipfile_resource.rb +0 -1
- data/lib/rubocop/cop/chef/redundant/attribute_metadata.rb +0 -1
- data/lib/rubocop/cop/chef/redundant/conflicts_metadata.rb +0 -1
- data/lib/rubocop/cop/chef/redundant/custom_resource_with_allowed_actions.rb +0 -1
- data/lib/rubocop/cop/chef/redundant/grouping_metadata.rb +0 -1
- data/lib/rubocop/cop/chef/redundant/long_description_metadata.rb +0 -1
- data/lib/rubocop/cop/chef/redundant/multiple_platform_checks.rb +0 -1
- data/lib/rubocop/cop/chef/redundant/ohai_attribute_to_string.rb +0 -1
- data/lib/rubocop/cop/chef/redundant/provides_metadata.rb +0 -1
- data/lib/rubocop/cop/chef/redundant/recipe_metadata.rb +0 -1
- data/lib/rubocop/cop/chef/redundant/replaces_metadata.rb +0 -1
- data/lib/rubocop/cop/chef/redundant/suggests_metadata.rb +0 -1
- data/lib/rubocop/cop/chef/sharing/default_maintainer_metadata.rb +0 -1
- data/lib/rubocop/cop/chef/sharing/empty_metadata_field.rb +0 -1
- data/lib/rubocop/cop/chef/sharing/invalid_license_string.rb +0 -1
- data/lib/rubocop/cop/chef/style/attribute_keys.rb +0 -1
- data/lib/rubocop/cop/chef/style/chef_whaaat.rb +0 -1
- data/lib/rubocop/cop/chef/style/comment_sentence_spacing.rb +0 -1
- data/lib/rubocop/cop/chef/style/comments_copyright_format.rb +0 -1
- data/lib/rubocop/cop/chef/style/comments_default_copyright.rb +0 -1
- data/lib/rubocop/cop/chef/style/comments_format.rb +0 -1
- data/lib/rubocop/cop/chef/style/file_mode.rb +0 -1
- data/lib/rubocop/cop/chef/style/include_recipe_with_parentheses.rb +0 -1
- data/lib/rubocop/monkey_patches/{comment_config.rb → directive_comment.rb} +5 -4
- metadata +9 -7
@@ -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
|
#
|
@@ -15,12 +15,11 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
21
|
module Correctness
|
23
|
-
# When notifying or subscribing
|
22
|
+
# 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
23
|
#
|
25
24
|
# @example
|
26
25
|
#
|
@@ -19,7 +19,7 @@ module RuboCop
|
|
19
19
|
module Cop
|
20
20
|
module Chef
|
21
21
|
module Correctness
|
22
|
-
# The
|
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
|
22
|
+
# Scope file exist to access the correct `File` class by using `::File.exist?` not `File.exist?`.
|
23
23
|
#
|
24
24
|
# @example
|
25
25
|
#
|
@@ -14,12 +14,11 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
|
-
|
18
17
|
module RuboCop
|
19
18
|
module Cop
|
20
19
|
module Chef
|
21
20
|
module Correctness
|
22
|
-
# Use file_cache_path rather than hard-coding
|
21
|
+
# Use file_cache_path rather than hard-coding system temp paths
|
23
22
|
#
|
24
23
|
# @example downloading a large file into /tmp/
|
25
24
|
#
|
@@ -15,22 +15,21 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
|
-
# Make sure a cookbook doesn't depend on itself. This will fail on Chef Infra Client 13+
|
23
|
-
#
|
24
|
-
# @example
|
25
|
-
#
|
26
|
-
# #### incorrect
|
27
|
-
# name 'foo'
|
28
|
-
# depends 'foo'
|
29
|
-
#
|
30
|
-
# #### correct
|
31
|
-
# name 'foo'
|
32
|
-
#
|
33
21
|
module Deprecations
|
22
|
+
# Make sure a cookbook doesn't depend on itself. This will fail on Chef Infra Client 13+
|
23
|
+
#
|
24
|
+
# @example
|
25
|
+
#
|
26
|
+
# #### incorrect
|
27
|
+
# name 'foo'
|
28
|
+
# depends 'foo'
|
29
|
+
#
|
30
|
+
# #### correct
|
31
|
+
# name 'foo'
|
32
|
+
#
|
34
33
|
class CookbooksDependsOnSelf < Base
|
35
34
|
extend AutoCorrector
|
36
35
|
include RangeHelp
|
@@ -15,12 +15,11 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
21
|
module Deprecations
|
23
|
-
# There is no need to include the empty and deprecated chef_handler::default recipe
|
22
|
+
# There is no need to include the empty and deprecated chef_handler::default recipe to use the chef_handler resource
|
24
23
|
#
|
25
24
|
# @example
|
26
25
|
#
|
@@ -32,7 +31,7 @@ module RuboCop
|
|
32
31
|
include RangeHelp
|
33
32
|
extend AutoCorrector
|
34
33
|
|
35
|
-
MSG = 'There is no need to include the empty and deprecated chef_handler::default recipe
|
34
|
+
MSG = 'There is no need to include the empty and deprecated chef_handler::default recipe to use the chef_handler resource'
|
36
35
|
RESTRICT_ON_SEND = [:include_recipe].freeze
|
37
36
|
|
38
37
|
def_node_matcher :chef_handler_recipe?, <<-PATTERN
|
@@ -15,12 +15,11 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
21
|
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.
|
22
|
+
# 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
23
|
#
|
25
24
|
# @example
|
26
25
|
#
|
@@ -15,12 +15,11 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
21
|
module Deprecations
|
23
|
-
# Chef::REST was removed in Chef Infra Client 13.
|
22
|
+
# The `Chef::REST` class was removed in Chef Infra Client 13.
|
24
23
|
#
|
25
24
|
# @example
|
26
25
|
#
|
@@ -15,12 +15,11 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
21
|
module Deprecations
|
23
|
-
# Use delete_resource
|
22
|
+
# Use `delete_resource` or `edit_resource` helpers introduced in Chef Infra Client 12.10 instead of functionality in the deprecated `chef-rewind` gem
|
24
23
|
#
|
25
24
|
# @example
|
26
25
|
#
|
@@ -48,7 +47,7 @@ module RuboCop
|
|
48
47
|
unwind: 'delete_resource',
|
49
48
|
}.freeze
|
50
49
|
|
51
|
-
MSG = 'Use delete_resource
|
50
|
+
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
51
|
RESTRICT_ON_SEND = [:chef_gem, :require, :rewind, :unwind].freeze
|
53
52
|
|
54
53
|
def_node_matcher :rewind_gem_install?, <<-PATTERN
|
@@ -15,14 +15,11 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
21
|
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.
|
22
|
+
# 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
23
|
#
|
27
24
|
# @example
|
28
25
|
#
|
@@ -40,7 +37,7 @@ module RuboCop
|
|
40
37
|
include RangeHelp
|
41
38
|
extend AutoCorrector
|
42
39
|
|
43
|
-
MSG = "Don't use deprecated Chef::ShellOut which was removed in Chef Infra Client 13. Use Mixlib::ShellOut instead, which behaves identically."
|
40
|
+
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
41
|
RESTRICT_ON_SEND = [:new, :require, :include].freeze
|
45
42
|
|
46
43
|
def_node_matcher :include_shellout?, <<-PATTERN
|
@@ -15,33 +15,32 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
|
-
# Do not use legacy chef-sugar helper methods, which will not be moved into Chef Infra Client itself. For a complete set of chef-sugar helpers now shipping in Chef Infra Client itself see https://github.com/chef/chef/tree/master/chef-utils#getting-started
|
23
|
-
#
|
24
|
-
# @example
|
25
|
-
#
|
26
|
-
# #### incorrect
|
27
|
-
# vagrant_key?
|
28
|
-
# vagrant_domain?
|
29
|
-
# vagrant_user?
|
30
|
-
# require_chef_gem
|
31
|
-
# best_ip_for(node)
|
32
|
-
# nexus?
|
33
|
-
# ios_xr?
|
34
|
-
# ruby_20?
|
35
|
-
# ruby_19?
|
36
|
-
# includes_recipe?('foo::bar')
|
37
|
-
# wrlinux?
|
38
|
-
# dev_null
|
39
|
-
# nexentacore_platform?
|
40
|
-
# opensolaris_platform?
|
41
|
-
# nexentacore?
|
42
|
-
# opensolaris?
|
43
|
-
#
|
44
21
|
module Deprecations
|
22
|
+
# Do not use legacy chef-sugar helper methods, which will not be moved into Chef Infra Client itself. For a complete set of chef-sugar helpers now shipping in Chef Infra Client itself see https://github.com/chef/chef/tree/master/chef-utils#getting-started
|
23
|
+
#
|
24
|
+
# @example
|
25
|
+
#
|
26
|
+
# #### incorrect
|
27
|
+
# vagrant_key?
|
28
|
+
# vagrant_domain?
|
29
|
+
# vagrant_user?
|
30
|
+
# require_chef_gem
|
31
|
+
# best_ip_for(node)
|
32
|
+
# nexus?
|
33
|
+
# ios_xr?
|
34
|
+
# ruby_20?
|
35
|
+
# ruby_19?
|
36
|
+
# includes_recipe?('foo::bar')
|
37
|
+
# wrlinux?
|
38
|
+
# dev_null
|
39
|
+
# nexentacore_platform?
|
40
|
+
# opensolaris_platform?
|
41
|
+
# nexentacore?
|
42
|
+
# opensolaris?
|
43
|
+
#
|
45
44
|
class ChefSugarHelpers < Base
|
46
45
|
MSG = 'Do not use legacy chef-sugar helper methods, which will not be moved into Chef Infra Client itself. For a complete set of chef-sugar helpers now shipping in Chef Infra Client itself see https://github.com/chef/chef/tree/master/chef-utils#getting-started'
|
47
46
|
RESTRICT_ON_SEND = [:vagrant_key?, :vagrant_domain?, :vagrant_user?, :require_chef_gem, :best_ip_for, :nexus?, :ios_xr?, :ruby_20?, :ruby_19?, :includes_recipe?, :wrlinux?, :dev_null, :nexentacore_platform?, :opensolaris_platform?, :nexentacore?, :opensolaris?].freeze
|
@@ -15,12 +15,11 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
21
|
module Deprecations
|
23
|
-
# Chef Workstation 0.8 and later renamed the ChefDK module used when writing custom cookbook generators from ChefDK to ChefCLI
|
22
|
+
# 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
23
|
#
|
25
24
|
# @example
|
26
25
|
#
|
@@ -15,13 +15,12 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
|
-
# The Librarian-Chef depsolving project is no longer maintained and a Cheffile should not be used for cookbook depsolving. Consider using Policyfiles instead. If the Policyfiles model is not compatible with your workflow you may find Berkshelf offers a more similar, and still supported, experience to Librarian-Chef.
|
23
|
-
#
|
24
21
|
module Deprecations
|
22
|
+
# The Librarian-Chef depsolving project is no longer maintained and a Cheffile should not be used for cookbook depsolving. Consider using Policyfiles instead. If the Policyfiles model is not compatible with your workflow you may find Berkshelf offers a more similar, and still supported, experience to Librarian-Chef.
|
23
|
+
#
|
25
24
|
class Cheffile < Base
|
26
25
|
include RangeHelp
|
27
26
|
|
@@ -15,12 +15,11 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
21
|
module Deprecations
|
23
|
-
# Use ChefSpec::SoloRunner or ChefSpec::ServerRunner instead of the deprecated ChefSpec::Runner
|
22
|
+
# Use `ChefSpec::SoloRunner` or `ChefSpec::ServerRunner` instead of the deprecated `ChefSpec::Runner`. These new runners were introduced in ChefSpec 4.1 (Oct 2014).
|
24
23
|
#
|
25
24
|
# @example
|
26
25
|
#
|
@@ -15,12 +15,11 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
21
|
module Deprecations
|
23
|
-
# Use the
|
22
|
+
# Use the `:remove` action in the `chocolatey_package` resource instead of `:uninstall` which was removed in Chef Infra Client 14+.
|
24
23
|
#
|
25
24
|
# @example
|
26
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 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
|
#
|
@@ -15,12 +15,11 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
21
|
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
|
22
|
+
# 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
23
|
#
|
25
24
|
# @example
|
26
25
|
#
|
@@ -15,12 +15,11 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
21
|
module Deprecations
|
23
|
-
# Don't use deprecated Mixins no longer included in Chef Infra Client 14 and later
|
22
|
+
# Don't use deprecated Mixins no longer included in Chef Infra Client 14 and later.
|
24
23
|
#
|
25
24
|
# @example
|
26
25
|
#
|
@@ -15,12 +15,11 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
21
|
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.
|
22
|
+
# Use `provider_for_action` or provides instead of the deprecated `Chef::Platform` methods in resources, which were removed in Chef Infra Client 13.
|
24
23
|
#
|
25
24
|
# @example
|
26
25
|
#
|
@@ -15,12 +15,11 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
|
19
18
|
module RuboCop
|
20
19
|
module Cop
|
21
20
|
module Chef
|
22
21
|
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
|
22
|
+
# 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
23
|
#
|
25
24
|
# @example
|
26
25
|
#
|