diff options
79 files changed, 145 insertions, 112 deletions
diff --git a/cspell.json b/cspell.json index cda2f828ed..e4ba79f90d 100644 --- a/cspell.json +++ b/cspell.json @@ -130,6 +130,7 @@ "Depsolving", "Devaux", "Dfsn", + "Dhanesh", "Dheeraj", "Dialup", "Dibowitz", @@ -555,6 +556,7 @@ "RUBYLIB", "RUBYOPT", "RXACT", + "Raghavan", "Rakvåg", "Ranjib", "Rebooter", @@ -773,6 +775,7 @@ "argdup", "arity", "artem", + "asdf", "astoltz", "astring", "attribs", @@ -794,6 +797,7 @@ "autovivifying", "backcompat", "backoff", + "backport", "backported", "backslashing", "backtrace", @@ -863,6 +867,7 @@ "chefignores", "chefscriptresult", "chefspec", + "chefstyle", "chefzero", "chgroup", "chgrp", @@ -910,6 +915,7 @@ "contruct", "convertto", "cookbookname", + "cookiecurse", "cookstyle", "coookbook", "copypasta", @@ -978,6 +984,7 @@ "downcase", "downcased", "dracut", + "dragonflybsd", "dragonsmith", "drcmd", "drzewiec", @@ -1028,6 +1035,7 @@ "faststart", "faststop", "fatals", + "fauxhai", "featurename", "fflags", "fieldname", @@ -1079,6 +1087,7 @@ "gethostname", "getlogin", "getmodhandle", + "getnode", "getobj", "getppid", "getprint", @@ -1110,6 +1119,7 @@ "gsingla", "gsub", "gzipped", + "habicat", "hacky", "halp", "hardstatus", @@ -1183,6 +1193,7 @@ "ipaddr", "ipaddress", "ipscopes", + "iptables", "isalnum", "isalpha", "isatty", @@ -1201,6 +1212,7 @@ "jdoe", "jeremyhage", "jeroenj", + "jimwise", "jjustice", "jkeiser", "josephmilla", @@ -1246,6 +1258,7 @@ "lifecycle", "lifecycles", "linode", + "linuxmint", "listprop", "ljust", "lltstype", @@ -1270,6 +1283,7 @@ "lpsz", "lsfs", "lslpp", + "lsof", "lspci", "lssrc", "lstat", @@ -1336,6 +1350,7 @@ "mounttab", "mpkg", "msgarbossa", + "msgmax", "msiexec", "mswin", "msys", @@ -1409,6 +1424,7 @@ "nproc", "nread", "nsis", + "ntpd", "nyan", "objfs", "objs", @@ -1427,6 +1443,7 @@ "openid", "openindiana", "opensolaris", + "openssh", "openssl", "openstack", "opensuse", @@ -1475,6 +1492,7 @@ "policyfile", "popen", "portageq", + "powerpc", "ppid", "ppmd", "prco", @@ -1511,6 +1529,7 @@ "quickconfig", "qword", "ramereth", + "raspbian", "rassoc", "rbag", "rbconfig", @@ -1667,6 +1686,7 @@ "somefile", "someotherfile", "sourceline", + "sparc", "spawninstance", "specdoc", "sprintf", @@ -1894,6 +1914,7 @@ "xenial", "xinetd", "yajl", + "yardoc", "yieldparam", "yocto", "yolo", @@ -1924,7 +1945,8 @@ "**/Berksfile", "spec/data/**/*", "lib/chef/provider/package/yum/simplejson/**/*", - "lib/chef/provider/package/yum/simplejson/*" + "lib/chef/provider/package/yum/simplejson/*", + "spec/**" ], "ignoreRegExpList": [ // Ignore "'s" at the end of a word. If "Chef" is an accepted word, so is "Chef's". diff --git a/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb b/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb index 3719210534..9bc348482b 100644 --- a/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb @@ -60,7 +60,7 @@ class Chef AclDir.new(entity_type, self) end end - @children << AclEntry.new("organization.json", self, true) # the org acl is retrieved as GET /organizations/ORGNAME/ANYTHINGATALL/_acl + @children << AclEntry.new("organization.json", self, true) # the org acl is retrieved as GET /organizations/ORGNAME/ANYTHING/_acl end @children end diff --git a/lib/chef/chef_fs/file_system/repository/directory.rb b/lib/chef/chef_fs/file_system/repository/directory.rb index c494d54b21..8d227fd9d2 100644 --- a/lib/chef/chef_fs/file_system/repository/directory.rb +++ b/lib/chef/chef_fs/file_system/repository/directory.rb @@ -104,7 +104,7 @@ class Chef children.empty? end - # Public API callied by chef_fs/file_system + # Public API called by chef_fs/file_system def child(name) possible_child = make_child_entry(name) if possible_child.name_valid? diff --git a/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb b/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb index 1780b56239..08fbcd4a41 100644 --- a/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb +++ b/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb @@ -235,7 +235,7 @@ class Chef # The order of these checks is important, as well, to be thread safe. # 1. If @unconsumed_input.empty? is true, then we will never have any more # work legitimately picked up. - # 2. If @in_process == 0, then there is no work in process, and because ofwhen unconsumed_input is empty, it will never go back up, because + # 2. If @in_process == 0, then there is no work in process, and because of when unconsumed_input is empty, it will never go back up, because # this is called after the input enumerator is finished. Note that switching #2 and #1 # could cause a race, because in_process is incremented *before* consuming input. # 3. If @unconsumed_output.empty? is true, then we are done with outputs. diff --git a/lib/chef/chef_fs/path_utils.rb b/lib/chef/chef_fs/path_utils.rb index b8a83ab09f..31f1f6f12a 100644 --- a/lib/chef/chef_fs/path_utils.rb +++ b/lib/chef/chef_fs/path_utils.rb @@ -71,9 +71,9 @@ class Chef # part that actually exists. The paths operated on here are not Chef-FS paths. # These are OS paths that may contain symlinks but may not also fully exist. # - # If /x is a symlink to /blarghle, and has no subdirectories, then: - # PathUtils.realest_path('/x/y/z') == '/blarghle/y/z' - # PathUtils.realest_path('/x/*/z') == '/blarghle/*/z' + # If /x is a symlink to /foo_bar, and has no subdirectories, then: + # PathUtils.realest_path('/x/y/z') == '/foo_bar/y/z' + # PathUtils.realest_path('/x/*/z') == '/foo_bar/*/z' # PathUtils.realest_path('/*/y/z') == '/*/y/z' # # TODO: Move this to wherever util/path_helper is these days. diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb index 626a5d423b..61f1b8ac2d 100644 --- a/lib/chef/cookbook/cookbook_version_loader.rb +++ b/lib/chef/cookbook/cookbook_version_loader.rb @@ -23,7 +23,7 @@ class Chef class Cookbook # 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. + # server or solo/zero modes. # # This seems to be mostly a glorified factory method for creating CookbookVersion # objects now, with creating Metadata objects bolted onto the side? It used diff --git a/lib/chef/cookbook/file_system_file_vendor.rb b/lib/chef/cookbook/file_system_file_vendor.rb index 9cf3593838..a4a6711270 100644 --- a/lib/chef/cookbook/file_system_file_vendor.rb +++ b/lib/chef/cookbook/file_system_file_vendor.rb @@ -27,7 +27,7 @@ class Chef # and throws the rest away then re-builds the list of files on the # disk. This is due to the manifest not having the on-disk file # locations, since in the chef-client case, that information is - # non-sensical. + # nonsensical. class FileSystemFileVendor < FileVendor attr_reader :cookbook_name diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb index ef0b920b5f..c1393abcab 100644 --- a/lib/chef/cookbook/metadata.rb +++ b/lib/chef/cookbook/metadata.rb @@ -357,7 +357,7 @@ class Chef # Array<String> - array of files or globs to eagerly load, otherwise it is treated like `false` # # @params arg [Array,String,TrueClass,FalseClass] - # @params [Array,TrueClass,FalseCalss] + # @params [Array,TrueClass,FalseClass] def eager_load_libraries(arg = nil) set_or_return( :eager_load_libraries, diff --git a/lib/chef/cookbook_loader.rb b/lib/chef/cookbook_loader.rb index 1ee447c51f..35807410bb 100644 --- a/lib/chef/cookbook_loader.rb +++ b/lib/chef/cookbook_loader.rb @@ -27,7 +27,7 @@ require_relative "cookbook/metadata" class Chef # This class is used by knife, cheffs and legacy chef-solo modes. It is not used by the server mode - # of chef-client or zolo/zero modes. + # of chef-client or solo/zero modes. # # This class implements orchestration around producing a single cookbook_version for a cookbook or # loading a Mash of all cookbook_versions, using the cookbook_version_loader class, and doing @@ -138,7 +138,7 @@ class Chef cookbooks_by_name.values end - # This method creates tmp directory and copies all cookbooks into it and creates cookbook loder object which points to tmp directory + # This method creates tmp directory and copies all cookbooks into it and creates cookbook loader object which points to tmp directory def self.copy_to_tmp_dir_from_array(cookbooks) tmp_cookbook_file = Tempfile.new("tmp_working_dir_path") tmp_cookbook_file.close diff --git a/lib/chef/cookbook_manifest.rb b/lib/chef/cookbook_manifest.rb index 3b45da121a..765133b49a 100644 --- a/lib/chef/cookbook_manifest.rb +++ b/lib/chef/cookbook_manifest.rb @@ -44,7 +44,7 @@ class Chef # cookbook_version in the "manifest" format, or #to_json to get a JSON # representation of the cookbook_version. # - # The inferface for this behavior is expected to change as we implement new + # The interface for this behavior is expected to change as we implement new # manifest formats. The entire class should be considered a private API for # now. # diff --git a/lib/chef/cookbook_site_streaming_uploader.rb b/lib/chef/cookbook_site_streaming_uploader.rb index e719be8de6..1598808234 100644 --- a/lib/chef/cookbook_site_streaming_uploader.rb +++ b/lib/chef/cookbook_site_streaming_uploader.rb @@ -147,7 +147,7 @@ class Chef class << res alias :to_s :body - # BUGBUG this makes the response compatible with what respsonse_steps expects to test headers (response.headers[] -> response[]) + # BUG this makes the response compatible with what response_steps expects to test headers (response.headers[] -> response[]) def headers # rubocop:disable Lint/NestedMethodDefinition self end diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb index 12adb50b4c..2e9bb77151 100644 --- a/lib/chef/cookbook_version.rb +++ b/lib/chef/cookbook_version.rb @@ -358,7 +358,7 @@ class Chef # extract the preference part from the path. if manifest_record_path =~ %r{(#{Regexp.escape(segment.to_s)}/[^/]+/#{Regexp.escape(dirname)})/.+$} - # Note the specificy_dirname includes the segment and + # Note the specificity_dirname includes the segment and # dirname argument as above, which is what # preferences_for_path returns. It could be # "files/ubuntu-9.10/dirname", for example. @@ -566,7 +566,7 @@ class Chef def find_preferred_manifest_record(node, segment, filename) preferences = preferences_for_path(node, segment, filename) - # in order of prefernce, look for the filename in the manifest + # in order of preference, look for the filename in the manifest preferences.find { |preferred_filename| manifest_records_by_path[preferred_filename] } end diff --git a/lib/chef/data_collector.rb b/lib/chef/data_collector.rb index e0145b177d..6c7b2edb56 100644 --- a/lib/chef/data_collector.rb +++ b/lib/chef/data_collector.rb @@ -184,7 +184,7 @@ class Chef begin code = e&.response&.code&.to_s rescue - # i really dont care + # i really don't care end code ||= "No HTTP Code" diff --git a/lib/chef/data_collector/error_handlers.rb b/lib/chef/data_collector/error_handlers.rb index 36252149a2..5cda3bde10 100644 --- a/lib/chef/data_collector/error_handlers.rb +++ b/lib/chef/data_collector/error_handlers.rb @@ -18,7 +18,7 @@ class Chef class DataCollector - # This module isolates the handling of collecting error descriptions to insert into the data_colletor + # This module isolates the handling of collecting error descriptions to insert into the data_collector # 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. # diff --git a/lib/chef/decorator/lazy_array.rb b/lib/chef/decorator/lazy_array.rb index 7e3177c713..9859c49d77 100644 --- a/lib/chef/decorator/lazy_array.rb +++ b/lib/chef/decorator/lazy_array.rb @@ -21,8 +21,8 @@ class Chef class Decorator # Lazy Array around Lazy Objects # - # This only lazys access through `#[]`. In order to implement #each we need to - # know how many items we have and what their indexes are, so we'd have to evalute + # This makes access lazy through `#[]`. In order to implement #each we need to + # know how many items we have and what their indexes are, so we'd have to evaluate # the proc which makes that impossible. You can call methods like #each and the # decorator will forward the method, but item access will not be lazy. # diff --git a/lib/chef/dsl/declare_resource.rb b/lib/chef/dsl/declare_resource.rb index 02ad64c77a..8053098085 100644 --- a/lib/chef/dsl/declare_resource.rb +++ b/lib/chef/dsl/declare_resource.rb @@ -151,7 +151,7 @@ class Chef # source "y.txt.erb" # variables {} # end - # resource.variables.merge!({ home: "/home/klowns" }) + # resource.variables.merge!({ home: "/home/clowns" }) # def edit_resource(type, name, created_at: nil, run_context: self.run_context, &resource_attrs_block) edit_resource!(type, name, created_at: created_at, run_context: run_context, &resource_attrs_block) diff --git a/lib/chef/formatters/base.rb b/lib/chef/formatters/base.rb index 3e2c3cc6b0..2471cfe844 100644 --- a/lib/chef/formatters/base.rb +++ b/lib/chef/formatters/base.rb @@ -142,7 +142,7 @@ class Chef # Generic callback for any attribute/library/lwrp/recipe file in a # cookbook getting loaded. The per-filetype callbacks for file load are - # overriden so that they call this instead. This means that a subclass of + # overridden so that they call this instead. This means that a subclass of # Formatters::Base can implement #file_loaded to do the same thing for # every kind of file that Chef loads from a recipe instead of # implementing all the per-filetype callbacks. diff --git a/lib/chef/http.rb b/lib/chef/http.rb index 80db24fa3b..d31d4d3027 100644 --- a/lib/chef/http.rb +++ b/lib/chef/http.rb @@ -269,7 +269,7 @@ class Chef if keepalives && !base_url.nil? # only reuse the http_client if we want keepalives and have a base_url @http_client ||= {} - # the per-host per-port cache here gets peristent connections correct when + # the per-host per-port cache here gets persistent connections correct when # redirecting to different servers if base_url.is_a?(String) # sigh, this kind of abuse can't happen with strongly typed languages @http_client[base_url] ||= build_http_client(base_url) diff --git a/lib/chef/http/decompressor.rb b/lib/chef/http/decompressor.rb index abe801b654..36329ee63e 100644 --- a/lib/chef/http/decompressor.rb +++ b/lib/chef/http/decompressor.rb @@ -22,7 +22,7 @@ require_relative "http_request" class Chef class HTTP - # Middleware-esque class for handling compression in HTTP responses. + # Middleware-ish class for handling compression in HTTP responses. class Decompressor class NoopInflater def inflate(chunk) diff --git a/lib/chef/json_compat.rb b/lib/chef/json_compat.rb index 120af43d6e..79ed3f1ba2 100644 --- a/lib/chef/json_compat.rb +++ b/lib/chef/json_compat.rb @@ -28,7 +28,7 @@ class Chef class <<self - # API to use to avoid create_addtions + # API to use to avoid create_additions def parse(source, opts = {}) FFI_Yajl::Parser.parse(source, opts) rescue FFI_Yajl::ParseError => e diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb index bdab024579..2531059d37 100644 --- a/lib/chef/knife.rb +++ b/lib/chef/knife.rb @@ -327,7 +327,7 @@ class Chef end # Grab a copy before config merge occurs, so that we can later identify - # whare a given config value is sourced from. + # where a given config value is sourced from. @original_config = config.dup # copy Mixlib::CLI over so that it can be configured in config.rb/knife.rb diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index f9c3b7bb81..6e0f86240d 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -94,7 +94,7 @@ class Chef boolean: true # This option was provided in knife bootstrap windows winrm, - # but it is ignored in knife-windows/WinrmSession, and so remains unimplemeneted here. + # but it is ignored in knife-windows/WinrmSession, and so remains unimplemented here. # option :kerberos_keytab_file, # :short => "-T KEYTAB_FILE", # :long => "--keytab-file KEYTAB_FILE", @@ -275,7 +275,7 @@ class Chef accumulator } - # bootstrap override: url of a an installer shell script touse in place of omnitruck + # bootstrap override: url of a an installer shell script to use in place of omnitruck # Note that the bootstrap template _only_ references this out of Chef::Config, and not from # the provided options to knife bootstrap, so we set the Chef::Config option here. option :bootstrap_url, @@ -713,7 +713,7 @@ class Chef # Fail if using plaintext auth without ssl because # this can expose keys in plaintext on the wire. # TODO test for this method - # TODO check that the protoocol is valid. + # TODO check that the protocol is valid. def validate_winrm_transport_opts! return true unless winrm? @@ -967,7 +967,7 @@ class Chef gw_host = split[1] end gw_host, gw_port = gw_host.split(":", 2) - # TODO - validate convertable port in config validation? + # TODO - validate convertible port in config validation? gw_port = Integer(gw_port) rescue nil opts[:bastion_host] = gw_host opts[:bastion_user] = gw_user @@ -1073,7 +1073,7 @@ class Chef remote_path end - # build the command string for bootrapping + # build the command string for bootstrapping # @return String def bootstrap_command(remote_path) if connection.windows? diff --git a/lib/chef/knife/bootstrap/chef_vault_handler.rb b/lib/chef/knife/bootstrap/chef_vault_handler.rb index 00f902d728..b36c178d8e 100644 --- a/lib/chef/knife/bootstrap/chef_vault_handler.rb +++ b/lib/chef/knife/bootstrap/chef_vault_handler.rb @@ -102,7 +102,7 @@ class Chef config[:bootstrap_vault_item] end - # Helper to return a ruby object represeting all the data bags and items + # Helper to return a ruby object representing all the data bags and items # to update via chef-vault. # # @return [Hash] deserialized ruby hash with all the vault items diff --git a/lib/chef/knife/bootstrap/client_builder.rb b/lib/chef/knife/bootstrap/client_builder.rb index b2c07e8019..d9c3d83d06 100644 --- a/lib/chef/knife/bootstrap/client_builder.rb +++ b/lib/chef/knife/bootstrap/client_builder.rb @@ -86,7 +86,7 @@ class Chef config[:chef_node_name] end - # @return [String] enviroment from the config + # @return [String] environment from the config def environment config[:environment] end diff --git a/lib/chef/knife/core/hashed_command_loader.rb b/lib/chef/knife/core/hashed_command_loader.rb index c76a596dde..d31865affc 100644 --- a/lib/chef/knife/core/hashed_command_loader.rb +++ b/lib/chef/knife/core/hashed_command_loader.rb @@ -44,7 +44,7 @@ class Chef else commands = manifest[KEY]["plugins_by_category"] end - # If any of the specified plugins in the manifest dont have a valid path we will + # If any of the specified plugins in the manifest don't have a valid path we will # eventually get an error and the user will need to rehash - instead, lets just # print out 1 error here telling them to rehash errors = {} diff --git a/lib/chef/knife/core/node_presenter.rb b/lib/chef/knife/core/node_presenter.rb index 14433f8353..6690bc1075 100644 --- a/lib/chef/knife/core/node_presenter.rb +++ b/lib/chef/knife/core/node_presenter.rb @@ -94,7 +94,7 @@ class Chef def summarize(data) if data.is_a?(Chef::Node) node = data - # special case clouds with their split horizon whatsis. + # special case clouds with their split horizon thing. ip = (node[:cloud] && node[:cloud][:public_ipv4_addrs] && node[:cloud][:public_ipv4_addrs].first) || node[:ipaddress] summarized = <<~SUMMARY diff --git a/lib/chef/knife/core/status_presenter.rb b/lib/chef/knife/core/status_presenter.rb index c8b3a23636..9a4ea76508 100644 --- a/lib/chef/knife/core/status_presenter.rb +++ b/lib/chef/knife/core/status_presenter.rb @@ -95,7 +95,7 @@ class Chef summarized = "" list.each do |data| node = data - # special case clouds with their split horizon whatsis. + # special case clouds with their split horizon thing. ip = (node[:cloud] && node[:cloud][:public_ipv4_addrs] && node[:cloud][:public_ipv4_addrs].first) || node[:ipaddress] fqdn = (node[:cloud] && node[:cloud][:public_hostname]) || node[:fqdn] name = node["name"] || node.name diff --git a/lib/chef/knife/core/subcommand_loader.rb b/lib/chef/knife/core/subcommand_loader.rb index e941b10d47..dd363b6634 100644 --- a/lib/chef/knife/core/subcommand_loader.rb +++ b/lib/chef/knife/core/subcommand_loader.rb @@ -32,7 +32,7 @@ class Chef # optionally filtering by category # subcommand_files - returns an array of all subcommand files # that could be loaded - # commnad_class_from(args) - returns the subcommand class for the + # command_class_from(args) - returns the subcommand class for the # user-requested command # class SubcommandLoader diff --git a/lib/chef/knife/core/windows_bootstrap_context.rb b/lib/chef/knife/core/windows_bootstrap_context.rb index 2ef9f16499..d2b9bc5636 100644 --- a/lib/chef/knife/core/windows_bootstrap_context.rb +++ b/lib/chef/knife/core/windows_bootstrap_context.rb @@ -24,7 +24,7 @@ class Chef class Knife module Core # Instances of BootstrapContext are the context objects (i.e., +self+) for - # bootstrap templates. For backwards compatability, they +must+ set the + # bootstrap templates. For backwards compatibility, they +must+ set the # following instance variables: # * @config - a hash of knife's config values # * @run_list - the run list for the node to boostrap diff --git a/lib/chef/knife/key_create_base.rb b/lib/chef/knife/key_create_base.rb index a856a07867..a1d658e43c 100644 --- a/lib/chef/knife/key_create_base.rb +++ b/lib/chef/knife/key_create_base.rb @@ -42,7 +42,7 @@ class Chef option :expiration_date, short: "-e DATE", long: "--expiration-date DATE", - description: "Optionally pass the expiration date for the key in ISO 8601 fomatted string: YYYY-MM-DDTHH:MM:SSZ e.g. 2013-12-24T21:00:00Z. Defaults to infinity if not passed. UTC timezone assumed." + description: "Optionally pass the expiration date for the key in ISO 8601 formatted string: YYYY-MM-DDTHH:MM:SSZ e.g. 2013-12-24T21:00:00Z. Defaults to infinity if not passed. UTC timezone assumed." end end end diff --git a/lib/chef/knife/key_edit_base.rb b/lib/chef/knife/key_edit_base.rb index b5f38b5c56..b094877190 100644 --- a/lib/chef/knife/key_edit_base.rb +++ b/lib/chef/knife/key_edit_base.rb @@ -47,7 +47,7 @@ class Chef option :expiration_date, short: "-e DATE", long: "--expiration-date DATE", - description: "Updates the expiration_date field of your key if passed. Pass in ISO 8601 fomatted string: YYYY-MM-DDTHH:MM:SSZ e.g. 2013-12-24T21:00:00Z or infinity. UTC timezone assumed." + description: "Updates the expiration_date field of your key if passed. Pass in ISO 8601 formatted string: YYYY-MM-DDTHH:MM:SSZ e.g. 2013-12-24T21:00:00Z or infinity. UTC timezone assumed." end end end diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb index 837ba780f5..ea40cee191 100644 --- a/lib/chef/knife/ssh.rb +++ b/lib/chef/knife/ssh.rb @@ -59,7 +59,7 @@ class Chef option :prefix_attribute, long: "--prefix-attribute ATTR", - description: "The attribute to use for prefixing the ouput - default depends on the context." + description: "The attribute to use for prefixing the output - default depends on the context." option :ssh_user, short: "-x USERNAME", diff --git a/lib/chef/mixin/api_version_request_handling.rb b/lib/chef/mixin/api_version_request_handling.rb index 2c6d2aa6da..a46e001dd8 100644 --- a/lib/chef/mixin/api_version_request_handling.rb +++ b/lib/chef/mixin/api_version_request_handling.rb @@ -53,7 +53,7 @@ class Chef <<~EOH The reregister command only supports server API version 0. The server that received the request supports a min version of #{min_version} and a max version of #{max_version}. - User keys are now managed via the key rotation commmands. + User keys are now managed via the key rotation commands. Please refer to the documentation on how to manage your keys via the key rotation commands: https://docs.chef.io/ctl_chef_server/#key-rotation EOH diff --git a/lib/chef/mixin/properties.rb b/lib/chef/mixin/properties.rb index b0bccaac87..eca0787dc4 100644 --- a/lib/chef/mixin/properties.rb +++ b/lib/chef/mixin/properties.rb @@ -264,7 +264,7 @@ class Chef end result = properties.values.select(&:identity?) - # if there are no other identity properites set, then the name_property becomes the identity, or + # if there are no other identity properties set, then the name_property becomes the identity, or # failing that we use the actual name. if result.empty? result = name_property ? [ properties[name_property] ] : [ properties[:name] ] @@ -355,7 +355,7 @@ class Chef # # @param other [Object] the other object (Chef::Resource) which implements the properties API # @param includes [Array<Symbol>] splat-args list of symbols of the properties to copy. - # @param exclude [Array<Symbol>] list of symbosl of the properties to exclude. + # @param exclude [Array<Symbol>] list of symbols of the properties to exclude. # @return the self object the properties were copied to for method chaining # def copy_properties_from(other, *includes, exclude: [ :name ]) diff --git a/lib/chef/mixin/shell_out.rb b/lib/chef/mixin/shell_out.rb index 1331d48c59..62916b06de 100644 --- a/lib/chef/mixin/shell_out.rb +++ b/lib/chef/mixin/shell_out.rb @@ -71,7 +71,7 @@ class Chef default_val = 900 return options if options.key?(:timeout) - # FIXME: need to nuke descendents tracker out of Chef::Provider so we can just define that class here without requiring the + # FIXME: need to nuke descendent tracker out of Chef::Provider so we can just define that class here without requiring the # world, and then just use symbol lookup if obj.class.ancestors.map(&:name).include?("Chef::Provider") && obj.respond_to?(:new_resource) && obj.new_resource.respond_to?(:timeout) && !options.key?(:timeout) options[:timeout] = obj.new_resource.timeout ? obj.new_resource.timeout.to_f : default_val diff --git a/lib/chef/node/attribute.rb b/lib/chef/node/attribute.rb index 72556e1bc4..e9a48d8b0e 100644 --- a/lib/chef/node/attribute.rb +++ b/lib/chef/node/attribute.rb @@ -184,7 +184,7 @@ class Chef # return the role level override attribute component attr_reader :role_override - # return the enviroment level override attribute component + # return the environment level override attribute component attr_reader :env_override # return the force override level attribute component @@ -535,7 +535,7 @@ class Chef e end - # Deep merge all attribute levels using hash-only merging between different precidence + # Deep merge all attribute levels using hash-only merging between different precedence # levels (so override arrays completely replace arrays set at any default level). # # The path allows for selectively deep-merging a subtree of the node object. diff --git a/lib/chef/node/immutable_collections.rb b/lib/chef/node/immutable_collections.rb index d1d0596287..49dc0256b9 100644 --- a/lib/chef/node/immutable_collections.rb +++ b/lib/chef/node/immutable_collections.rb @@ -120,7 +120,7 @@ class Chef # ImmutableMash acts like a Mash (Hash that is indifferent to String or # Symbol keys), with some important exceptions: # * Methods that mutate state are overridden to raise an error instead. - # * Methods that read from the collection are overriden so that they check + # * Methods that read from the collection are overridden so that they check # if the Chef::Node::Attribute has been modified since an instance of # this class was generated. An error is raised if the object detects that # it is stale. diff --git a/lib/chef/policy_builder/policyfile.rb b/lib/chef/policy_builder/policyfile.rb index 4a626a1cb7..0055f9d4b6 100644 --- a/lib/chef/policy_builder/policyfile.rb +++ b/lib/chef/policy_builder/policyfile.rb @@ -328,7 +328,7 @@ class Chef end end - # Do some mimimal validation of the policyfile we fetched from the + # Do some minimal validation of the policyfile we fetched from the # server. Compatibility mode relies on using data bags to store policy # files; therefore no real validation will be performed server-side and # we need to make additional checks to ensure the data will be formatted diff --git a/lib/chef/property.rb b/lib/chef/property.rb index d65545c138..720fa70dd1 100644 --- a/lib/chef/property.rb +++ b/lib/chef/property.rb @@ -574,7 +574,7 @@ class Chef # be using the existing getter/setter to manipulate it instead. return unless instance_variable_name - # Properties may override existing properties up the inheritance heirarchy, but + # Properties may override existing properties up the inheritance hierarchy, but # properties must not override inherited methods like Object#hash. When the Resource is # placed into the resource collection the ruby Hash object will call the # Object#hash method on the resource, and overriding that with a property will cause @@ -702,7 +702,7 @@ class Chef # override their own properties. return false unless [ Object, BasicObject, Kernel, Chef::Resource ].include?(declared_in.instance_method(name).owner) - # Allow top-level Chef::Resource proprties, such as `name`, to be overridden. + # Allow top-level Chef::Resource properties, such as `name`, to be overridden. # As of this writing, `name` is the only Chef::Resource property created with the # `property` definition, but this will allow for future properties to be extended # as needed. diff --git a/lib/chef/provider.rb b/lib/chef/provider.rb index 947a890806..3607b24752 100644 --- a/lib/chef/provider.rb +++ b/lib/chef/provider.rb @@ -152,7 +152,7 @@ class Chef new_resource.cookbook_name end - # hook that subclasses can use to do lazy validation for where properties aren't flexibile enough + # hook that subclasses can use to do lazy validation for where properties aren't flexible enough def check_resource_semantics!; end # a simple placeholder method that will be called / raise if a resource tries to @@ -167,7 +167,7 @@ class Chef def load_after_resource # This is a backwards compatible hack, custom resources properly wire up a new after_resource - # via load_current_value. It is acceptible for old style resources that cannot be easily made + # via load_current_value. It is acceptable for old style resources that cannot be easily made # into custom resources to override this method and provide a proper after_resource. @after_resource = @new_resource end @@ -190,7 +190,7 @@ class Chef def run_action(action = nil) @action = action unless action.nil? - # hook that subclasses can use to do lazy validation for where properties aren't flexibile enough + # hook that subclasses can use to do lazy validation for where properties aren't flexible enough check_resource_semantics! # force the validation of required properties diff --git a/lib/chef/provider/directory.rb b/lib/chef/provider/directory.rb index d031ab567c..555340d91e 100644 --- a/lib/chef/provider/directory.rb +++ b/lib/chef/provider/directory.rb @@ -142,7 +142,7 @@ class Chef converge_by("delete existing directory #{new_resource.path}") do if new_resource.recursive == true # we don't use rm_rf here because it masks all errors, including - # IO errors or permission errors that would prvent the deletion + # IO errors or permission errors that would prevent the deletion FileUtils.rm_r(new_resource.path) logger.info("#{new_resource} deleted #{new_resource.path} recursively") else diff --git a/lib/chef/provider/package/chocolatey.rb b/lib/chef/provider/package/chocolatey.rb index f1f2307f5b..498a98f2d0 100644 --- a/lib/chef/provider/package/chocolatey.rb +++ b/lib/chef/provider/package/chocolatey.rb @@ -249,7 +249,7 @@ class Chef end # Helper to convert choco.exe list output to a Hash - # (names are downcased for case-insenstive matching) + # (names are downcased for case-insensitive matching) # # @param cmd [String] command to run # @return [Hash] list output converted to ruby Hash diff --git a/lib/chef/provider/package/dpkg.rb b/lib/chef/provider/package/dpkg.rb index e6012edee8..08829e9b26 100644 --- a/lib/chef/provider/package/dpkg.rb +++ b/lib/chef/provider/package/dpkg.rb @@ -149,7 +149,7 @@ class Chef resolved_source_array.all? { |s| s && ::File.exist?(s) } end - # Helper to return all the nanes of the missing sources for error messages. + # Helper to return all the names of the missing sources for error messages. # # @return [Array<String>] Array of missing sources def missing_sources diff --git a/lib/chef/provider/package/portage.rb b/lib/chef/provider/package/portage.rb index 12bc33698e..002c1f96d4 100644 --- a/lib/chef/provider/package/portage.rb +++ b/lib/chef/provider/package/portage.rb @@ -70,6 +70,7 @@ class Chef if pkginfo.exitstatus != 0 pkginfo.stderr.each_line do |line| + # cspell:disable-next-line if line =~ /[Uu]nqualified atom .*match.* multiple/ raise_error_for_query("matched multiple packages (please specify a category):\n#{pkginfo.inspect}") end diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index 03d2757112..fa2b5a66d7 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -250,7 +250,7 @@ class Chef private def logger - Chef::Log.with_child({ subsytem: "gem_installer_environment" }) + Chef::Log.with_child({ subsystem: "gem_installer_environment" }) end end diff --git a/lib/chef/provider/package/windows.rb b/lib/chef/provider/package/windows.rb index 7c77461499..8ee5b36f5d 100644 --- a/lib/chef/provider/package/windows.rb +++ b/lib/chef/provider/package/windows.rb @@ -169,7 +169,7 @@ class Chef # is not multipackage. The existing implementation of package_provider.installed_version should probably # be what `uninstall_version_array` is, and then that list should be sorted and last/first'd into the # current_resource.version. The current_version_array method was not intended to be overwritten by - # sublasses (but ruby provides no feature to block doing so -- it is already marked as private). + # subclasses (but ruby provides no feature to block doing so -- it is already marked as private). # def current_version_array [ current_resource.version ] diff --git a/lib/chef/provider/package/yum.rb b/lib/chef/provider/package/yum.rb index 863f0da8e0..76b9b15172 100644 --- a/lib/chef/provider/package/yum.rb +++ b/lib/chef/provider/package/yum.rb @@ -100,7 +100,7 @@ class Chef # If this is a package like the kernel that can be installed multiple times, we'll skip over this logic if new_resource.allow_downgrade && version_gt?(iv.version_with_arch, av.version_with_arch) && !python_helper.install_only_packages(name) - # We allow downgrading only in the evenit of single-package + # We allow downgrading only in the event of single-package # rules where the user explicitly allowed it method = "downgrade" end diff --git a/lib/chef/provider/package/yum/yum_cache.rb b/lib/chef/provider/package/yum/yum_cache.rb index cec848dbd9..b65e1e560f 100644 --- a/lib/chef/provider/package/yum/yum_cache.rb +++ b/lib/chef/provider/package/yum/yum_cache.rb @@ -22,7 +22,7 @@ require "singleton" unless defined?(Singleton) # # These are largely historical APIs, the YumCache object no longer exists and this is a -# fascade over the python helper class. It should be considered deprecated-lite and +# facade over the python helper class. It should be considered deprecated-lite and # no new APIs should be added and should be added to the python_helper instead. # diff --git a/lib/chef/provider/remote_directory.rb b/lib/chef/provider/remote_directory.rb index c1d537c8cc..438af967dd 100644 --- a/lib/chef/provider/remote_directory.rb +++ b/lib/chef/provider/remote_directory.rb @@ -147,7 +147,7 @@ class Chef new_resource.updated_by_last_action(true) if res.updated? end - # Get the files to tranfer. This returns files in lexicographical sort order. + # Get the files to transfer. This returns files in lexicographical sort order. # # FIXME: it should do breadth-first, see CHEF-5080 (please use a performant sort) # @@ -245,7 +245,7 @@ class Chef res = Chef::Resource::Directory.new(dir, run_context) res.cookbook_name = resource_cookbook if ChefUtils.windows? && rights - # rights are only meant to be applied to the toppest-level directory; + # rights are only meant to be applied to the highest-level directory; # Windows will handle inheritance. if dir == path rights.each do |r| diff --git a/lib/chef/provider/service/arch.rb b/lib/chef/provider/service/arch.rb index ee6d3dfacd..24064f26ac 100644 --- a/lib/chef/provider/service/arch.rb +++ b/lib/chef/provider/service/arch.rb @@ -42,7 +42,7 @@ class Chef::Provider::Service::Arch < Chef::Provider::Service::Init end # Get list of all daemons from the file '/etc/rc.conf'. - # Mutiple lines and background form are supported. Example: + # Multiple lines and background form are supported. Example: # DAEMONS=(\ # foobar \ # @example \ diff --git a/lib/chef/provider/service/upstart.rb b/lib/chef/provider/service/upstart.rb index 2feb0edd70..5b93e6f5a9 100644 --- a/lib/chef/provider/service/upstart.rb +++ b/lib/chef/provider/service/upstart.rb @@ -41,7 +41,7 @@ class Chef # Upstart does more than start or stop a service, creating multiple 'states' [1] that a service can be in. # In chef, when we ask a service to start, we expect it to have started before performing the next step - # since we have top down dependencies. Which is to say we may follow witha resource next that requires + # since we have top down dependencies. Which is to say we may follow with a resource next that requires # that service to be running. According to [2] we can trust that sending a 'goal' such as start will not # return until that 'goal' is reached, or some error has occurred. # diff --git a/lib/chef/provider/user/aix.rb b/lib/chef/provider/user/aix.rb index f41d0f5067..893f304a96 100644 --- a/lib/chef/provider/user/aix.rb +++ b/lib/chef/provider/user/aix.rb @@ -40,7 +40,7 @@ class Chef shell_out!("userdel", userdel_options, new_resource.username) end - # Aix does not support -r like other unix, sytem account is created by adding to 'system' group + # Aix does not support -r like other unix, system account is created by adding to 'system' group def useradd_options opts = [] opts << "-g" << "system" if new_resource.system diff --git a/lib/chef/provider/user/mac.rb b/lib/chef/provider/user/mac.rb index bc0c067d2f..05684d77d8 100644 --- a/lib/chef/provider/user/mac.rb +++ b/lib/chef/provider/user/mac.rb @@ -102,7 +102,7 @@ class Chef shadow_hash_hex = user_plist[:shadow_hash][0] return unless shadow_hash_hex && shadow_hash_hex != "" - # The password infomation is stored in the ShadowHashData key in the + # The password information is stored in the ShadowHashData key in the # plist. However, parsing it is a bit tricky as the value is itself # another encoded binary plist. We have to extract the encoded plist, # decode it from hex to a binary plist and then convert the binary @@ -116,6 +116,8 @@ class Chef # # eg: # + # spellchecker: disable + # # <array> # <string>77687920 63616e27 74206170 706c6520 6275696c 6420636f 6e736973 74656e74 20746f6f 6c696e67</string> # </array> @@ -126,6 +128,8 @@ class Chef # <data>AADKAAAKAA4LAA0MAAAAAAAAAAA=</data> # </array> # + # spellchecker: disable + # begin shadow_binary_plist = [shadow_hash_hex.delete(" ")].pack("H*") shadow_xml_plist = shell_out("plutil", "-convert", "xml1", "-o", "-", "-", input: shadow_binary_plist).stdout @@ -179,7 +183,7 @@ class Chef end if new_resource.manage_home - # "sydadminctl -addUser" will create the home directory if it's + # "sysadminctl -addUser" will create the home directory if it's # the default /Users/<username>, otherwise it sets it in plist # but does not create it. Here we'll ensure that it gets created # if we've been given a directory that is not the default. @@ -554,7 +558,7 @@ class Chef # 0x0A End of record denoted by \n # 0x5C Escaping is denoted by \ # 0x3A Fields are separated by : - # 0x2C Values are seperated by , + # 0x2C Values are separated by , # dsRecTypeStandard:Users The record type we're configuring # 2 How many properties we're going to set # dsAttrTypeStandard:RecordName Property 1: our users record name @@ -598,7 +602,7 @@ class Chef def run_sysadminctl(args) # sysadminctl doesn't exit with a non-zero code when errors are encountered - # and ouputs everything to STDERR instead of STDOUT and STDERR. Therefore we'll + # and outputs everything to STDERR instead of STDOUT and STDERR. Therefore we'll # return the STDERR and let the caller handle it. shell_out!("sysadminctl", args).stderr end diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb index ff0d338b48..63a7b331e1 100644 --- a/lib/chef/provider/windows_task.rb +++ b/lib/chef/provider/windows_task.rb @@ -72,6 +72,7 @@ class Chef 6 => TaskScheduler::TASK_SIXTH, 7 => TaskScheduler::TASK_SEVENTH, 8 => TaskScheduler::TASK_EIGHTH, + # cspell:disable-next-line 9 => TaskScheduler::TASK_NINETH, 10 => TaskScheduler::TASK_TENTH, 11 => TaskScheduler::TASK_ELEVENTH, @@ -93,6 +94,7 @@ class Chef 27 => TaskScheduler::TASK_TWENTY_SEVENTH, 28 => TaskScheduler::TASK_TWENTY_EIGHTH, 29 => TaskScheduler::TASK_TWENTY_NINTH, + # cspell:disable-next-line 30 => TaskScheduler::TASK_THIRTYETH, 31 => TaskScheduler::TASK_THIRTY_FIRST, }.freeze @@ -229,7 +231,7 @@ class Chef private - # seprated command arguments from :command property + # separated command arguments from :command property def set_command_and_arguments cmd, *args = Chef::Util::PathHelper.split_args(new_resource.command) new_resource.command = cmd @@ -577,7 +579,7 @@ class Chef def logon_type # Ref: https://msdn.microsoft.com/en-us/library/windows/desktop/aa383566(v=vs.85).aspx - # if nothing is passed as logon_type the TASK_LOGON_SERVICE_ACCOUNT is getting set as default so using that for comparision. + # if nothing is passed as logon_type the TASK_LOGON_SERVICE_ACCOUNT is getting set as default so using that for comparison. user_id = new_resource.user.to_s password = new_resource.password.to_s if Chef::ReservedNames::Win32::Security::SID.service_account_user?(user_id) diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index fcf22a36b1..cd96c4c1e9 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -930,7 +930,7 @@ class Chef end # - # A hook called after a resource is created. Meant to be overriden by + # A hook called after a resource is created. Meant to be overridden by # subclasses. # def after_created @@ -1114,7 +1114,7 @@ class Chef # `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. + # LWRP or whatever. # # If a block is passed, the action_class is always created and the block is # run inside it. @@ -1327,7 +1327,7 @@ class Chef # Once we no longer care about supporting chef < 14.4 then we can deprecate # this API. # - # @param arg [String] version constrant to match against (e.g. "> 14") + # @param arg [String] version constraint to match against (e.g. "> 14") # def self.chef_version_for_provides(constraint) @chef_version_for_provides = constraint diff --git a/lib/chef/resource/chef_handler.rb b/lib/chef/resource/chef_handler.rb index 0138baeaec..f2daab3d6e 100644 --- a/lib/chef/resource/chef_handler.rb +++ b/lib/chef/resource/chef_handler.rb @@ -107,7 +107,7 @@ class Chef end end - # Walks down the namespace heirarchy to return the class object for the given class name. + # Walks down the namespace hierarchy to return the class object for the given class name. # If the class is not available, NameError is thrown. # # @param class_full_name [String] full class name such as 'Chef::Handler::Foo' or 'MyHandler'. @@ -118,7 +118,7 @@ class Chef class_name = ancestors.pop # We need to search the ancestors only for the first/uppermost namespace of the class, so we - # need to enable the #const_get inherit paramenter only when we are searching in Kernel scope + # need to enable the #const_get inherit parameter only when we are searching in Kernel scope # (see COOK-4117). parent = ancestors.inject(Kernel) { |scope, const_name| scope.const_get(const_name, scope === Kernel) } child = parent.const_get(class_name, parent === Kernel) diff --git a/lib/chef/resource/chef_vault_secret.rb b/lib/chef/resource/chef_vault_secret.rb index 551962d86e..bbd21ec543 100644 --- a/lib/chef/resource/chef_vault_secret.rb +++ b/lib/chef/resource/chef_vault_secret.rb @@ -45,7 +45,7 @@ class Chef chef_vault_secret 'root-password' do admins 'jtimberman,paulmooring' data_bag 'secrets' - raw_data({'auth' => 'DontUseThisPasswordForRoot'}) + raw_data({'auth' => 'DoNotUseThisPasswordForRoot'}) search '*:*' end ``` diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb index 192210799c..5a6b7ee960 100644 --- a/lib/chef/resource/execute.rb +++ b/lib/chef/resource/execute.rb @@ -84,7 +84,7 @@ class Chef desired_state: false property :user, [ String, Integer ], - description: "The user name of the user identity with which to launch the new process. The user name may optionally be specifed with a domain, i.e. domainuser or user@my.dns.domain.com via Universal Principal Name (UPN)format. It can also be specified without a domain simply as user if the domain is instead specified using the domain property. On Windows only, if this property is specified, the password property must be specified." + description: "The user name of the user identity with which to launch the new process. The user name may optionally be specified with a domain, i.e. domainuser or user@my.dns.domain.com via Universal Principal Name (UPN)format. It can also be specified without a domain simply as user if the domain is instead specified using the domain property. On Windows only, if this property is specified, the password property must be specified." property :domain, String, introduced: "12.21", diff --git a/lib/chef/resource/locale.rb b/lib/chef/resource/locale.rb index 0c3e3a90ef..ea7f5098ab 100644 --- a/lib/chef/resource/locale.rb +++ b/lib/chef/resource/locale.rb @@ -120,7 +120,7 @@ class Chef end end - # Generates the localisation files from templates using locale-gen. + # Generates the localization files from templates using locale-gen. # @see http://manpages.ubuntu.com/manpages/cosmic/man8/locale-gen.8.html # @raise [Mixlib::ShellOut::ShellCommandFailed] not a supported language or locale # diff --git a/lib/chef/resource/scm/git.rb b/lib/chef/resource/scm/git.rb index c399f9fb24..b8c8f06347 100644 --- a/lib/chef/resource/scm/git.rb +++ b/lib/chef/resource/scm/git.rb @@ -53,7 +53,7 @@ class Chef description: "The path to the wrapper script used when running SSH with git. The `GIT_SSH` environment variable is set to this." property :checkout_branch, String, - description: "Set this to use a local branch to avoid checking SHAs or tags to a detatched head state." + description: "Set this to use a local branch to avoid checking SHAs or tags to a detached head state." alias :branch :revision alias :reference :revision diff --git a/lib/chef/resource/windows_dfs_server.rb b/lib/chef/resource/windows_dfs_server.rb index cb2bee1234..c4abf75f20 100644 --- a/lib/chef/resource/windows_dfs_server.rb +++ b/lib/chef/resource/windows_dfs_server.rb @@ -50,7 +50,7 @@ class Chef ps_results = powershell_out("Get-DfsnServerConfiguration -ComputerName '#{ENV["COMPUTERNAME"]}' | Select LdapTimeoutSec, PreferLogonDC, EnableSiteCostedReferrals, SyncIntervalSec, UseFqdn | ConvertTo-Json") if ps_results.error? - raise "The dfs_server resource failed to fetch the current state via the Get-DfsnServerConfiguration PowerShell cmlet. Is the DFS Windows feature installed?" + raise "The dfs_server resource failed to fetch the current state via the Get-DfsnServerConfiguration PowerShell cmdlet. Is the DFS Windows feature installed?" end Chef::Log.debug("The Get-DfsnServerConfiguration results were #{ps_results.stdout}") diff --git a/lib/chef/resource/windows_pagefile.rb b/lib/chef/resource/windows_pagefile.rb index d459b01033..928a8d03e0 100644 --- a/lib/chef/resource/windows_pagefile.rb +++ b/lib/chef/resource/windows_pagefile.rb @@ -124,7 +124,7 @@ class Chef # @return [Boolean] def exists?(pagefile) @exists ||= begin - logger.trace("Checking if #{pagefile} exists by runing: wmic.exe pagefileset where SettingID=\"#{get_setting_id(pagefile)}\" list /format:list") + logger.trace("Checking if #{pagefile} exists by running: wmic.exe pagefileset where SettingID=\"#{get_setting_id(pagefile)}\" list /format:list") cmd = shell_out("wmic.exe pagefileset where SettingID=\"#{get_setting_id(pagefile)}\" list /format:list", returns: [0]) cmd.stderr.empty? && (cmd.stdout =~ /SettingID=#{get_setting_id(pagefile)}/i) end diff --git a/lib/chef/resource/windows_task.rb b/lib/chef/resource/windows_task.rb index 5e2aa70c47..d73030311e 100644 --- a/lib/chef/resource/windows_task.rb +++ b/lib/chef/resource/windows_task.rb @@ -274,7 +274,7 @@ class Chef ## Resource is not idempotent when day, start_day is not provided with frequency :weekly ## we set start_day when not given by user as current date based on which we set the day property for current current date day is monday .. - ## we set the monday as the day so at next run when new_resource.day is nil and current_resource day is monday due to which udpate gets called + ## we set the monday as the day so at next run when new_resource.day is nil and current_resource day is monday due to which update gets called def idempotency_warning_for_frequency_weekly(day, start_day) if start_day.nil? && day.nil? logger.warn "To maintain idempotency for frequency :weekly provide start_day, start_time and day." @@ -295,19 +295,19 @@ class Chef end def validate_frequency_monthly(frequency_modifier, months, day) - # validates the frequency :monthly and raises error if frequency_modifier is first, second, thrid etc and day is not provided + # validates the frequency :monthly and raises error if frequency_modifier is first, second, third etc and day is not provided if (frequency_modifier != 1) && (frequency_modifier_includes_days_of_weeks?(frequency_modifier)) && !(day) - raise ArgumentError, "Please select day on which you want to run the task e.g. 'Mon, Tue'. Multiple values must be seprated by comma." + raise ArgumentError, "Please select day on which you want to run the task e.g. 'Mon, Tue'. Multiple values must be separated by comma." end - # frequency_modifer 2-12 is used to set every (n) months, so using :months propety with frequency_modifer is not valid since they both used to set months. - # Not checking value 1 here for frequecy_modifier since we are setting that as default value it won't break anything since preference is given to months property + # frequency_modifier 2-12 is used to set every (n) months, so using :months property with frequency_modifier is not valid since they both used to set months. + # Not checking value 1 here for frequency_modifier since we are setting that as default value it won't break anything since preference is given to months property if (frequency_modifier.to_i.between?(2, 12)) && !(months.nil?) raise ArgumentError, "For frequency :monthly either use property months or frequency_modifier to set months." end end - # returns true if frequency_modifer has values First, second, third, fourth, last, lastday + # returns true if frequency_modifier has values First, second, third, fourth, last, lastday def frequency_modifier_includes_days_of_weeks?(frequency_modifier) frequency_modifier = frequency_modifier.to_s.split(",") frequency_modifier.map! { |value| value.strip.upcase } diff --git a/lib/chef/run_context/cookbook_compiler.rb b/lib/chef/run_context/cookbook_compiler.rb index 6f70445082..9d8ea87360 100644 --- a/lib/chef/run_context/cookbook_compiler.rb +++ b/lib/chef/run_context/cookbook_compiler.rb @@ -101,7 +101,7 @@ class Chef @events.library_load_start(count_files_by_segment(:libraries)) cookbook_order.each do |cookbook| eager_load_libraries = cookbook_collection[cookbook].metadata.eager_load_libraries - if eager_load_libraries == true # actully true, not truthy + if eager_load_libraries == true # actually true, not truthy load_libraries_from_cookbook(cookbook) else $LOAD_PATH.unshift File.expand_path("libraries", cookbook_collection[cookbook].root_dir) diff --git a/lib/chef/shell/ext.rb b/lib/chef/shell/ext.rb index 01a7407de5..f8b8d2e0e3 100644 --- a/lib/chef/shell/ext.rb +++ b/lib/chef/shell/ext.rb @@ -37,7 +37,7 @@ module Shell module ObjectCoreExtensions def ensure_session_select_defined - # irb breaks if you prematurely define IRB::JobMangager + # irb breaks if you prematurely define IRB::JobManager # so these methods need to be defined at the latest possible time. unless jobs.respond_to?(:select_session_by_context) def jobs.select_session_by_context(&block) # rubocop:disable Lint/NestedMethodDefinition diff --git a/lib/chef/win32/api.rb b/lib/chef/win32/api.rb index 9e551707e6..957823220d 100644 --- a/lib/chef/win32/api.rb +++ b/lib/chef/win32/api.rb @@ -94,7 +94,7 @@ class Chef host.typedef :ulong, :HMENU # (L) Handle to a menu. http://msdn.microsoft.com/en-us/library/ms646977%28VS.85%29.aspx host.typedef :ulong, :HMETAFILE # (L) Handle to a metafile. http://msdn.microsoft.com/en-us/library/dd145051%28VS.85%29.aspx host.typedef :ulong, :HMODULE # (L) Handle to an instance. Same as HINSTANCE today, but was different in 16-bit Windows. - host.typedef :ulong, :HMONITOR # (L) Рandle to a display monitor. WinDef.h: if(WINVER >= 0x0500) host.typedef HANDLE HMONITOR; + host.typedef :ulong, :HMONITOR # (L) Handle to a display monitor. WinDef.h: if(WINVER >= 0x0500) host.typedef HANDLE HMONITOR; host.typedef :ulong, :HPALETTE # (L) Handle to a palette. host.typedef :ulong, :HPEN # (L) Handle to a pen. http://msdn.microsoft.com/en-us/library/dd162786%28VS.85%29.aspx host.typedef :long, :HRESULT # Return code used by COM interfaces. For more info, Structure of the COM Error Codes. @@ -115,7 +115,7 @@ class Chef host.typedef :uint32, :LCID # Locale identifier. For more information, see Locales. host.typedef :uint32, :LCTYPE # Locale information type. For a list, see Locale Information Constants. host.typedef :uint32, :LGRPID # Language group identifier. For a list, see EnumLanguageGroupLocales. - host.typedef :pointer, :LMSTR # Pointer to null termiated string of unicode characters + host.typedef :pointer, :LMSTR # Pointer to null terminated string of unicode characters host.typedef :long, :LONG # 32-bit signed integer. The range is -2,147,483,648 through +...647 decimal. host.typedef :int32, :LONG32 # 32-bit signed integer. The range is -2,147,483,648 through +...647 decimal. host.typedef :int64, :LONG64 # 64-bit signed integer. The range is –9,223,372,036,854,775,808 through +...807 diff --git a/lib/chef/win32/api/error.rb b/lib/chef/win32/api/error.rb index 6792fb6b34..fbdf09a4a8 100644 --- a/lib/chef/win32/api/error.rb +++ b/lib/chef/win32/api/error.rb @@ -90,6 +90,7 @@ class Chef ERROR_TOO_MANY_NAMES = 68 ERROR_TOO_MANY_SESS = 69 ERROR_SHARING_PAUSED = 70 + # cspell:disable-next-line ERROR_REQ_NOT_ACCEP = 71 ERROR_REDIR_PAUSED = 72 @@ -876,6 +877,7 @@ class Chef # Flags for LoadLibraryEx + # cspell:disable-next-line DONT_RESOLVE_DLL_REFERENCES = 0x00000001 LOAD_IGNORE_CODE_AUTHZ_LEVEL = 0x00000010 LOAD_LIBRARY_AS_DATAFILE = 0x00000002 diff --git a/lib/chef/win32/api/file.rb b/lib/chef/win32/api/file.rb index 11a18e26d1..eb83e2487d 100644 --- a/lib/chef/win32/api/file.rb +++ b/lib/chef/win32/api/file.rb @@ -540,7 +540,7 @@ BOOL WINAPI VerQueryValue( def file_search_handle(path) # Workaround for CHEF-4419: # Make sure paths starting with "/" has a drive letter - # assigned from the current working diretory. + # assigned from the current working directory. # Note: With CHEF-4427 this issue will be fixed with a # broader fix to map all the paths starting with "/" to # SYSTEM_DRIVE on windows. diff --git a/lib/chef/win32/api/net.rb b/lib/chef/win32/api/net.rb index 87eac8f79b..374c2e231e 100644 --- a/lib/chef/win32/api/net.rb +++ b/lib/chef/win32/api/net.rb @@ -39,6 +39,7 @@ class Chef UF_ACCOUNTDISABLE = 0x000002 UF_PASSWD_CANT_CHANGE = 0x000040 UF_NORMAL_ACCOUNT = 0x000200 + # cspell:disable-next-line UF_DONT_EXPIRE_PASSWD = 0x010000 USE_NOFORCE = 0 diff --git a/lib/chef/win32/mutex.rb b/lib/chef/win32/mutex.rb index bac94e8166..85f4036c87 100644 --- a/lib/chef/win32/mutex.rb +++ b/lib/chef/win32/mutex.rb @@ -95,7 +95,7 @@ if other threads attempt to acquire the mutex.") @handle = OpenMutexW(SYNCHRONIZE, true, name.to_wstring) if @handle == 0 - # Mutext doesn't exist so create one. + # Mutex doesn't exist so create one. # In the initial creation of the mutex initial_owner is set to # false so that mutex will not be acquired until someone calls # acquire. diff --git a/lib/chef/win32/net.rb b/lib/chef/win32/net.rb index fb98276455..f985891c17 100644 --- a/lib/chef/win32/net.rb +++ b/lib/chef/win32/net.rb @@ -40,6 +40,7 @@ class Chef usri3_priv: 0, usri3_home_dir: nil, usri3_comment: nil, + # cspell:disable-next-line usri3_flags: UF_SCRIPT | UF_DONT_EXPIRE_PASSWD | UF_NORMAL_ACCOUNT, usri3_script_path: nil, usri3_auth_flags: 0, diff --git a/lib/chef/win32/security/sid.rb b/lib/chef/win32/security/sid.rb index c89249f5a7..ed6c7bd65d 100644 --- a/lib/chef/win32/security/sid.rb +++ b/lib/chef/win32/security/sid.rb @@ -325,7 +325,7 @@ class Chef Array.new(entriesread.read_long) do |i| user_info = USER_INFO_3.new(bufptr.read_pointer + i * USER_INFO_3.size) # Check if the account is the Administrator account - # RID for the Administrator account is always 500 and it's privilage is set to USER_PRIV_ADMIN + # RID for the Administrator account is always 500 and it's privilege is set to USER_PRIV_ADMIN if user_info[:usri3_user_id] == 500 && user_info[:usri3_priv] == 2 # USER_PRIV_ADMIN (2) - Administrator admin_account_name = user_info[:usri3_name].read_wstring break diff --git a/spec/functional/resource/git_spec.rb b/spec/functional/resource/git_spec.rb index ca1bd30893..f8064fef20 100644 --- a/spec/functional/resource/git_spec.rb +++ b/spec/functional/resource/git_spec.rb @@ -103,7 +103,7 @@ describe Chef::Resource::Git, requires_git: true do revision "v1.0.0" end.should_be_updated expect_revision_to_be("HEAD", v1_commit) - expect_branch_to_be("tags/v1.0.0^0") # detatched + expect_branch_to_be("tags/v1.0.0^0") # detached # also verify the tag commit itself is what we expect as an extra sanity check expect_revision_to_be("v1.0.0", v1_tag) end @@ -116,7 +116,7 @@ describe Chef::Resource::Git, requires_git: true do git deploy_directory do repository origin_repo revision "v1.0.0" - expect_branch_to_be("tags/v1.0.0^0") # detatched + expect_branch_to_be("tags/v1.0.0^0") # detached end.should_not_be_updated end end @@ -128,7 +128,7 @@ describe Chef::Resource::Git, requires_git: true do revision rev_foo end.should_be_updated expect_revision_to_be("HEAD", rev_foo) - expect_branch_to_be("master~1") # detatched + expect_branch_to_be("master~1") # detached end it "checks out the expected revision ed18 to a local branch" do @@ -138,7 +138,7 @@ describe Chef::Resource::Git, requires_git: true do checkout_branch "deploy" end.should_be_updated expect_revision_to_be("HEAD", rev_foo) - expect_branch_to_be("deploy") # detatched + expect_branch_to_be("deploy") # detached end it "doesn't update if up-to-date" do @@ -152,7 +152,7 @@ describe Chef::Resource::Git, requires_git: true do repository origin_repo revision rev_foo end.should_not_be_updated - expect_branch_to_be("master~1") # detatched + expect_branch_to_be("master~1") # detached end it "checks out the expected revision 972d" do @@ -161,7 +161,7 @@ describe Chef::Resource::Git, requires_git: true do revision rev_testing end.should_be_updated expect_revision_to_be("HEAD", rev_testing) - expect_branch_to_be("master~2") # detatched + expect_branch_to_be("master~2") # detached end it "checks out the expected revision 972d to a local branch" do diff --git a/spec/functional/resource/windows_task_spec.rb b/spec/functional/resource/windows_task_spec.rb index 8ed8d5c522..5a044e0924 100644 --- a/spec/functional/resource/windows_task_spec.rb +++ b/spec/functional/resource/windows_task_spec.rb @@ -317,12 +317,12 @@ describe Chef::Resource::WindowsTask, :windows_only do expect(subject).not_to be_updated_by_last_action end - it "updates a scheduled task to run every 5 hrs when frequency modifer updated to 5" do + it "updates a scheduled task to run every 5 hrs when frequency modifier updated to 5" do subject.run_action(:create) current_resource = call_for_load_current_resource trigger_details = current_resource.task.trigger(0) expect(trigger_details[:minutes_interval]).to eq(180) - # updating frequency modifer to 5 from 3 + # updating frequency modifier to 5 from 3 subject.frequency_modifier 5 subject.run_action(:create) expect(subject).to be_updated_by_last_action @@ -501,7 +501,7 @@ describe Chef::Resource::WindowsTask, :windows_only do it "raises argument error if frequency_modifier is 'first, second' and day is not provided." do subject.frequency_modifier "first, second" - expect { subject.after_created }.to raise_error("Please select day on which you want to run the task e.g. 'Mon, Tue'. Multiple values must be seprated by comma.") + expect { subject.after_created }.to raise_error("Please select day on which you want to run the task e.g. 'Mon, Tue'. Multiple values must be separated by comma.") end it "raises argument error if months is passed along with frequency_modifier" do @@ -532,7 +532,7 @@ describe Chef::Resource::WindowsTask, :windows_only do expect { subject.after_created }.to raise_error("frequency_modifier value 0 is invalid. Valid values for :monthly frequency are 1 - 12, 'FIRST', 'SECOND', 'THIRD', 'FOURTH', 'LAST'.") end - it "creates scheduled task to run task monthly on Monday and Friday of first, second and thrid week of month" do + it "creates scheduled task to run task monthly on Monday and Friday of first, second and third week of month" do subject.frequency_modifier "first, second, third" subject.day "Mon, Fri" expect { subject.after_created }.not_to raise_error(ArgumentError) diff --git a/spec/unit/knife/core/windows_bootstrap_context_spec.rb b/spec/unit/knife/core/windows_bootstrap_context_spec.rb index e0ca7f17ab..6b041c5311 100644 --- a/spec/unit/knife/core/windows_bootstrap_context_spec.rb +++ b/spec/unit/knife/core/windows_bootstrap_context_spec.rb @@ -217,7 +217,7 @@ describe Chef::Knife::Core::WindowsBootstrapContext do let(:custom_url) { "file://something" } let(:config) { { msi_url: custom_url, install: true } } - it "returns the overriden url" do + it "returns the overridden url" do expect(bootstrap_context.msi_url).to eq(custom_url) end diff --git a/spec/unit/node/attribute_spec.rb b/spec/unit/node/attribute_spec.rb index 564dc1a231..6e78725bd9 100644 --- a/spec/unit/node/attribute_spec.rb +++ b/spec/unit/node/attribute_spec.rb @@ -382,7 +382,7 @@ describe Chef::Node::Attribute do expect(@attributes["command"]["ps"]).to eq("ps -ef") end - it "should return default data if it is not overriden or in attribute data" do + it "should return default data if it is not overridden or in attribute data" do expect(@attributes["music"]["mastodon"]).to eq("rocks") end diff --git a/spec/unit/provider/package/portage_spec.rb b/spec/unit/provider/package/portage_spec.rb index bc7ad22854..8fdd7f877a 100644 --- a/spec/unit/provider/package/portage_spec.rb +++ b/spec/unit/provider/package/portage_spec.rb @@ -118,13 +118,13 @@ describe Chef::Provider::Package::Portage, "load_current_resource" do expect { @provider.candidate_version }.to raise_error(Chef::Exceptions::Package) end - it "should find the candidate_version if a category is specifed and there are no duplicates" do + it "should find the candidate_version if a category is specified and there are no duplicates" do status = double(stdout: "dev-vcs/git-2.16.2", exitstatus: 0) expect(@provider).to receive(:shell_out_compacted).and_return(status) expect(@provider.candidate_version).to eq("2.16.2") end - it "should find the candidate_version if a category is not specifed and there are no duplicates" do + it "should find the candidate_version if a category is not specified and there are no duplicates" do status = double(stdout: "dev-vcs/git-2.16.2", exitstatus: 0) @provider = Chef::Provider::Package::Portage.new(@new_resource_without_category, @run_context) expect(@provider).to receive(:shell_out_compacted).and_return(status) diff --git a/spec/unit/provider/package/powershell_spec.rb b/spec/unit/provider/package/powershell_spec.rb index 865cce4b22..a0d081fd78 100644 --- a/spec/unit/provider/package/powershell_spec.rb +++ b/spec/unit/provider/package/powershell_spec.rb @@ -131,7 +131,7 @@ describe Chef::Provider::Package::Powershell, :windows_only do expect(provider.candidate_version).to eql(["2.12.0.0"]) end - it "should set the candidate_version to the latest version when not pinning and package name is space seperated" do + it "should set the candidate_version to the latest version when not pinning and package name is space separated" do allow(provider).to receive(:powershell_out).with("( Find-Package '7-Zip 16.02 (x64)' -Force -ForceBootstrap ).Version", { timeout: new_resource.timeout }).and_return(package_7zip_available) new_resource.package_name(["7-Zip 16.02 (x64)"]) new_resource.version(nil) diff --git a/spec/unit/win32/registry_spec.rb b/spec/unit/win32/registry_spec.rb index f75a85a32b..124765129b 100644 --- a/spec/unit/win32/registry_spec.rb +++ b/spec/unit/win32/registry_spec.rb @@ -30,7 +30,7 @@ describe Chef::Win32::Registry do let(:sub_key) { "OpscodePrimes" } let(:missing_key_path) { 'HKCU\Software' } let(:registry) { Chef::Win32::Registry.new } - let(:hive_mock) { double("::Win32::Registry::KHKEY_CURRENT_USER") } + let(:hive_mock) { double("::Win32::Registry::HKEY_CURRENT_USER") } let(:reg_mock) { double("reg") } before(:all) do |