summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-10-28 13:05:07 -0700
committerTim Smith <tsmith84@gmail.com>2020-10-28 13:05:07 -0700
commit28f2c570a6d0d9389260c15559981ab5fee04382 (patch)
tree08b8d35928edc77f2419716f5b52e9c9afdb3961 /tasks
parent441b47147b73ccaaf0708a7722d5157c4c08023a (diff)
downloadchef-28f2c570a6d0d9389260c15559981ab5fee04382.tar.gz
Improve the package docs generation + resolve rubocop warnings
Resolve a few valid warnings there and then add a few more resources where we should be showing package warnings. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'tasks')
-rwxr-xr-xtasks/docs.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/tasks/docs.rb b/tasks/docs.rb
index 4bce62695e..325489321c 100755
--- a/tasks/docs.rb
+++ b/tasks/docs.rb
@@ -1,3 +1,5 @@
+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
+
namespace :docs_site do
desc "Generate resource documentation pages in a docs_site directory"
@@ -11,8 +13,6 @@ 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"
@@ -168,11 +168,11 @@ namespace :docs_site do
end
end
- def special_properties(name, data)
+ def special_properties(name)
properties = {}
# these package properties support passing arrays for the package name
- properties["common_resource_functionality_multiple_packages"] = true if %w{yum_package apt_package zypper_package homebrew_package dnf_package pacman_package homebrew_package}.include?(name)
+ properties["common_resource_functionality_multiple_packages"] = true if %w{snap_package dpkg_package yum_package apt_package zypper_package homebrew_package dnf_package pacman_package homebrew_package}.include?(name)
properties["common_resource_functionality_resources_common_windows_security"] = true if name == "remote_directory"
@@ -274,7 +274,7 @@ namespace :docs_site do
r["resource_reference"] = true
# These properties are set to special values for only a few resources.
- r.merge!(special_properties(name, data))
+ r.merge!(special_properties(name))
r["title"] = "#{name} resource"
r["resource"] = name