summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-08-31 02:58:41 -0700
committerGitHub <noreply@github.com>2022-08-31 02:58:41 -0700
commit6aceb4b788845378e286cfaf90e0641ddedea2f8 (patch)
treefa08763216c4d44676eef1c63ba71130ba026077 /lib
parent4feba0045b312de61a27ed620a8d6bb04e3126a1 (diff)
parent65e2d57afd116b8e0dc34d617c1ed276b569a597 (diff)
downloadchef-6aceb4b788845378e286cfaf90e0641ddedea2f8.tar.gz
Merge branch 'main' into tp/ruby_revert_to_ruby31tp/ruby_revert_to_ruby31
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/resource/chef_client_cron.rb2
-rw-r--r--lib/chef/resource/chef_client_launchd.rb2
-rw-r--r--lib/chef/resource/chef_client_scheduled_task.rb2
-rw-r--r--lib/chef/resource/sysctl.rb2
-rw-r--r--lib/chef/resource/windows_user_privilege.rb2
-rw-r--r--lib/chef/run_context.rb6
-rw-r--r--lib/chef/version.rb2
7 files changed, 9 insertions, 9 deletions
diff --git a/lib/chef/resource/chef_client_cron.rb b/lib/chef/resource/chef_client_cron.rb
index 26894c5ae3..b5014a368d 100644
--- a/lib/chef/resource/chef_client_cron.rb
+++ b/lib/chef/resource/chef_client_cron.rb
@@ -98,7 +98,7 @@ class Chef
property :splay, [Integer, String],
default: 300,
coerce: proc { |x| Integer(x) },
- callbacks: { "should be a positive number" => proc { |v| v > 0 } },
+ callbacks: { "should be a positive number" => proc { |v| v >= 0 } },
description: "A random number of seconds between 0 and X to add to interval so that all #{ChefUtils::Dist::Infra::CLIENT} commands don't execute at the same time."
property :mailto, String,
diff --git a/lib/chef/resource/chef_client_launchd.rb b/lib/chef/resource/chef_client_launchd.rb
index 1016ea4d49..035f2353b7 100644
--- a/lib/chef/resource/chef_client_launchd.rb
+++ b/lib/chef/resource/chef_client_launchd.rb
@@ -60,7 +60,7 @@ class Chef
property :splay, [Integer, String],
default: 300,
coerce: proc { |x| Integer(x) },
- callbacks: { "should be a positive number" => proc { |v| v > 0 } },
+ callbacks: { "should be a positive number" => proc { |v| v >= 0 } },
description: "A random number of seconds between 0 and X to add to interval so that all #{ChefUtils::Dist::Infra::CLIENT} commands don't execute at the same time."
property :accept_chef_license, [true, false],
diff --git a/lib/chef/resource/chef_client_scheduled_task.rb b/lib/chef/resource/chef_client_scheduled_task.rb
index 422881deb8..f04598cdc6 100644
--- a/lib/chef/resource/chef_client_scheduled_task.rb
+++ b/lib/chef/resource/chef_client_scheduled_task.rb
@@ -107,7 +107,7 @@ class Chef
property :splay, [Integer, String],
coerce: proc { |x| Integer(x) },
- callbacks: { "should be a positive number" => proc { |v| v > 0 } },
+ callbacks: { "should be a positive number" => proc { |v| v >= 0 } },
description: "A random number of seconds between 0 and X to add to interval so that all #{ChefUtils::Dist::Infra::CLIENT} commands don't execute at the same time.",
default: 300
diff --git a/lib/chef/resource/sysctl.rb b/lib/chef/resource/sysctl.rb
index 97f919fbc9..61f3686ccc 100644
--- a/lib/chef/resource/sysctl.rb
+++ b/lib/chef/resource/sysctl.rb
@@ -187,7 +187,7 @@ class Chef
sysctl_lines << "#{new_resource.key} = #{new_resource.value}"
- sysctl_lines.join("\n")
+ sysctl_lines.join("\n") + "\n"
end
end
diff --git a/lib/chef/resource/windows_user_privilege.rb b/lib/chef/resource/windows_user_privilege.rb
index e4679f50b9..251382e46f 100644
--- a/lib/chef/resource/windows_user_privilege.rb
+++ b/lib/chef/resource/windows_user_privilege.rb
@@ -23,7 +23,7 @@ class Chef
class WindowsUserPrivilege < Chef::Resource
provides :windows_user_privilege
- description "The windows_user_privilege resource allows to add and set principal (User/Group) to the specified privilege.\n Ref: https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/user-rights-assignment"
+ description "The windows_user_privilege resource allows to add and set principal (User/Group) to the specified privilege.\n Ref: https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/user-rights-assignment\n For list of principals to use with :add action Ref: https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/special-identities"
introduced "16.0"
diff --git a/lib/chef/run_context.rb b/lib/chef/run_context.rb
index ce4d545aa4..11bfc6e3c6 100644
--- a/lib/chef/run_context.rb
+++ b/lib/chef/run_context.rb
@@ -413,9 +413,9 @@ class Chef
logger.warn(<<~ERROR_MESSAGE)
MissingCookbookDependency:
Recipe `#{recipe_name}` is not in the run_list, and cookbook '#{cookbook_name}'
- is not a dependency of any cookbook in the run_list. To load this recipe,
- first add a dependency on cookbook '#{cookbook_name}' in the cookbook you're
- including it from in that cookbook's metadata.
+ is not a dependency of any cookbook in the run_list. To load this recipe,
+ first add a dependency of the cookbook '#{cookbook_name}' into the metadata
+ of the cookbook which depends on '#{cookbook_name}'.
ERROR_MESSAGE
end
diff --git a/lib/chef/version.rb b/lib/chef/version.rb
index 724b801442..a95964f938 100644
--- a/lib/chef/version.rb
+++ b/lib/chef/version.rb
@@ -23,7 +23,7 @@ require_relative "version_string"
class Chef
CHEF_ROOT = File.expand_path("..", __dir__)
- VERSION = Chef::VersionString.new("18.0.135")
+ VERSION = Chef::VersionString.new("18.0.142")
end
#