summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-10-16 09:50:01 -0700
committerTim Smith <tsmith84@gmail.com>2020-10-16 09:50:01 -0700
commit0b26c901cf3fa8a3e32e4a3f513864bc2d959e04 (patch)
treeb5a3091a06d4df36c9c32b628b74463058ff1849 /tasks
parent8c67bf7746301cb73dea14917a7a91f92a37eb13 (diff)
downloadchef-0b26c901cf3fa8a3e32e4a3f513864bc2d959e04.tar.gz
Avoid declaring arrays in loops
There's still a few of these left over, but these are the easy wins with obvious wins. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'tasks')
-rwxr-xr-xtasks/docs.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/tasks/docs.rb b/tasks/docs.rb
index ff5a38afda..14b15e0d15 100755
--- a/tasks/docs.rb
+++ b/tasks/docs.rb
@@ -11,6 +11,8 @@ namespace :docs_site do
require "fileutils"
require "yaml"
+ RESOURCES_TO_SKIP = ["whyrun_safe_ruby_block", "l_w_r_p_base", "user_resource_abstract_base_class", "linux_user", "pw_user", "aix_user", "dscl_user", "solaris_user", "windows_user", "mac_user", ""].freeze
+
# @return [String, nil] a pretty default value string or nil if we want to skip it
def pretty_default(default)
return nil if default.nil? || default == "" || default == "lazy default"
@@ -295,7 +297,7 @@ namespace :docs_site do
resources.each do |resource, data|
# skip some resources we don't directly document
- next if ["whyrun_safe_ruby_block", "l_w_r_p_base", "user_resource_abstract_base_class", "linux_user", "pw_user", "aix_user", "dscl_user", "solaris_user", "windows_user", "mac_user", ""].include?(resource)
+ next if RESOURCES_TO_SKIP.include?(resource)
next if ENV["DEBUG"] && !(resource == ENV["DEBUG"])