summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Singh <vivek.singh@msystechnologies.com>2020-04-06 22:14:39 +0530
committerVivek Singh <vivek.singh@msystechnologies.com>2020-04-06 22:46:26 +0530
commita1bf06c753173ac698d9329a09c6edba6c18c781 (patch)
treedcc0cfe7d4c533fc1d73d1cbd01dbf1decc202ef
parentbd19ff3749e935524a512667f41bb4fe5667be01 (diff)
downloadchef-a1bf06c753173ac698d9329a09c6edba6c18c781.tar.gz
Fix typo
Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
-rw-r--r--lib/chef/application/solo.rb2
-rw-r--r--lib/chef/blacklist.rb2
-rw-r--r--lib/chef/chef_class.rb2
-rw-r--r--lib/chef/chef_fs/file_system/chef_server/policies_dir.rb2
-rw-r--r--lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb2
-rw-r--r--lib/chef/chef_fs/path_utils.rb2
-rw-r--r--lib/chef/config.rb6
-rw-r--r--lib/chef/cookbook/cookbook_version_loader.rb6
-rw-r--r--lib/chef/cookbook/metadata.rb4
-rw-r--r--lib/chef/cookbook_site_streaming_uploader.rb2
-rw-r--r--lib/chef/cookbook_version.rb4
-rw-r--r--lib/chef/data_collector.rb2
-rw-r--r--lib/chef/data_collector/config_validation.rb2
-rw-r--r--lib/chef/data_collector/error_handlers.rb2
-rw-r--r--lib/chef/exceptions.rb4
-rw-r--r--lib/chef/formatters/base.rb2
-rw-r--r--lib/chef/guard_interpreter/resource_guard_interpreter.rb2
-rw-r--r--lib/chef/knife.rb4
-rw-r--r--lib/chef/knife/bootstrap.rb2
-rw-r--r--lib/chef/knife/bootstrap/train_connector.rb2
-rw-r--r--lib/chef/knife/core/generic_presenter.rb2
-rw-r--r--lib/chef/knife/core/windows_bootstrap_context.rb2
-rw-r--r--lib/chef/knife/role_env_run_list_set.rb2
-rw-r--r--lib/chef/knife/ssh.rb2
-rw-r--r--lib/chef/knife/ssl_fetch.rb4
-rw-r--r--lib/chef/mixin/api_version_request_handling.rb6
-rw-r--r--lib/chef/mixin/lazy_module_include.rb2
-rw-r--r--lib/chef/mixin/openssl_helper.rb4
-rw-r--r--lib/chef/mixin/securable.rb2
-rw-r--r--lib/chef/mixin/shell_out.rb2
-rw-r--r--lib/chef/property.rb4
-rw-r--r--lib/chef/provider/group/pw.rb2
-rw-r--r--lib/chef/provider/package.rb2
-rw-r--r--lib/chef/provider/package/rubygems.rb2
-rw-r--r--lib/chef/provider/package/yum/rpm_utils.rb2
-rw-r--r--lib/chef/provider/powershell_script.rb2
-rw-r--r--lib/chef/provider/registry_key.rb2
-rw-r--r--lib/chef/provider/service/freebsd.rb2
-rw-r--r--lib/chef/provider/systemd_unit.rb4
-rw-r--r--lib/chef/provider/user/mac.rb2
-rw-r--r--lib/chef/provider/user/solaris.rb2
-rw-r--r--lib/chef/provider/windows_task.rb6
-rw-r--r--lib/chef/resource.rb6
-rw-r--r--lib/chef/resource/file/verification.rb2
-rw-r--r--lib/chef/resource/helpers/cron_validations.rb2
-rw-r--r--lib/chef/resource/hostname.rb2
-rw-r--r--lib/chef/resource/macos_userdefaults.rb2
-rw-r--r--lib/chef/resource/openssl_x509_certificate.rb2
-rw-r--r--lib/chef/resource/powershell_script.rb4
-rw-r--r--lib/chef/resource/sudo.rb2
-rw-r--r--lib/chef/resource/timezone.rb2
-rw-r--r--lib/chef/resource/windows_ad_join.rb4
-rw-r--r--lib/chef/resource/windows_certificate.rb2
-rw-r--r--lib/chef/resource/yum_package.rb2
-rw-r--r--lib/chef/resource_collection.rb2
-rw-r--r--lib/chef/resource_reporter.rb2
-rw-r--r--lib/chef/run_context.rb2
-rw-r--r--lib/chef/runner.rb2
-rw-r--r--lib/chef/shell.rb2
-rw-r--r--lib/chef/util/dsc/local_configuration_manager.rb2
-rw-r--r--lib/chef/win32/api/file.rb2
-rw-r--r--lib/chef/win32/mutex.rb2
62 files changed, 82 insertions, 82 deletions
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb
index de34387fa4..105423ea84 100644
--- a/lib/chef/application/solo.rb
+++ b/lib/chef/application/solo.rb
@@ -125,7 +125,7 @@ class Chef::Application::Solo < Chef::Application::Base
Mixlib::Archive.new(tarball_path).extract(Chef::Config.chef_repo_path, perms: false, ignore: /^\.$/)
end
- # json_attribs shuld be fetched after recipe_url tarball is unpacked.
+ # json_attribs should be fetched after recipe_url tarball is unpacked.
# Otherwise it may fail if points to local file from tarball.
if Chef::Config[:json_attribs]
config_fetcher = Chef::ConfigFetcher.new(Chef::Config[:json_attribs])
diff --git a/lib/chef/blacklist.rb b/lib/chef/blacklist.rb
index abf2139044..b6c441e460 100644
--- a/lib/chef/blacklist.rb
+++ b/lib/chef/blacklist.rb
@@ -5,7 +5,7 @@ class Chef
class Blacklist
# filter takes two arguments - the data you want to filter, and a blacklisted array
- # of keys you want discluded. You can capture a subtree of the data to filter by
+ # of keys you want discarded. You can capture a subtree of the data to filter by
# providing a "/"-delimited string of keys. If some key includes "/"-characters,
# you must provide an array of keys instead.
#
diff --git a/lib/chef/chef_class.rb b/lib/chef/chef_class.rb
index edc229f203..13e6ffdf53 100644
--- a/lib/chef/chef_class.rb
+++ b/lib/chef/chef_class.rb
@@ -230,7 +230,7 @@ class Chef
# Chef::Deprecated.
#
# This should generally not be used, as the user will not be given a link
- # to get more infomration on fixing the deprecation warning.
+ # to get more information on fixing the deprecation warning.
#
# @see #deprecated
def log_deprecation(message, location = nil)
diff --git a/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb b/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb
index 073bea7a95..cdbbb5f8d3 100644
--- a/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb
+++ b/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb
@@ -85,7 +85,7 @@ class Chef
if $!.response.code == "404"
# GET /organizations/ORG/policies returned 404, but that just might be because
# we are talking to an older version of the server that doesn't support policies.
- # Do GET /orgqanizations/ORG to find out if the org exists at all.
+ # Do GET /organizations/ORG to find out if the org exists at all.
# TODO use server API version instead of a second network request.
begin
root.get_json(parent.api_path)
diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb
index 3aba5ba51b..74d89e0162 100644
--- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb
+++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb
@@ -31,7 +31,7 @@ class Chef
# Represents ROOT/cookbooks/:cookbook
class ChefRepositoryFileSystemCookbookDir < ChefRepositoryFileSystemCookbookEntry
- # API Required by Respository::Directory
+ # API Required by Repository::Directory
def chefignore
@chefignore ||= Chef::Cookbook::Chefignore.new(file_path)
rescue Errno::EISDIR, Errno::EACCES
diff --git a/lib/chef/chef_fs/path_utils.rb b/lib/chef/chef_fs/path_utils.rb
index b894359e2a..f434f40b9e 100644
--- a/lib/chef/chef_fs/path_utils.rb
+++ b/lib/chef/chef_fs/path_utils.rb
@@ -101,7 +101,7 @@ class Chef
File.join(path, *suffix.reverse)
end
- # Compares two path fragments according to the case-sentitivity of the host platform.
+ # Compares two path fragments according to the case-sensitivity of the host platform.
def self.os_path_eq?(left, right)
ChefUtils.windows? ? left.casecmp(right) == 0 : left == right
end
diff --git a/lib/chef/config.rb b/lib/chef/config.rb
index f204711384..46b590b899 100644
--- a/lib/chef/config.rb
+++ b/lib/chef/config.rb
@@ -49,7 +49,7 @@ class Chef
# We re-open ChefConfig::Config to add additional settings. Generally,
# everything should go in chef-config so it's shared with whoever uses that.
- # We make execeptions to that rule when:
+ # We make exceptions to that rule when:
# * The functionality isn't likely to be useful outside of Chef
# * The functionality makes use of a dependency we don't want to add to chef-config
class Config
@@ -64,7 +64,7 @@ class Chef
# Override the default values that were set by Ohai.
#
- # REMOVEME once these configurables are removed from the top level of Ohai.
+ # REMOVEME once these configurable are removed from the top level of Ohai.
default :log_level, LOG_LEVEL
default :log_location, LOG_LOCATION
@@ -74,7 +74,7 @@ class Chef
# chef-client and other tools (e.g., knife), we will mute the warnings here
# by redefining the config_attr_writer to not warn for these options.
#
- # REMOVEME once the warnings for these configurables are removed from Ohai.
+ # REMOVEME once the warnings for these configurable are removed from Ohai.
%i{log_level log_location}.each do |option|
config_attr_writer option do |value|
value
diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb
index 2c4fe6db41..79aa8d9708 100644
--- a/lib/chef/cookbook/cookbook_version_loader.rb
+++ b/lib/chef/cookbook/cookbook_version_loader.rb
@@ -21,7 +21,7 @@ require "find"
class Chef
class Cookbook
- # This class is only used drectly from the Chef::CookbookLoader and from chef-fs,
+ # This class is only used directly from the Chef::CookbookLoader and from chef-fs,
# so it only affects legacy-mode chef-client runs and knife. It is not used by
# server or zolo/zero modes.
#
@@ -220,7 +220,7 @@ class Chef
# Use Find.find because it:
# (a) returns any children, recursively
# (b) includes top_path as well
- # (c) skips symlinks, which is backcompat (no judgement on whether it was *right*)
+ # (c) skips symlinks, which is backcompat (no judgment on whether it was *right*)
Find.find(top_path) do |path|
# Only add files, not directories
next unless File.file?(path)
@@ -257,7 +257,7 @@ class Chef
def apply_json_cookbook_version_metadata(file)
data = Chef::JSONCompat.parse(IO.read(file))
@metadata.from_hash(data["metadata"])
- # the JSON cookbok metadata file is only used by chef-zero.
+ # the JSON cookbook metadata file is only used by chef-zero.
# The Chef Server API currently does not enforce that the metadata
# have a `name` field, but that will cause an error when attempting
# to load the cookbook. To keep compatibility, we fake it by setting
diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb
index d924be0c85..4ed9c38689 100644
--- a/lib/chef/cookbook/metadata.rb
+++ b/lib/chef/cookbook/metadata.rb
@@ -406,8 +406,8 @@ class Chef
# Convert an Array of Gem::Dependency objects (chef_version/ohai_version) to an Array.
#
- # Gem::Dependencey#to_s is not useful, and there is no #to_json defined on it or its component
- # objets, so we have to write our own rendering method.
+ # Gem::Dependency#to_s is not useful, and there is no #to_json defined on it or its component
+ # objects, so we have to write our own rendering method.
#
# [ Gem::Dependency.new(">= 12.5"), Gem::Dependency.new(">= 11.18.0", "< 12.0") ]
#
diff --git a/lib/chef/cookbook_site_streaming_uploader.rb b/lib/chef/cookbook_site_streaming_uploader.rb
index 6719ad370b..7f94fd4954 100644
--- a/lib/chef/cookbook_site_streaming_uploader.rb
+++ b/lib/chef/cookbook_site_streaming_uploader.rb
@@ -185,7 +185,7 @@ class Chef
@str.length
end
- # read the specified amount from the string startiung at the offset
+ # read the specified amount from the string starting at the offset
def read(offset, how_much)
@str[offset, how_much]
end
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb
index ed0c199728..53a182a9c3 100644
--- a/lib/chef/cookbook_version.rb
+++ b/lib/chef/cookbook_version.rb
@@ -108,9 +108,9 @@ class Chef
metadata.version
end
- # Indicates if this version is frozen or not. Freezing a coobkook version
+ # Indicates if this version is frozen or not. Freezing a cookbook version
# indicates that a new cookbook with the same name and version number
- # shoule
+ # should
def frozen_version?
@frozen
end
diff --git a/lib/chef/data_collector.rb b/lib/chef/data_collector.rb
index 787747444d..eb1c01672b 100644
--- a/lib/chef/data_collector.rb
+++ b/lib/chef/data_collector.rb
@@ -52,7 +52,7 @@ class Chef
# @return [Chef::Node] the chef node
attr_reader :node
- # @return [Set<Hash>] the acculumated list of deprecation warnings
+ # @return [Set<Hash>] the accumulated list of deprecation warnings
attr_reader :deprecations
# @return [Chef::ActionCollection] the action collection object
diff --git a/lib/chef/data_collector/config_validation.rb b/lib/chef/data_collector/config_validation.rb
index d3a347c57c..39283711b7 100644
--- a/lib/chef/data_collector/config_validation.rb
+++ b/lib/chef/data_collector/config_validation.rb
@@ -111,7 +111,7 @@ class Chef
"Chef::Config[:data_collector][:output_locations][:files] contains the location #{file}, which is a non existent file path."
rescue Errno::EACCES
raise Chef::Exceptions::ConfigurationError,
- "Chef::Config[:data_collector][:output_locations][:files] contains the location #{file}, which cannnot be written to by Chef."
+ "Chef::Config[:data_collector][:output_locations][:files] contains the location #{file}, which cannot be written to by Chef."
rescue Exception => e
raise Chef::Exceptions::ConfigurationError,
"Chef::Config[:data_collector][:output_locations][:files] contains the location #{file}, which is invalid: #{e.message}."
diff --git a/lib/chef/data_collector/error_handlers.rb b/lib/chef/data_collector/error_handlers.rb
index bb892c457c..980f7b5868 100644
--- a/lib/chef/data_collector/error_handlers.rb
+++ b/lib/chef/data_collector/error_handlers.rb
@@ -19,7 +19,7 @@ class Chef
class DataCollector
# This module isolates the handling of collecting error descriptions to insert into the data_colletor
- # report output. For very early errors it is repsonsible for collecting the node_name for the report
+ # report output. For very early errors it is responsible for collecting the node_name for the report
# to use. For all failure conditions that have an ErrorMapper it collects the output.
#
# No external code should call anything in this module directly.
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb
index d1317cec69..e2c1dffe77 100644
--- a/lib/chef/exceptions.rb
+++ b/lib/chef/exceptions.rb
@@ -259,7 +259,7 @@ class Chef
class ChildConvergeError < RuntimeError; end
class DeprecatedFeatureError < RuntimeError
- def initalize(message)
+ def initialize(message)
super("#{message} (raising error due to treat_deprecation_warnings_as_errors being set)")
end
end
@@ -413,7 +413,7 @@ class Chef
end
# Raised when Chef::Config[:run_lock_timeout] is set and some other client run fails
- # to release the run lock becure Chef::Config[:run_lock_timeout] seconds pass.
+ # to release the run lock before Chef::Config[:run_lock_timeout] seconds pass.
class RunLockTimeout < RuntimeError
def initialize(duration, blocking_pid)
super "Unable to acquire lock. Waited #{duration} seconds for #{blocking_pid} to release."
diff --git a/lib/chef/formatters/base.rb b/lib/chef/formatters/base.rb
index 3cf04f952e..87fb2d37d9 100644
--- a/lib/chef/formatters/base.rb
+++ b/lib/chef/formatters/base.rb
@@ -215,7 +215,7 @@ class Chef
#
# @param deprecation [Chef::Deprecated::Base] Deprecation object to log.
# In previous versions, this could be a string. Don't do that anymore.
- # @param location [Object] Unused, present only for compatbility.
+ # @param location [Object] Unused, present only for compatibility.
def deprecation(deprecation, _location = nil)
Chef::Log.deprecation(deprecation.to_s) unless deprecation.silenced?
end
diff --git a/lib/chef/guard_interpreter/resource_guard_interpreter.rb b/lib/chef/guard_interpreter/resource_guard_interpreter.rb
index adab16f5bf..63702f3249 100644
--- a/lib/chef/guard_interpreter/resource_guard_interpreter.rb
+++ b/lib/chef/guard_interpreter/resource_guard_interpreter.rb
@@ -50,7 +50,7 @@ class Chef
# Handles cases like powershell_script where default
# attributes are different when used in a guard vs. not. For
# powershell_script in particular, this will go away when
- # the one attribue that causes this changes its default to be
+ # the one attribute that causes this changes its default to be
# the same after some period to prepare for deprecation
if @resource.class.respond_to?(:get_default_attributes)
block_attributes = @resource.class.send(:get_default_attributes, @command_opts).merge(block_attributes)
diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb
index 0debcbc429..919fd04074 100644
--- a/lib/chef/knife.rb
+++ b/lib/chef/knife.rb
@@ -101,7 +101,7 @@ class Chef
subcommand_files[subclass.snake_case_name] +=
if subclass.superclass.to_s == "Chef::ChefFS::Knife"
# ChefFS-based commands have a superclass that defines an
- # inhereited method which calls super. This means that the
+ # inherited method which calls super. This means that the
# top of the call stack is not the class definition for
# our subcommand. Try the second entry in the call stack.
[path_from_caller(caller[1])]
@@ -557,7 +557,7 @@ class Chef
max_server_version = version_header["max_version"]
ui.error "The API version that Knife is using is not supported by the server you sent this request to."
ui.info "The request that Knife sent was using API version #{client_api_version}."
- ui.info "The server you sent the request to supports a min API verson of #{min_server_version} and a max API version of #{max_server_version}."
+ ui.info "The server you sent the request to supports a min API version of #{min_server_version} and a max API version of #{max_server_version}."
ui.info "Please either update your #{Chef::Dist::PRODUCT} or the server to be a compatible set."
else
ui.error response.message
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index 3fe2ec5d71..82fa5971b8 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -796,7 +796,7 @@ class Chef
# Validate any additional options
#
- # Plugins that subclass bootstrap, e.g. knife-ec2, can use this method to validate any additonal options before any other actions are executed
+ # Plugins that subclass bootstrap, e.g. knife-ec2, can use this method to validate any additional options before any other actions are executed
#
# @return [TrueClass] If options are valid or exits
def plugin_validate_options!
diff --git a/lib/chef/knife/bootstrap/train_connector.rb b/lib/chef/knife/bootstrap/train_connector.rb
index 66cde6f6b9..b4b17f747c 100644
--- a/lib/chef/knife/bootstrap/train_connector.rb
+++ b/lib/chef/knife/bootstrap/train_connector.rb
@@ -92,7 +92,7 @@ class Chef
# Answers the question, "Am I connected to a unix host?"
#
- # @note this will alwys return true for a linux host
+ # @note this will always return true for a linux host
# because train classifies linux as a unix
#
# @return [Boolean] true if the connected host is unix or linux
diff --git a/lib/chef/knife/core/generic_presenter.rb b/lib/chef/knife/core/generic_presenter.rb
index f9fce6ca87..aa1c177ab6 100644
--- a/lib/chef/knife/core/generic_presenter.rb
+++ b/lib/chef/knife/core/generic_presenter.rb
@@ -53,7 +53,7 @@ class Chef
attr_reader :ui
attr_reader :config
- # Instaniates a new GenericPresenter. This is generally handled by the
+ # Instantiates a new GenericPresenter. This is generally handled by the
# Chef::Knife::UI object, though you need to match the signature of this
# method if you intend to use your own presenter instead.
def initialize(ui, config)
diff --git a/lib/chef/knife/core/windows_bootstrap_context.rb b/lib/chef/knife/core/windows_bootstrap_context.rb
index ff67ee3689..0947cdaedb 100644
--- a/lib/chef/knife/core/windows_bootstrap_context.rb
+++ b/lib/chef/knife/core/windows_bootstrap_context.rb
@@ -355,7 +355,7 @@ class Chef
@echo Successfully created scheduled task to install #{Chef::Dist::PRODUCT}.
@schtasks /run /tn chefclientbootstraptask
@if ERRORLEVEL 1 (
- @echo ERROR: Failed to execut #{Chef::Dist::PRODUCT} installation scheduled task with status code !ERRORLEVEL!. > "&2"
+ @echo ERROR: Failed to execute #{Chef::Dist::PRODUCT} installation scheduled task with status code !ERRORLEVEL!. > "&2"
) else (
@echo Successfully started #{Chef::Dist::PRODUCT} installation scheduled task.
@echo Waiting for installation to complete -- this may take a few minutes...
diff --git a/lib/chef/knife/role_env_run_list_set.rb b/lib/chef/knife/role_env_run_list_set.rb
index 084bc02aff..d9294b9bc4 100644
--- a/lib/chef/knife/role_env_run_list_set.rb
+++ b/lib/chef/knife/role_env_run_list_set.rb
@@ -28,7 +28,7 @@ class Chef
require_relative "../json_compat"
end
- banner "knife role env_run_list set [ROLE] [ENVIRONMENT] [ENTRIES] (optionss)"
+ banner "knife role env_run_list set [ROLE] [ENVIRONMENT] [ENTRIES] (options)"
# Clears out any existing env_run_list_items and sets them to the
# specified entries
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb
index ae7b44d934..bf0cbd663b 100644
--- a/lib/chef/knife/ssh.rb
+++ b/lib/chef/knife/ssh.rb
@@ -561,7 +561,7 @@ class Chef
# the user, but we have to be conscious that this code gets included in knife bootstrap and knife * server create as
# well. We want to change the semantics so that the default is false and 'nil' means -P without an argument on the
# command line. But the other utilities expect nil to be the default and we can't prompt in that case. So we effectively
- # use ssh_password_ng to determine if we're coming from knife ssh or from the other utilities. The other utilties can
+ # use ssh_password_ng to determine if we're coming from knife ssh or from the other utilities. The other utilities can
# also be patched to use ssh_password_ng easily as long they follow the convention that the default is false.
def configure_password
if config.key?(:ssh_password_ng) && config[:ssh_password_ng].nil?
diff --git a/lib/chef/knife/ssl_fetch.rb b/lib/chef/knife/ssl_fetch.rb
index 8c00aab7f7..f669ffd6b1 100644
--- a/lib/chef/knife/ssl_fetch.rb
+++ b/lib/chef/knife/ssl_fetch.rb
@@ -98,9 +98,9 @@ class Chef
# Convert the CN of a certificate into something that will work well as a
# filename. To do so, all `*` characters are converted to the string
- # "wildcard" and then all characters other than alphanumeric and hypen
+ # "wildcard" and then all characters other than alphanumeric and hyphen
# characters are converted to underscores.
- # NOTE: There is some confustion about what the CN will contain when
+ # NOTE: There is some confusion about what the CN will contain when
# using internationalized domain names. RFC 6125 mandates that the ascii
# representation be used, but it is not clear whether this is followed in
# practice.
diff --git a/lib/chef/mixin/api_version_request_handling.rb b/lib/chef/mixin/api_version_request_handling.rb
index 776190f3a4..f85631a145 100644
--- a/lib/chef/mixin/api_version_request_handling.rb
+++ b/lib/chef/mixin/api_version_request_handling.rb
@@ -19,16 +19,16 @@
class Chef
module Mixin
module ApiVersionRequestHandling
- # @param exeception [Net::HTTPClientException] may or may not contain the x-ops-server-api-version header
+ # @param exception [Net::HTTPClientException] may or may not contain the x-ops-server-api-version header
# supported_client_versions:
# @param supported_client_versions [Array<Integer>] The API versions the client supports.
#
# Output:
# nil:
- # If the execption was not a 406 or the server does not support versioning
+ # If the exception was not a 406 or the server does not support versioning
# Array of length zero:
# If there was no intersection between supported client versions and supported server versions
- # Arrary of Integers:
+ # Array of Integers:
# If there was an intersection of supported versions, the array returns will contain that intersection
def server_client_api_version_intersection(exception, supported_client_versions)
# return empty array unless 406 Unacceptable with proper header
diff --git a/lib/chef/mixin/lazy_module_include.rb b/lib/chef/mixin/lazy_module_include.rb
index 4989493d9c..3e2b9307a9 100644
--- a/lib/chef/mixin/lazy_module_include.rb
+++ b/lib/chef/mixin/lazy_module_include.rb
@@ -43,7 +43,7 @@ class Chef
#
module LazyModuleInclude
- # Most of the magick is in this hook which creates a closure over the parent class and then builds an
+ # Most of the magic is in this hook which creates a closure over the parent class and then builds an
# "infector" module which infects all descendants and which is responsible for updating the list of
# descendants in the parent class.
def included(klass)
diff --git a/lib/chef/mixin/openssl_helper.rb b/lib/chef/mixin/openssl_helper.rb
index a9201d8637..5ecb07d475 100644
--- a/lib/chef/mixin/openssl_helper.rb
+++ b/lib/chef/mixin/openssl_helper.rb
@@ -337,13 +337,13 @@ class Chef
end
# add a serial given in the crl given
- # @param [Hash] revoke_info serial to revoke & revokation reason
+ # @param [Hash] revoke_info serial to revoke & revocation reason
# @param [OpenSSL::X509::CRL] crl X509 CRL
# @param [OpenSSL::PKey::EC, OpenSSL::PKey::RSA] ca_private_key private key from the CA
# @param [Hash] info issuer & validity
# @return [OpenSSL::X509::CRL]
def revoke_x509_crl(revoke_info, crl, ca_private_key, info)
- raise TypeError, "revoke_info must be a Ruby Hash oject" unless revoke_info.is_a?(Hash)
+ raise TypeError, "revoke_info must be a Ruby Hash object" unless revoke_info.is_a?(Hash)
raise TypeError, "crl must be a Ruby OpenSSL::X509::CRL object" unless crl.is_a?(::OpenSSL::X509::CRL)
raise TypeError, "ca_private_key must be a Ruby OpenSSL::PKey::EC object or a Ruby OpenSSL::PKey::RSA object" unless ca_private_key.is_a?(::OpenSSL::PKey::EC) || ca_private_key.is_a?(::OpenSSL::PKey::RSA)
raise TypeError, "info must be a Ruby Hash" unless info.is_a?(Hash)
diff --git a/lib/chef/mixin/securable.rb b/lib/chef/mixin/securable.rb
index e6dd5043c8..d783bc9d0b 100644
--- a/lib/chef/mixin/securable.rb
+++ b/lib/chef/mixin/securable.rb
@@ -97,7 +97,7 @@ class Chef
#
# * `:permissions`: Integer of Windows permissions flags, 1..2^32
# or one of `[:full_control, :modify, :read_execute, :read, :write]`
- # * `:principals`: String or Array of Strings represnting usernames on
+ # * `:principals`: String or Array of Strings representing usernames on
# the system.
# * `:applies_to_children` (optional): Boolean
# * `:applies_to_self` (optional): Boolean
diff --git a/lib/chef/mixin/shell_out.rb b/lib/chef/mixin/shell_out.rb
index 658442fd6d..161699805a 100644
--- a/lib/chef/mixin/shell_out.rb
+++ b/lib/chef/mixin/shell_out.rb
@@ -27,7 +27,7 @@ class Chef
# all consumers should now call shell_out!/shell_out.
#
# the shell_out_compacted/shell_out_compacted! APIs are private but are intended for use
- # in rspec tests, and should ideally always be used to make code refactorings that do not
+ # in rspec tests, and should ideally always be used to make code refactoring that do not
# change behavior easier:
#
# allow(provider).to receive(:shell_out_compacted!).with("foo", "bar", "baz")
diff --git a/lib/chef/property.rb b/lib/chef/property.rb
index a29286c21b..f55c7cfc9c 100644
--- a/lib/chef/property.rb
+++ b/lib/chef/property.rb
@@ -53,7 +53,7 @@ class Chef
end
# This is to support #deprecated_property_alias, by emitting an alias and a
- # deprecatation warning when called.
+ # deprecation warning when called.
#
# @param from [String] Name of the deprecated property
# @param to [String] Name of the correct property
@@ -241,7 +241,7 @@ class Chef
end
#
- # A desciption of the default value of this property.
+ # A description of the default value of this property.
#
# @return [String]
#
diff --git a/lib/chef/provider/group/pw.rb b/lib/chef/provider/group/pw.rb
index c018de8d4d..5f5b44f106 100644
--- a/lib/chef/provider/group/pw.rb
+++ b/lib/chef/provider/group/pw.rb
@@ -75,7 +75,7 @@ class Chef
def set_options
opts = [ new_resource.group_name ]
if new_resource.gid && (current_resource.gid != new_resource.gid)
- logger.trace("#{new_resource}: current gid (#{current_resource.gid}) doesnt match target gid (#{new_resource.gid}), changing it")
+ logger.trace("#{new_resource}: current gid (#{current_resource.gid}) doesn't match target gid (#{new_resource.gid}), changing it")
opts << "-g"
opts << new_resource.gid
end
diff --git a/lib/chef/provider/package.rb b/lib/chef/provider/package.rb
index bf3e179937..7e144e83b4 100644
--- a/lib/chef/provider/package.rb
+++ b/lib/chef/provider/package.rb
@@ -440,7 +440,7 @@ class Chef
when :install
if new_version
if version_requirement_satisfied?(current_version, new_version)
- logger.trace("#{new_resource} #{package_name} #{current_version} satisifies #{new_version} requirement")
+ logger.trace("#{new_resource} #{package_name} #{current_version} satisfies #{new_version} requirement")
target_version_array.push(nil)
elsif current_version && !allow_downgrade && version_compare(current_version, new_version) == 1
logger.warn("#{new_resource} #{package_name} has installed version #{current_version}, which is newer than available version #{new_version}. Skipping...)")
diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb
index fd93affd97..ccaa158e27 100644
--- a/lib/chef/provider/package/rubygems.rb
+++ b/lib/chef/provider/package/rubygems.rb
@@ -101,7 +101,7 @@ class Chef
# filter is needed in case of things like `foo-*.gemspec` also
# matching a gem named `foo-bar`.
stubs.select! { |stub| stub.name == gem_dep.name && gem_dep.requirement.satisfied_by?(stub.version) }
- # This isn't sorting before returning beacuse the only code that
+ # This isn't sorting before returning because the only code that
# uses this method calls `max_by` so it doesn't need to be sorted.
stubs
elsif rubygems_version >= Gem::Version.new("1.8.0")
diff --git a/lib/chef/provider/package/yum/rpm_utils.rb b/lib/chef/provider/package/yum/rpm_utils.rb
index 4810295a61..50019e02cd 100644
--- a/lib/chef/provider/package/yum/rpm_utils.rb
+++ b/lib/chef/provider/package/yum/rpm_utils.rb
@@ -20,7 +20,7 @@ require_relative "../../package"
#
# BUGGY AND DEPRECATED: This ruby code is known to not match the python implementation for version comparisons.
-# The APIs here should probably be converted to talk to the PythonHelper or just abandonded completely.
+# The APIs here should probably be converted to talk to the PythonHelper or just abandoned completely.
#
# e.g. this should just use Chef::Provider::Package::Yum::PythonHelper.instance.compare_versions(x,y)
#
diff --git a/lib/chef/provider/powershell_script.rb b/lib/chef/provider/powershell_script.rb
index 1bdcc9c08b..5cdac3a46f 100644
--- a/lib/chef/provider/powershell_script.rb
+++ b/lib/chef/provider/powershell_script.rb
@@ -121,7 +121,7 @@ class Chef
Import-Module Microsoft.PowerShell.Utility
}
- # LASTEXITCODE can be uninitialized -- make it explictly 0
+ # LASTEXITCODE can be uninitialized -- make it explicitly 0
# to avoid incorrect detection of failure (non-zero) codes
$global:LASTEXITCODE = 0
diff --git a/lib/chef/provider/registry_key.rb b/lib/chef/provider/registry_key.rb
index 385dc326e4..7851ea2e78 100644
--- a/lib/chef/provider/registry_key.rb
+++ b/lib/chef/provider/registry_key.rb
@@ -92,7 +92,7 @@ class Chef
end
requirements.assert(:delete_key) do |a|
- # If key to be deleted has subkeys but recurssive == false
+ # If key to be deleted has subkeys but recursive == false
a.assertion { !registry.key_exists?(new_resource.key) || !registry.has_subkeys?(new_resource.key) || new_resource.recursive }
a.failure_message(Chef::Exceptions::Win32RegNoRecursive, "#{new_resource.key} has subkeys but recursive is set to false.")
a.whyrun("#{current_resource.key} has subkeys, but recursive is set to false. attempt to delete would fails unless subkeys were deleted prior to this action.")
diff --git a/lib/chef/provider/service/freebsd.rb b/lib/chef/provider/service/freebsd.rb
index 7733831945..01f7adef9f 100644
--- a/lib/chef/provider/service/freebsd.rb
+++ b/lib/chef/provider/service/freebsd.rb
@@ -67,7 +67,7 @@ class Chef
requirements.assert(:all_actions) do |a|
a.assertion { enabled_state_found }
- # for consistentcy with original behavior, this will not fail in non-whyrun mode;
+ # for consistency with original behavior, this will not fail in non-whyrun mode;
# rather it will silently set enabled state=>false
a.whyrun "Unable to determine enabled/disabled state, assuming this will be correct for an actual run. Assuming disabled."
end
diff --git a/lib/chef/provider/systemd_unit.rb b/lib/chef/provider/systemd_unit.rb
index f1b104de21..99b72e0865 100644
--- a/lib/chef/provider/systemd_unit.rb
+++ b/lib/chef/provider/systemd_unit.rb
@@ -121,9 +121,9 @@ class Chef
end
action :reenable do
- converge_by("reenabling unit: #{new_resource.unit_name}") do
+ converge_by("re-enabling unit: #{new_resource.unit_name}") do
systemctl_execute!(:reenable, new_resource.unit_name)
- logger.info("#{new_resource} reenabled")
+ logger.info("#{new_resource} re-enabled")
end
end
diff --git a/lib/chef/provider/user/mac.rb b/lib/chef/provider/user/mac.rb
index fb220b2128..312d2a7b47 100644
--- a/lib/chef/provider/user/mac.rb
+++ b/lib/chef/provider/user/mac.rb
@@ -193,7 +193,7 @@ class Chef
# NOTE: Here we're managing the primary group of the user which is
# a departure from previous behavior. We could just set the
# PrimaryGroupID for the user and move on if we decide that actual
- # group magement should be done outside of the core resource.
+ # group management should be done outside of the core resource.
group_name, group_id, group_action = user_group_info
group group_name do
diff --git a/lib/chef/provider/user/solaris.rb b/lib/chef/provider/user/solaris.rb
index 57893d23d5..a3e3c49ae6 100644
--- a/lib/chef/provider/user/solaris.rb
+++ b/lib/chef/provider/user/solaris.rb
@@ -118,7 +118,7 @@ class Chef
write_shadow_file
end
- # XXX: this was straight copypasta'd back in 2013 and I don't think we've ever evaluted using
+ # XXX: this was straight copy-paste's back in 2013 and I don't think we've ever evaluated using
# a pipe to passwd(1) or evaluating modern ruby-shadow. See https://github.com/chef/chef/pull/721
def write_shadow_file
buffer = Tempfile.new("shadow", "/etc")
diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb
index bf53a45233..79975b15b8 100644
--- a/lib/chef/provider/windows_task.rb
+++ b/lib/chef/provider/windows_task.rb
@@ -214,7 +214,7 @@ class Chef
logger.info "#{new_resource} task exists"
if %w{ready running}.include?(current_resource.task.status)
converge_by("#{new_resource} task disabled") do
- # TODO: in win32-taskscheduler there is no method whcih disbales the task so currently calling disable with schtasks.exe
+ # TODO: in win32-taskscheduler there is no method which disables the task so currently calling disable with schtasks.exe
run_schtasks "CHANGE", "DISABLE" => ""
end
else
@@ -322,7 +322,7 @@ class Chef
# TODO : Try to optimize this method
# known issue : Since start_day and time is not mandatory while updating weekly frequency for which start_day is not mentioned by user idempotency
- # is not gettting maintained as new_resource.start_day is nil and we fetch the day of week from start_day to set and its currently coming as nil and don't match with current_task
+ # is not getting maintained as new_resource.start_day is nil and we fetch the day of week from start_day to set and its currently coming as nil and don't match with current_task
def task_needs_update?(task)
flag = false
if new_resource.frequency == :none
@@ -549,7 +549,7 @@ class Chef
end
end
- # TODO: while creating the configuration settings win32-taskscheduler it accepts execution time limit values in ISO8601 formata
+ # TODO: while creating the configuration settings win32-taskscheduler it accepts execution time limit values in ISO8601 format
def config_settings
settings = {
execution_time_limit: new_resource.execution_time_limit,
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb
index 9cdf28dd9a..bbbe714f3d 100644
--- a/lib/chef/resource.rb
+++ b/lib/chef/resource.rb
@@ -165,7 +165,7 @@ class Chef
end
end
- # Alias for normal assigment syntax.
+ # Alias for normal assignment syntax.
alias_method :action=, :action
#
@@ -1004,7 +1004,7 @@ class Chef
#
# The action that will be run if no other action is specified.
#
- # Setting default_action will automatially add the action to
+ # Setting default_action will automatically add the action to
# allowed_actions, if it isn't already there.
#
# Defaults to [:nothing].
@@ -1111,7 +1111,7 @@ class Chef
# class evaluation time when the Custom Resource is being constructed.
#
# This happens the first time the ruby parser hits an `action` or an
- # `action_class` method, the presence of either indiates that this is
+ # `action_class` method, the presence of either indicates that this is
# going to be a Chef-12.5 custom resource. If we never see one of these
# directives then we are constructing an old-style Resource+Provider or
# LWRP or whatevs.
diff --git a/lib/chef/resource/file/verification.rb b/lib/chef/resource/file/verification.rb
index 59d0981ddc..65569aa15d 100644
--- a/lib/chef/resource/file/verification.rb
+++ b/lib/chef/resource/file/verification.rb
@@ -36,7 +36,7 @@ class Chef
# ruby block, which will be called, or a string, which will be
# executed as a Shell command.
#
- # Additonally, Chef or third-party verifications can ship
+ # Additionally, Chef or third-party verifications can ship
# "registered verifications" that the user can use by specifying
# a :symbol as the command name.
#
diff --git a/lib/chef/resource/helpers/cron_validations.rb b/lib/chef/resource/helpers/cron_validations.rb
index 29cd4dcd55..8508d7f07c 100644
--- a/lib/chef/resource/helpers/cron_validations.rb
+++ b/lib/chef/resource/helpers/cron_validations.rb
@@ -32,7 +32,7 @@ class Chef
return spec >= min && spec <= max
end
- # Lists of invidual values, ranges, and step values all share the validity range for type
+ # Lists of individual values, ranges, and step values all share the validity range for type
spec.split(%r{\/|-|,}).each do |x|
next if x == "*"
return false unless x =~ /^\d+$/
diff --git a/lib/chef/resource/hostname.rb b/lib/chef/resource/hostname.rb
index e2d3465d96..d6e08175ea 100644
--- a/lib/chef/resource/hostname.rb
+++ b/lib/chef/resource/hostname.rb
@@ -122,7 +122,7 @@ class Chef
r.notifies :reload, "ohai[reload hostname]"
end
- # setup the hostname to perist on a reboot
+ # setup the hostname to persist on a reboot
case
when ::File.exist?("/usr/sbin/scutil")
# darwin
diff --git a/lib/chef/resource/macos_userdefaults.rb b/lib/chef/resource/macos_userdefaults.rb
index 659dd1dde8..ce9cebb053 100644
--- a/lib/chef/resource/macos_userdefaults.rb
+++ b/lib/chef/resource/macos_userdefaults.rb
@@ -108,7 +108,7 @@ class Chef
cmd << value
# FIXME: this should use cmd directly as an array argument, but then the quoting
- # of indiviual args above needs to be removed as well.
+ # of individual args above needs to be removed as well.
execute cmd.join(" ") do
user new_resource.user unless new_resource.user.nil?
end
diff --git a/lib/chef/resource/openssl_x509_certificate.rb b/lib/chef/resource/openssl_x509_certificate.rb
index 4f89986ad3..4a09208740 100644
--- a/lib/chef/resource/openssl_x509_certificate.rb
+++ b/lib/chef/resource/openssl_x509_certificate.rb
@@ -146,7 +146,7 @@ class Chef
description: "The passphrase for CA private key's passphrase."
property :renew_before_expiry, Integer,
- description: "The number of days before the expiry. The certificate will be automaticaly renewed when the value is reached.",
+ description: "The number of days before the expiry. The certificate will be automatically renewed when the value is reached.",
introduced: "15.7"
action :create do
diff --git a/lib/chef/resource/powershell_script.rb b/lib/chef/resource/powershell_script.rb
index 49f1fa75fa..f15a13ef60 100644
--- a/lib/chef/resource/powershell_script.rb
+++ b/lib/chef/resource/powershell_script.rb
@@ -33,7 +33,7 @@ class Chef
# and should use defaults in this case
input
else
- # The last occurance of a flag would override its
+ # The last occurrence of a flag would override its
# previous one at the time of command execution.
[default_flags, input].join(" ")
end
@@ -46,7 +46,7 @@ class Chef
" executes a temporary file (similar to how the script resource behaves), rather than running"\
" the command inline. Commands that are executed with this resource are (by their nature) not"\
" idempotent, as they are typically unique to the environment in which they are run. Use not_if"\
- " and only_if to guard this resource for idempotence."
+ " and only_if to guard this resource for idempotent."
def initialize(name, run_context = nil)
super(name, run_context, :powershell_script, "powershell.exe")
diff --git a/lib/chef/resource/sudo.rb b/lib/chef/resource/sudo.rb
index c340478349..c473910114 100644
--- a/lib/chef/resource/sudo.rb
+++ b/lib/chef/resource/sudo.rb
@@ -35,7 +35,7 @@ class Chef
" and RHEL (6+) all support this feature."
introduced "14.0"
- # acording to the sudo man pages sudo will ignore files in an include dir that have a `.` or `~`
+ # According to the sudo man pages sudo will ignore files in an include dir that have a `.` or `~`
# We convert either to `__`
property :filename, String,
description: "The name of the sudoers.d file if it differs from the name of the resource block",
diff --git a/lib/chef/resource/timezone.rb b/lib/chef/resource/timezone.rb
index 32727c1a75..7d9699cbbc 100644
--- a/lib/chef/resource/timezone.rb
+++ b/lib/chef/resource/timezone.rb
@@ -102,7 +102,7 @@ class Chef
def current_darwin_tz
tz_shellout = shell_out!("systemsetup -gettimezone")
if /You need administrator access/.match?(tz_shellout.stdout)
- raise "The timezone resource requires adminstrative priveleges to run on macOS hosts!"
+ raise "The timezone resource requires administrative privileges to run on macOS hosts!"
else
/Time Zone: (.*)/.match(tz_shellout.stdout)[1]
end
diff --git a/lib/chef/resource/windows_ad_join.rb b/lib/chef/resource/windows_ad_join.rb
index 690cc914dc..16c40a70ef 100644
--- a/lib/chef/resource/windows_ad_join.rb
+++ b/lib/chef/resource/windows_ad_join.rb
@@ -167,8 +167,8 @@ class Chef
#
# @return [String] the correct user and domain to use.
- # if the domain_user property contains an @ symbol followed by any number of non white space characheters
- # then we assume it is a user from another domain than the one specifed in the resource domain_name property.
+ # if the domain_user property contains an @ symbol followed by any number of non white space characters
+ # then we assume it is a user from another domain than the one specified in the resource domain_name property.
# if this is the case we do not append the domain_name property to the domain_user property
# the domain_user and domain_name form the UPN (userPrincipalName)
# The specification for the UPN format is RFC 822
diff --git a/lib/chef/resource/windows_certificate.rb b/lib/chef/resource/windows_certificate.rb
index 64e566f6af..9c524fc3cc 100644
--- a/lib/chef/resource/windows_certificate.rb
+++ b/lib/chef/resource/windows_certificate.rb
@@ -63,7 +63,7 @@ class Chef
# Extension of the certificate
ext = ::File.extname(new_resource.source)
- # PFX certificates contains private keys and we import them with some other aproach
+ # PFX certificates contains private keys and we import them with some other approach
import_certificates(fetch_cert_object(ext), (ext == ".pfx"))
end
diff --git a/lib/chef/resource/yum_package.rb b/lib/chef/resource/yum_package.rb
index 0a0f4b3e71..c2a8213f4b 100644
--- a/lib/chef/resource/yum_package.rb
+++ b/lib/chef/resource/yum_package.rb
@@ -38,7 +38,7 @@ class Chef
#
# <lecture>
# THIS is why updating the new_resource in a provider is so terrible, and is equivalent to methods scribbling over
- # its own arguments as unintended side-effects (and why functional languages that don't allow modifcations
+ # its own arguments as unintended side-effects (and why functional languages that don't allow modifications
# of variables eliminate entire classes of bugs).
# </lecture>
property :package_name, [ String, Array ],
diff --git a/lib/chef/resource_collection.rb b/lib/chef/resource_collection.rb
index da675fc4de..0e5c29e619 100644
--- a/lib/chef/resource_collection.rb
+++ b/lib/chef/resource_collection.rb
@@ -48,7 +48,7 @@ class Chef
# @param resource [Chef::Resource] The resource to insert
# @param resource_type [String,Symbol] If known, the resource type used in the recipe, Eg `package`, `execute`
- # @param instance_name [String] If known, the recource name as used in the recipe, IE `vim` in `package 'vim'`
+ # @param instance_name [String] If known, the resource name as used in the recipe, IE `vim` in `package 'vim'`
# This method is meant to be the 1 insert method necessary in the future. It should support all known use cases
# for writing into the ResourceCollection.
def insert(resource, opts = {})
diff --git a/lib/chef/resource_reporter.rb b/lib/chef/resource_reporter.rb
index c8517dfc83..3ff560e046 100644
--- a/lib/chef/resource_reporter.rb
+++ b/lib/chef/resource_reporter.rb
@@ -1,7 +1,7 @@
#
# Author:: Daniel DeLeo (<dan@chef.io>)
# Author:: Prajakta Purohit (prajakta@chef.io>)
-# Auther:: Tyler Cloke (<tyler@opscode.com>)
+# Author:: Tyler Cloke (<tyler@opscode.com>)
#
# Copyright:: Copyright 2012-2020, Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/lib/chef/run_context.rb b/lib/chef/run_context.rb
index 70f403ddb6..e5d9f5acd6 100644
--- a/lib/chef/run_context.rb
+++ b/lib/chef/run_context.rb
@@ -307,7 +307,7 @@ class Chef
immediate_notification_collection[key]
end
- # Get the list of immeidate notifications pending to the given resource
+ # Get the list of immediate notifications pending to the given resource
#
# @return [Array[Notification]]
#
diff --git a/lib/chef/runner.rb b/lib/chef/runner.rb
index 8c68554af5..015f1e9cbb 100644
--- a/lib/chef/runner.rb
+++ b/lib/chef/runner.rb
@@ -70,7 +70,7 @@ class Chef
end
end
- # Actually run the action for realsies
+ # Actually run the action for releases
resource.run_action(action, notification_type, notifying_resource)
# Execute any immediate and queue up any delayed notifications
diff --git a/lib/chef/shell.rb b/lib/chef/shell.rb
index d22400176c..fbee4c093b 100644
--- a/lib/chef/shell.rb
+++ b/lib/chef/shell.rb
@@ -110,7 +110,7 @@ module Shell
end
# Set the irb_conf object to something other than IRB.conf
- # usful for testing.
+ # useful for testing.
def self.irb_conf=(conf_hash)
@irb_conf = conf_hash
end
diff --git a/lib/chef/util/dsc/local_configuration_manager.rb b/lib/chef/util/dsc/local_configuration_manager.rb
index c0c05faba9..e389e7214b 100644
--- a/lib/chef/util/dsc/local_configuration_manager.rb
+++ b/lib/chef/util/dsc/local_configuration_manager.rb
@@ -90,7 +90,7 @@ class Chef::Util::DSC
def log_dsc_exception(dsc_exception_output)
if whatif_not_supported?(dsc_exception_output)
- # LCM returns an error if any of the resources do not support the opptional What-If
+ # LCM returns an error if any of the resources do not support the optional What-If
Chef::Log.warn("Received error while testing configuration due to resource not supporting 'WhatIf'")
elsif dsc_module_import_failure?(dsc_exception_output)
Chef::Log.warn("Received error while testing configuration due to a module for an imported resource possibly not being fully installed:\n#{dsc_exception_output.gsub(/\s+/, " ")}")
diff --git a/lib/chef/win32/api/file.rb b/lib/chef/win32/api/file.rb
index bdc2d6f6e5..46f4658a4c 100644
--- a/lib/chef/win32/api/file.rb
+++ b/lib/chef/win32/api/file.rb
@@ -513,7 +513,7 @@ BOOL WINAPI VerQueryValue(
# takes the given path pre-pends "\\?\" and
# UTF-16LE encodes it. Used to prepare paths
- # to be passed to the *W vesion of WinAPI File
+ # to be passed to the *W version of WinAPI File
# functions.
# This function is used by the "Link" resources where we need
# preserve relative paths because symbolic links can actually
diff --git a/lib/chef/win32/mutex.rb b/lib/chef/win32/mutex.rb
index cee0743f71..a8f0ebeb1c 100644
--- a/lib/chef/win32/mutex.rb
+++ b/lib/chef/win32/mutex.rb
@@ -68,7 +68,7 @@ class Chef
end
#####################################################
- # Releaes the mutex
+ # Releases the mutex
def release
# http://msdn.microsoft.com/en-us/library/windows/desktop/ms685066(v=vs.85).aspx
# Note that release method needs to be called more than once