summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md9
-rw-r--r--Gemfile.lock30
-rw-r--r--RELEASE_NOTES.md64
-rw-r--r--VERSION2
-rw-r--r--chef-bin/lib/chef-bin/version.rb2
-rw-r--r--chef-config/lib/chef-config/version.rb2
-rw-r--r--chef-utils/lib/chef-utils/version.rb2
-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.rb2
-rw-r--r--lib/chef/cookbook/cookbook_version_loader.rb4
-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/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/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.rb2
-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/version.rb2
-rw-r--r--lib/chef/win32/api/file.rb2
-rw-r--r--lib/chef/win32/mutex.rb2
-rw-r--r--scripts/bk_tests/bk_win_functional.ps183
-rw-r--r--spec/data/shef-config.rb2
-rw-r--r--spec/functional/dsl/reboot_pending_spec.rb11
-rw-r--r--spec/functional/file_content_management/deploy_strategies_spec.rb6
-rw-r--r--spec/functional/resource/dnf_package_spec.rb4
-rw-r--r--spec/functional/resource/windows_env_spec.rb2
-rw-r--r--spec/functional/resource/windows_task_spec.rb64
-rw-r--r--spec/functional/resource/yum_package_spec.rb2
-rw-r--r--spec/functional/win32/versions_spec.rb2
-rw-r--r--spec/support/mock/platform.rb2
-rw-r--r--spec/support/shared/functional/securable_resource.rb2
-rw-r--r--spec/support/shared/unit/provider/file.rb2
-rw-r--r--spec/support/shared/unit/user_and_client_shared.rb2
-rw-r--r--spec/unit/cookbook/file_vendor_spec.rb2
-rw-r--r--spec/unit/cookbook_version_spec.rb2
-rw-r--r--spec/unit/data_collector_spec.rb2
-rw-r--r--spec/unit/event_dispatch/dispatcher_spec.rb2
-rw-r--r--spec/unit/file_content_management/deploy/mv_unix_spec.rb2
-rw-r--r--spec/unit/file_content_management/deploy/mv_windows_spec.rb2
-rw-r--r--spec/unit/file_content_management/tempfile_spec.rb2
-rw-r--r--spec/unit/formatters/base_spec.rb2
-rw-r--r--spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb4
-rw-r--r--spec/unit/http_spec.rb4
-rw-r--r--spec/unit/key_spec.rb2
-rw-r--r--spec/unit/knife/bootstrap_spec.rb2
-rw-r--r--spec/unit/knife/environment_edit_spec.rb2
-rw-r--r--spec/unit/knife/ssl_fetch_spec.rb2
-rw-r--r--spec/unit/knife_spec.rb2
-rw-r--r--spec/unit/lwrp_spec.rb2
-rw-r--r--spec/unit/mixin/openssl_helper_spec.rb6
-rw-r--r--spec/unit/node/attribute_spec.rb2
-rw-r--r--spec/unit/node_spec.rb10
-rw-r--r--spec/unit/property_spec.rb4
-rw-r--r--spec/unit/provider/apt_preference_spec.rb2
-rw-r--r--spec/unit/provider/package/cab_spec.rb2
-rw-r--r--spec/unit/provider/package/msu_spec.rb2
-rw-r--r--spec/unit/provider/package/rpm_spec.rb4
-rw-r--r--spec/unit/provider/package/rubygems_spec.rb6
-rw-r--r--spec/unit/provider/package/solaris_spec.rb2
-rw-r--r--spec/unit/provider/package_spec.rb4
-rw-r--r--spec/unit/provider/remote_file/http_spec.rb2
-rw-r--r--spec/unit/provider/service/windows_spec.rb2
-rw-r--r--spec/unit/resource/cron_spec.rb2
-rw-r--r--spec/unit/resource/remote_file_spec.rb4
-rw-r--r--spec/unit/resource/windows_workgroup_spec.rb4
-rw-r--r--spec/unit/resource_reporter_spec.rb2
-rw-r--r--spec/unit/resource_spec.rb8
-rw-r--r--spec/unit/run_list/versioned_recipe_list_spec.rb2
-rw-r--r--spec/unit/user_v1_spec.rb18
-rw-r--r--spec/unit/util/diff_spec.rb2
-rw-r--r--spec/unit/util/dsc/resource_store.rb2
-rw-r--r--spec/unit/util/file_edit_spec.rb2
-rw-r--r--spec/unit/util/windows/logon_session_spec.rb2
-rw-r--r--spec/unit/win32/link_spec.rb6
122 files changed, 359 insertions, 226 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eaadffaae1..9fae1e9ec2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,15 +1,18 @@
<!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->
-<!-- latest_release 16.0.185 -->
-## [v16.0.185](https://github.com/chef/chef/tree/v16.0.185) (2020-04-05)
+<!-- latest_release 16.0.189 -->
+## [v16.0.189](https://github.com/chef/chef/tree/v16.0.189) (2020-04-07)
#### Merged Pull Requests
-- Updated introduced version for start_when_available option [#9602](https://github.com/chef/chef/pull/9602) ([Vasu1105](https://github.com/Vasu1105))
+- Bump mixlib-cli to 2.1.6 [#9615](https://github.com/chef/chef/pull/9615) ([chef-expeditor[bot]](https://github.com/chef-expeditor[bot]))
<!-- latest_release -->
<!-- release_rollup since=15.6.10 -->
### Changes not yet released to stable
#### Merged Pull Requests
+- Bump mixlib-cli to 2.1.6 [#9615](https://github.com/chef/chef/pull/9615) ([chef-expeditor[bot]](https://github.com/chef-expeditor[bot])) <!-- 16.0.189 -->
+- Really skip the reboot pending func test if a reboot is pending [#9611](https://github.com/chef/chef/pull/9611) ([btm](https://github.com/btm)) <!-- 16.0.188 -->
+- Improved Ruby download/install for functional tests [#9603](https://github.com/chef/chef/pull/9603) ([btm](https://github.com/btm)) <!-- 16.0.186 -->
- Updated introduced version for start_when_available option [#9602](https://github.com/chef/chef/pull/9602) ([Vasu1105](https://github.com/Vasu1105)) <!-- 16.0.185 -->
- windows_firewall_rule: Fix idempotency and add icmp_type property [#9544](https://github.com/chef/chef/pull/9544) ([pschaumburg](https://github.com/pschaumburg)) <!-- 16.0.184 -->
- Use $env:temp instead of c:/ for functional tests [#9591](https://github.com/chef/chef/pull/9591) ([btm](https://github.com/btm)) <!-- 16.0.183 -->
diff --git a/Gemfile.lock b/Gemfile.lock
index 654b3bd13b..6a297782d5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -27,12 +27,12 @@ GIT
PATH
remote: .
specs:
- chef (16.0.185)
+ chef (16.0.189)
addressable
bcrypt_pbkdf (~> 1.0)
bundler (>= 1.10)
- chef-config (= 16.0.185)
- chef-utils (= 16.0.185)
+ chef-config (= 16.0.189)
+ chef-utils (= 16.0.189)
chef-vault
chef-zero (>= 14.0.11)
diff-lcs (~> 1.2, >= 1.2.4)
@@ -61,12 +61,12 @@ PATH
train-winrm (>= 0.2.5)
tty-screen (~> 0.6)
uuidtools (~> 2.1.5)
- chef (16.0.185-universal-mingw32)
+ chef (16.0.189-universal-mingw32)
addressable
bcrypt_pbkdf (~> 1.0)
bundler (>= 1.10)
- chef-config (= 16.0.185)
- chef-utils (= 16.0.185)
+ chef-config (= 16.0.189)
+ chef-utils (= 16.0.189)
chef-vault
chef-zero (>= 14.0.11)
diff-lcs (~> 1.2, >= 1.2.4)
@@ -111,15 +111,15 @@ PATH
PATH
remote: chef-bin
specs:
- chef-bin (16.0.185)
- chef (= 16.0.185)
+ chef-bin (16.0.189)
+ chef (= 16.0.189)
PATH
remote: chef-config
specs:
- chef-config (16.0.185)
+ chef-config (16.0.189)
addressable
- chef-utils (= 16.0.185)
+ chef-utils (= 16.0.189)
fuzzyurl
mixlib-config (>= 2.2.12, < 4.0)
mixlib-shellout (>= 2.0, < 4.0)
@@ -128,7 +128,7 @@ PATH
PATH
remote: chef-utils
specs:
- chef-utils (16.0.185)
+ chef-utils (16.0.189)
GEM
remote: https://rubygems.org/
@@ -170,7 +170,7 @@ GEM
docile (1.3.2)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
- ecma-re-validator (0.2.0)
+ ecma-re-validator (0.2.1)
regexp_parser (~> 1.2)
ed25519 (1.2.4)
equatable (0.6.1)
@@ -262,7 +262,7 @@ GEM
mixlib-archive (1.0.5-universal-mingw32)
mixlib-log
mixlib-authentication (3.0.6)
- mixlib-cli (2.1.5)
+ mixlib-cli (2.1.6)
mixlib-config (3.0.6)
tomlrb
mixlib-log (3.0.8)
@@ -285,7 +285,7 @@ GEM
net-ssh-gateway (>= 1.2.0)
nori (2.6.0)
parallel (1.19.1)
- parser (2.7.0.5)
+ parser (2.7.1.0)
ast (~> 2.4.0)
parslet (1.8.2)
pastel (0.7.3)
@@ -305,7 +305,7 @@ GEM
pry-stack_explorer (0.4.9.3)
binding_of_caller (>= 0.7)
pry (>= 0.9.11)
- public_suffix (4.0.3)
+ public_suffix (4.0.4)
rack (2.2.2)
rainbow (3.0.0)
rake (13.0.1)
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 3914efa8bc..2e957e4d20 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,5 +1,69 @@
This file holds "in progress" release notes for the current release under development and is intended for consumption by the Chef Documentation team. Please see <https://docs.chef.io/release_notes/> for the official Chef release notes.
+# Chef Infra Client 15.9
+
+## Chef InSpec 4.18.100
+
+Chef InSpec has been updated from 4.18.85 to 4.18.100:
+
+- Resolved several failures in executing resources
+- Fixed auditd resource processing of action and list
+- Fixed platform detection when running in Habitat
+- "inspec schema" has been revised to be in the JSON Schema draft 7 format
+- Improved the functionality of the `oracledb_session` resource
+
+## Ohai 15.8
+
+Ohai has been updated to 15.8.0 which includes a fix for failures that occurred in the OpenStack plugin (thanks [@sawanoboly](https://github.com/sawanoboly/)) and improved parsing of data in the `optional_plugins` config option (thanks [@salzig](https://github.com/salzig/)).
+
+## Resource Improvements
+
+### build_essential
+
+The `build_essential` resource has been updated to better detect if the Xcode CLI Tools package needs to be installed on macOS. macOS 10.15 (Catalina) is now supported with this update. Thank you [@w0de](https://github.com/w0de/) for kicking this work off, [@jazaval](https://github.com/jazaval/) for advice on macOS package parsing, and Microsoft for their work in the macOS cookbook.
+
+### rhsm_errata / rhsm_errata_level
+
+The `rhsm_errata` and `rhsm_errata_level` resources have been updated to properly function on RHEL 8 systems.
+
+### rhsm_register
+
+The `rhsm_register` resource has a new property `https_for_ca_consumer` that enables using https connections during registration. Thanks for this improvement [@jasonwbarnett](https://github.com/jasonwbarnett/). This resource has also been updated to properly function on RHEL 8.
+
+### windows_share
+
+Resolved failures in the `windows_share` resource when setting the `path` property. Thanks for reporting this issue [@Kundan22](https://github.com/Kundan22/).
+
+## Platform Support
+
+### Ubuntu 20.04
+
+Chef Infra Client is now tested on Ubuntu 20.04 (AMD64) with packages available on the [Chef Downloads Page](https://downloads.chef.io/chef).
+
+### Ubuntu 18.04 aarch64
+
+Chef Infra Client is now tested on Ubuntu 18.04 aarch64 with packages available on the [Chef Downloads Page](https://downloads.chef.io/chef).
+
+### Windows 10
+
+Our Windows 10 Chef Infra Client packages now receive an additional layer of testing to ensure they function as expected.
+
+## Security Updates
+
+### Ruby
+
+Ruby has been updated from 2.6.5 to 2.6.6 to resolve the following CVEs:
+
+ - [CVE-2020-16255](https://www.ruby-lang.org/en/news/2020/03/19/json-dos-cve-2020-10663/): Unsafe Object Creation Vulnerability in JSON (Additional fix)
+ - [CVE-2020-10933](https://www.ruby-lang.org/en/news/2020/03/31/heap-exposure-in-socket-cve-2020-10933/): Heap exposure vulnerability in the socket library
+
+### libarchive
+
+libarchive has been updated from 3.4.0 to 3.4.2 to resolve multiple security vulnerabilities including the following CVEs:
+
+ - [CVE-2019-19221](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19221): archive_wstring_append_from_mbs in archive_string.c has an out-of-bounds read because of an incorrect mbrtowc or mbtowc call
+ - [CVE-2020-9308](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-9308): archive_read_support_format_rar5.c in libarchive before 3.4.2 attempts to unpack a RAR5 file with an invalid or corrupted header
+
# Chef Infra Client 15.8
## New notify_group functionality
diff --git a/VERSION b/VERSION
index 6207e15efa..877d915630 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-16.0.185 \ No newline at end of file
+16.0.189 \ No newline at end of file
diff --git a/chef-bin/lib/chef-bin/version.rb b/chef-bin/lib/chef-bin/version.rb
index 94b30bbdbe..7e207039f0 100644
--- a/chef-bin/lib/chef-bin/version.rb
+++ b/chef-bin/lib/chef-bin/version.rb
@@ -21,7 +21,7 @@
module ChefBin
CHEFBIN_ROOT = File.expand_path("../..", __FILE__)
- VERSION = "16.0.185".freeze
+ VERSION = "16.0.189".freeze
end
#
diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb
index aea5df27e6..fbfc327959 100644
--- a/chef-config/lib/chef-config/version.rb
+++ b/chef-config/lib/chef-config/version.rb
@@ -15,5 +15,5 @@
module ChefConfig
CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__)
- VERSION = "16.0.185".freeze
+ VERSION = "16.0.189".freeze
end
diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb
index bcab468c2c..beb9c32c92 100644
--- a/chef-utils/lib/chef-utils/version.rb
+++ b/chef-utils/lib/chef-utils/version.rb
@@ -15,5 +15,5 @@
module ChefUtils
CHEFUTILS_ROOT = File.expand_path("../..", __FILE__)
- VERSION = "16.0.185".freeze
+ VERSION = "16.0.189".freeze
end
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..bcda851033 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
diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb
index 2c4fe6db41..626a5d423b 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.
#
@@ -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/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/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..a3d623c005 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 copypasta'd 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..35cd9cd47f 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
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/version.rb b/lib/chef/version.rb
index 2c99b0fc00..6ac012e59c 100644
--- a/lib/chef/version.rb
+++ b/lib/chef/version.rb
@@ -23,7 +23,7 @@ require_relative "version_string"
class Chef
CHEF_ROOT = File.expand_path("../..", __FILE__)
- VERSION = Chef::VersionString.new("16.0.185")
+ VERSION = Chef::VersionString.new("16.0.189")
end
#
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
diff --git a/scripts/bk_tests/bk_win_functional.ps1 b/scripts/bk_tests/bk_win_functional.ps1
index 6033812388..5bcbfb60c9 100644
--- a/scripts/bk_tests/bk_win_functional.ps1
+++ b/scripts/bk_tests/bk_win_functional.ps1
@@ -1,3 +1,76 @@
+# The filename of the Ruby installer
+$RubyFilename = "rubyinstaller-devkit-2.6.5-1-x64.exe"
+
+# The sha256 of the Ruby installer (capitalized?)
+$RubySHA256 = "BD2050496A149C7258ED4E2E44103756CA3A05C7328A939F0FDC97AE9616A96D"
+
+# Where on disk to download Ruby to
+$RubyPath = "$env:temp\$RubyFilename"
+
+# Where to download Ruby from:
+$RubyS3Path = "s3://public-cd-buildkite-cache/$RubyFilename"
+
+Function DownloadRuby
+{
+ $RandDigits = Get-Random
+ echo "Downloading Ruby + DevKit"
+
+ aws s3 cp "$RubyS3Path" "$RubyPath.$RandDigits" | Out-Null # Out-Null is a hack to wait for the process to complete
+
+ if ($LASTEXITCODE -ne 0) {
+ echo "aws s3 download failed: $LASTEXITCODE"
+ exit $LASTEXITCODE
+ }
+
+ $FileHash = (Get-FileHash "$RubyPath.$RandDigits" -Algorithm SHA256).Hash
+ If ($FileHash -eq $RubySHA256) {
+ echo "Downloaded SHA256 matches: $FileHash"
+ } Else {
+ echo "Downloaded file hash $FileHash does not match desired $RubySHA256"
+ exit 1
+ }
+
+ # On a shared filesystem, sometimes a good file appears while we are downloading
+ If (Test-Path $RubyPath) {
+ $FileHash = (Get-FileHash "$RubyPath" -Algorithm SHA256).Hash
+ If ($FileHash -eq $RubySHA256) {
+ echo "A matching file appeared while downloading, using it."
+ Remove-Item "$RubyPath.$RandDigits" -Force
+ Return
+ } Else {
+ echo "Existing file does not match, bad hash: $FileHash"
+ Remove-Item $RubyPath -Force
+ }
+ }
+
+ echo "Moving file installer into place"
+ Rename-Item -Path "$RubyPath.$RandDigits" -NewName $RubyFilename
+}
+
+Function InstallRuby
+{
+ If (Test-Path $RubyPath) {
+ echo "$RubyPath already exists"
+
+ $FileHash = (Get-FileHash "$RubyPath" -Algorithm SHA256).Hash
+ If ($FileHash -eq $RubySHA256) {
+ echo "Found matching Ruby + DevKit on disk"
+ } Else {
+ echo "SHA256 hash mismatch, re-downloading"
+ DownloadRuby
+ }
+ } Else {
+ echo "No Ruby found at $RubyPath, downloading"
+ DownloadRuby
+ }
+
+ echo "Installing Ruby + DevKit"
+ Start-Process $RubyPath -ArgumentList '/verysilent /dir=C:\\ruby26' -Wait
+
+ echo "Cleaning up installation"
+ Remove-Item $RubyPath -Force -ErrorAction SilentlyContinue
+}
+
echo "--- system details"
$Properties = 'Caption', 'CSName', 'Version', 'BuildType', 'OSArchitecture'
Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table -AutoSize
@@ -8,15 +81,7 @@ Remove-Item -Path C:\ProgramData\chocolatey\bin\choco.exe -ErrorAction SilentlyC
echo "--- install ruby + devkit"
$ErrorActionPreference = 'Stop'
-echo "Downloading Ruby + DevKit"
-aws s3 cp s3://public-cd-buildkite-cache/rubyinstaller-devkit-2.6.5-1-x64.exe $env:temp/rubyinstaller-devkit-2.6.5-1-x64.exe
-
-echo "Installing Ruby + DevKit"
-Start-Process $env:temp\rubyinstaller-devkit-2.6.5-1-x64.exe -ArgumentList '/verysilent /dir=C:\\ruby26' -Wait
-
-echo "Cleaning up installation"
-Remove-Item $env:temp\rubyinstaller-devkit-2.6.5-1-x64.exe -Force -ErrorAction SilentlyContinue
-echo "Closing out the layer (this can take awhile)"
+InstallRuby
# Set-Item -Path Env:Path -Value to include ruby26
$Env:Path+=";C:\ruby26\bin"
diff --git a/spec/data/shef-config.rb b/spec/data/shef-config.rb
index efd601d6d8..0e2521c5b4 100644
--- a/spec/data/shef-config.rb
+++ b/spec/data/shef-config.rb
@@ -1,6 +1,6 @@
ohai[:disabled_plugins] << "darwin::system_profiler" << "darwin::kernel" << "darwin::ssh_host_key" << "network_listeners"
ohai[:disabled_plugins] << "virtualization" << "darwin::virtualization"
-ohai[:disabled_plugins] << "darwin::uptime" << "darwin::filesystem" << "dmi" << "lanuages" << "perl" << "python" << "java"
+ohai[:disabled_plugins] << "darwin::uptime" << "darwin::filesystem" << "dmi" << "languages" << "perl" << "python" << "java"
ohai[:disabled_plugins] << "linux::block_device" << "linux::kernel" << "linux::ssh_host_key" << "linux::virtualization"
ohai[:disabled_plugins] << "linux::cpu" << "linux::memory" << "ec2" << "rackspace" << "eucalyptus" << "ip_scopes"
ohai[:disabled_plugins] << "solaris2::cpu" << "solaris2::dmi" << "solaris2::filesystem" << "solaris2::kernel"
diff --git a/spec/functional/dsl/reboot_pending_spec.rb b/spec/functional/dsl/reboot_pending_spec.rb
index 89701802b3..09f587a1bc 100644
--- a/spec/functional/dsl/reboot_pending_spec.rb
+++ b/spec/functional/dsl/reboot_pending_spec.rb
@@ -17,10 +17,13 @@
#
require "chef/dsl/reboot_pending"
+require "chef/dsl/registry_helper"
require "chef/win32/registry"
require "spec_helper"
describe Chef::DSL::RebootPending, :windows_only do
+ include Chef::DSL::RegistryHelper
+
def run_ohai
node.consume_external_attrs(OHAI_SYSTEM.data, {})
end
@@ -36,10 +39,6 @@ describe Chef::DSL::RebootPending, :windows_only do
let(:reg_key) { nil }
let(:original_set) { false }
- before(:all) { @any_flag = {} }
-
- after { @any_flag[reg_key] = original_set }
-
describe 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations' do
let(:reg_key) { 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager' }
let(:original_set) { registry.value_exists?(reg_key, { name: "PendingFileRenameOperations" }) }
@@ -79,7 +78,9 @@ describe Chef::DSL::RebootPending, :windows_only do
describe "when there is nothing to indicate a reboot is pending" do
it "should return false" do
- skip "reboot pending" if @any_flag.any? { |_, v| v == true }
+ skip "reboot pending" if registry_value_exists?('HKLM\SYSTEM\CurrentControlSet\Control\Session Manager', { name: "PendingFileRenameOperations" }) ||
+ registry_key_exists?('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired') ||
+ registry_key_exists?('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending')
expect(recipe.reboot_pending?).to be_falsey
end
end
diff --git a/spec/functional/file_content_management/deploy_strategies_spec.rb b/spec/functional/file_content_management/deploy_strategies_spec.rb
index 07991aa8bd..e5acf223a2 100644
--- a/spec/functional/file_content_management/deploy_strategies_spec.rb
+++ b/spec/functional/file_content_management/deploy_strategies_spec.rb
@@ -113,7 +113,7 @@ shared_examples_for "a content deploy strategy" do
path
end
- def unix_invariant_properies(stat_struct)
+ def unix_invariant_properties(stat_struct)
unix_invariants.inject({}) do |property_map, property|
property_map[property] = stat_struct.send(property)
property_map
@@ -137,7 +137,7 @@ shared_examples_for "a content deploy strategy" do
content_deployer.deploy(staging_file_path, target_file_path)
updated_info = File.stat(target_file_path)
- expect(unix_invariant_properies(original_info)).to eq(unix_invariant_properies(updated_info))
+ expect(unix_invariant_properties(original_info)).to eq(unix_invariant_properties(updated_info))
end
it "maintains invariant properties on Windows", :windows_only do
@@ -164,7 +164,7 @@ shared_examples_for "a content deploy strategy" do
content_deployer.deploy(staging_file_path, target_file_path)
updated_info = File.stat(target_file_path)
- expect(unix_invariant_properies(original_info)).to eq(unix_invariant_properies(updated_info))
+ expect(unix_invariant_properties(original_info)).to eq(unix_invariant_properties(updated_info))
end
end
diff --git a/spec/functional/resource/dnf_package_spec.rb b/spec/functional/resource/dnf_package_spec.rb
index ec167238f7..f935cdbf24 100644
--- a/spec/functional/resource/dnf_package_spec.rb
+++ b/spec/functional/resource/dnf_package_spec.rb
@@ -321,7 +321,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
end
- it "with nothing intalled, it installs the latest version" do
+ it "with nothing installed, it installs the latest version" do
flush_cache
dnf_package.package_name("chef_rpm > 1.2")
dnf_package.run_action(:install)
@@ -612,7 +612,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
# this is a bit tricky -- we need this action to be idempotent, so that it doesn't recycle any
# caches, but need it to hit whatavailable with the repo disabled. using :upgrade like this
# accomplishes both those goals (it would be easier if we had other rpms in this repo, but with
- # one rpm we neeed to do this).
+ # one rpm we need to do this).
preinstall("chef_rpm-1.2-1.#{pkg_arch}.rpm")
dnf_package.options("--disablerepo=chef-dnf-localtesting")
dnf_package.run_action(:upgrade)
diff --git a/spec/functional/resource/windows_env_spec.rb b/spec/functional/resource/windows_env_spec.rb
index e5f2032795..1bedd881f1 100644
--- a/spec/functional/resource/windows_env_spec.rb
+++ b/spec/functional/resource/windows_env_spec.rb
@@ -159,7 +159,7 @@ describe Chef::Resource::WindowsEnv, :windows_only do
expect(ENV[chef_env_test_lower_case]).to eq(env_value2)
end
- # This examlpe covers Chef Issue #1754
+ # This example covers Chef Issue #1754
it "should modify an existing variable's value to a new value if the variable name case differs from the existing variable" do
expect(ENV[chef_env_test_lower_case]).to eq(env_value1)
test_resource.key_name(chef_env_test_mixed_case)
diff --git a/spec/functional/resource/windows_task_spec.rb b/spec/functional/resource/windows_task_spec.rb
index fa51ad3f8a..9255dfe764 100644
--- a/spec/functional/resource/windows_task_spec.rb
+++ b/spec/functional/resource/windows_task_spec.rb
@@ -36,7 +36,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
context "when command is with arguments" do
subject do
new_resource = Chef::Resource::WindowsTask.new(task_name, run_context)
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
# Make sure MM/DD/YYYY is accepted
new_resource.start_day "09/20/2017"
@@ -173,7 +173,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
context "when description is passed" do
subject do
new_resource = Chef::Resource::WindowsTask.new(task_name, run_context)
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource.command task_name
# Make sure MM/DD/YYYY is accepted
new_resource.start_day "09/20/2017"
@@ -213,7 +213,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
subject do
new_resource = Chef::Resource::WindowsTask.new(task_name, run_context)
new_resource.command task_name
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
# Make sure MM/DD/YYYY is accepted
new_resource.start_day "09/20/2017"
new_resource.frequency :hourly
@@ -248,7 +248,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.run_level :highest
new_resource.frequency :minute
new_resource.frequency_modifier 15
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -296,7 +296,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.run_level :highest
new_resource.frequency :hourly
new_resource.frequency_modifier 3
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -341,7 +341,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :daily
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -370,7 +370,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :monthly
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -495,7 +495,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :monthly
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -584,7 +584,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :monthly
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -691,7 +691,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :monthly
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -793,7 +793,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :once
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -832,7 +832,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :weekly
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -981,7 +981,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :onstart
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1028,7 +1028,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :on_logon
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1075,7 +1075,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :on_idle
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1134,7 +1134,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource = Chef::Resource::WindowsTask.new(task_name, run_context)
new_resource.command task_name
new_resource.run_level :highest
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1178,7 +1178,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource = Chef::Resource::WindowsTask.new(task_name, run_context)
new_resource.command task_name
new_resource.run_level :highest
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1263,7 +1263,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :none
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1290,7 +1290,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource = Chef::Resource::WindowsTask.new(task_name, run_context)
new_resource.command task_name
new_resource.run_level :highest
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1346,7 +1346,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :once
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1372,7 +1372,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :once
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1397,7 +1397,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource = Chef::Resource::WindowsTask.new(task_name, run_context)
new_resource.command task_name
new_resource.frequency :once
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1502,7 +1502,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.run_level :highest
new_resource.frequency :once
new_resource.start_time "17:00"
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1526,7 +1526,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource = Chef::Resource::WindowsTask.new(task_name, run_context)
new_resource.command task_name
new_resource.run_level :highest
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource.frequency :none
new_resource
end
@@ -1552,7 +1552,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.command task_name
new_resource.run_level :highest
new_resource.frequency :weekly
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1579,7 +1579,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.run_level :highest
new_resource.frequency :once
new_resource.start_time "17:00"
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1606,7 +1606,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.frequency :hourly
new_resource.frequency_modifier 5
new_resource.random_delay "2400"
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1625,7 +1625,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.frequency :daily
new_resource.frequency_modifier 2
new_resource.random_delay "2400"
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1641,7 +1641,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource = Chef::Resource::WindowsTask.new(task_name, run_context)
new_resource.command task_name
new_resource.frequency :on_logon
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1666,7 +1666,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource.run_level :highest
new_resource.frequency :onstart
new_resource.frequency_modifier 20
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1683,7 +1683,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
new_resource = Chef::Resource::WindowsTask.new(task_name, run_context)
new_resource.command task_name
new_resource.run_level :highest
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource
end
@@ -1832,7 +1832,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
subject do
new_resource = Chef::Resource::WindowsTask.new(task_name, run_context)
new_resource.command task_name
- new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accespts this
+ new_resource.execution_time_limit = 259200 / 60 # converting "PT72H" into minutes and passing here since win32-taskscheduler accepts this
new_resource.frequency :hourly
new_resource
end
diff --git a/spec/functional/resource/yum_package_spec.rb b/spec/functional/resource/yum_package_spec.rb
index f99f03bdf1..680beb8638 100644
--- a/spec/functional/resource/yum_package_spec.rb
+++ b/spec/functional/resource/yum_package_spec.rb
@@ -635,7 +635,7 @@ describe Chef::Resource::YumPackage, :requires_root, external: exclude_test do
# this is a bit tricky -- we need this action to be idempotent, so that it doesn't recycle any
# caches, but need it to hit whatavailable with the repo disabled. using :upgrade like this
# accomplishes both those goals (it would be easier if we had other rpms in this repo, but with
- # one rpm we neeed to do this).
+ # one rpm we need to do this).
preinstall("chef_rpm-1.2-1.#{pkg_arch}.rpm")
yum_package.options("--disablerepo=chef-yum-localtesting")
yum_package.run_action(:upgrade)
diff --git a/spec/functional/win32/versions_spec.rb b/spec/functional/win32/versions_spec.rb
index 9ce21c49f9..25e03b255f 100644
--- a/spec/functional/win32/versions_spec.rb
+++ b/spec/functional/win32/versions_spec.rb
@@ -40,7 +40,7 @@ describe "Chef::ReservedNames::Win32::Version", :windows_only do
@current_os_version = "Windows Server 2008"
else
# The name from WMI is actually what we want in Win2k8R2+.
- # So this expectation sould continue to hold without modification
+ # So this expectation should continue to hold without modification
# as new versions of Windows are released.
@current_os_version = host["caption"]
end
diff --git a/spec/support/mock/platform.rb b/spec/support/mock/platform.rb
index b0a6258276..883d953371 100644
--- a/spec/support/mock/platform.rb
+++ b/spec/support/mock/platform.rb
@@ -2,7 +2,7 @@
# platform-specific functionality.
#
# If a block is given yields to the block with +RUBY_PLATFORM+ set to
-# 'i386-mingw32' (windows) or 'x86_64-darwin11.2.0' (unix). Usueful for
+# 'i386-mingw32' (windows) or 'x86_64-darwin11.2.0' (unix). Useful for
# testing code that mixes in platform specific modules like +Chef::Mixin::Securable+
# or +Chef::FileAccessControl+
def platform_mock(platform = :unix)
diff --git a/spec/support/shared/functional/securable_resource.rb b/spec/support/shared/functional/securable_resource.rb
index 010ef27f47..4bccce7028 100644
--- a/spec/support/shared/functional/securable_resource.rb
+++ b/spec/support/shared/functional/securable_resource.rb
@@ -474,7 +474,7 @@ shared_examples_for "a securable resource without existing target" do
end
it "respects mode in string form as an octal number" do
- # on windows, mode cannot modify owner and/or group permissons
+ # on windows, mode cannot modify owner and/or group permissions
# unless the owner and/or group as appropriate is specified
resource.mode "400"
resource.owner "Guest"
diff --git a/spec/support/shared/unit/provider/file.rb b/spec/support/shared/unit/provider/file.rb
index d78eff0c90..43b616c26b 100644
--- a/spec/support/shared/unit/provider/file.rb
+++ b/spec/support/shared/unit/provider/file.rb
@@ -197,7 +197,7 @@ shared_examples_for Chef::Provider::File do
expect(provider.current_resource.name).to eql(resource.name)
end
- it "the loaded current_resource path should be the same as the resoure path" do
+ it "the loaded current_resource path should be the same as the resource path" do
provider.load_current_resource
expect(provider.current_resource.path).to eql(resource.path)
end
diff --git a/spec/support/shared/unit/user_and_client_shared.rb b/spec/support/shared/unit/user_and_client_shared.rb
index 40042933e2..1554a3dd8e 100644
--- a/spec/support/shared/unit/user_and_client_shared.rb
+++ b/spec/support/shared/unit/user_and_client_shared.rb
@@ -63,7 +63,7 @@ shared_examples_for "user or client create" do
}
end
- it "puts the public key into the objectr returned by create" do
+ it "puts the public key into the object returned by create" do
expect(rest_v1).to receive(:post).with(url, payload).and_return(payload.merge(chef_key))
new_object = object.create
expect(new_object.public_key).to eq("some_public_key")
diff --git a/spec/unit/cookbook/file_vendor_spec.rb b/spec/unit/cookbook/file_vendor_spec.rb
index 557e1b8775..b258b89d68 100644
--- a/spec/unit/cookbook/file_vendor_spec.rb
+++ b/spec/unit/cookbook/file_vendor_spec.rb
@@ -115,7 +115,7 @@ describe Chef::Cookbook::FileVendor do
file_vendor_class.fetch_from_disk(cookbook_path)
end
- it "retrieves the file from the correct location based on path to the cookbook that conatins the correct name metadata" do
+ it "retrieves the file from the correct location based on path to the cookbook that contains the correct name metadata" do
file_vendor = file_vendor_class.create_from_manifest(manifest)
file_vendor.get_filename("metadata.rb")
end
diff --git a/spec/unit/cookbook_version_spec.rb b/spec/unit/cookbook_version_spec.rb
index 3dff9e94d8..2697bd5c99 100644
--- a/spec/unit/cookbook_version_spec.rb
+++ b/spec/unit/cookbook_version_spec.rb
@@ -49,7 +49,7 @@ describe Chef::CookbookVersion do
let(:cookbook_paths_by_type) do
{
- # Dunno if the paths here are representitive of what is set by CookbookLoader...
+ # Dunno if the paths here are representative of what is set by CookbookLoader...
all_files: Dir[File.join(cookbook_root, "**", "**")],
}
end
diff --git a/spec/unit/data_collector_spec.rb b/spec/unit/data_collector_spec.rb
index bc234d56aa..dc9d43dcd0 100644
--- a/spec/unit/data_collector_spec.rb
+++ b/spec/unit/data_collector_spec.rb
@@ -827,7 +827,7 @@ describe Chef::DataCollector do
it_behaves_like "sends a converge message"
end
- context "when the resource collection contains a resource that was unproccesed due to prior errors" do
+ context "when the resource collection contains a resource that was unprocessed due to prior errors" do
let(:exception) { Exception.new("imperial to metric conversion error") }
let(:error_description) { Chef::Formatters::ErrorMapper.resource_failed(new_resource, :create, exception).for_json }
let(:total_resource_count) { 2 }
diff --git a/spec/unit/event_dispatch/dispatcher_spec.rb b/spec/unit/event_dispatch/dispatcher_spec.rb
index 1db43ad740..d848f84ff5 100644
--- a/spec/unit/event_dispatch/dispatcher_spec.rb
+++ b/spec/unit/event_dispatch/dispatcher_spec.rb
@@ -123,7 +123,7 @@ describe Chef::EventDispatch::Dispatcher do
context "events that queue events" do
class Accumulator
def self.sequence
- @secuence ||= []
+ @sequence ||= []
end
end
diff --git a/spec/unit/file_content_management/deploy/mv_unix_spec.rb b/spec/unit/file_content_management/deploy/mv_unix_spec.rb
index 491457e8c6..3f869b5b71 100644
--- a/spec/unit/file_content_management/deploy/mv_unix_spec.rb
+++ b/spec/unit/file_content_management/deploy/mv_unix_spec.rb
@@ -76,7 +76,7 @@ describe Chef::FileContentManagement::Deploy::MvUnix do
context "when the user does not have permissions to set file ownership" do
# The test code does not care what these values are. These values are
- # chosen because they're representitive of the case that chef-client is
+ # chosen because they're representative of the case that chef-client is
# running as non-root and is managing a file that got ownership set to
# root somehow. In this example, gid==20 is something like "staff" which
# the user running chef-client is a member of (but it's not that user's
diff --git a/spec/unit/file_content_management/deploy/mv_windows_spec.rb b/spec/unit/file_content_management/deploy/mv_windows_spec.rb
index 51c3ff051e..9a191e638c 100644
--- a/spec/unit/file_content_management/deploy/mv_windows_spec.rb
+++ b/spec/unit/file_content_management/deploy/mv_windows_spec.rb
@@ -66,7 +66,7 @@ describe Chef::FileContentManagement::Deploy::MvWindows do
end
- context "when run without adminstrator privileges" do
+ context "when run without administrator privileges" do
before do
expect(target_file_security_object).to receive(:security_descriptor).and_raise(Chef::Exceptions::Win32APIError)
end
diff --git a/spec/unit/file_content_management/tempfile_spec.rb b/spec/unit/file_content_management/tempfile_spec.rb
index a04ace5f16..62272cb440 100644
--- a/spec/unit/file_content_management/tempfile_spec.rb
+++ b/spec/unit/file_content_management/tempfile_spec.rb
@@ -98,7 +98,7 @@ describe Chef::FileContentManagement::Tempfile do
expect(tempfile.path).to match(/chef-new_file.*\.html\.erb$/)
end
- it "should pick the destdir preferrentially" do
+ it "should pick the destdir preferentially" do
subject = tempfile_object_for_path("/foo/bar/new_file")
expect(Tempfile).to receive(:open).with([tempname, ""], "/foo/bar").and_return(tempfile)
subject.send(:tempfile_open)
diff --git a/spec/unit/formatters/base_spec.rb b/spec/unit/formatters/base_spec.rb
index 19182554f9..8baed75c7c 100644
--- a/spec/unit/formatters/base_spec.rb
+++ b/spec/unit/formatters/base_spec.rb
@@ -41,7 +41,7 @@ describe Chef::Formatters::Base do
expect(formatter.output.indent).to eql(2)
end
- it "increments it and then decrements it corectly" do
+ it "increments it and then decrements it correctly" do
formatter.indent_by(2)
formatter.indent_by(-2)
expect(formatter.output.indent).to eql(0)
diff --git a/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb b/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb
index 35ae5378cf..78a29acaf7 100644
--- a/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb
+++ b/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb
@@ -81,7 +81,7 @@ describe Chef::Formatters::ErrorInspectors::CookbookResolveErrorInspector do
before do
- @response_body = "{\"error\":[{\"non_existent_cookbooks\":[],\"cookbooks_with_no_versions\":[],\"message\":\"unable to solve dependencies in alotted time.\"}]}"
+ @response_body = "{\"error\":[{\"non_existent_cookbooks\":[],\"cookbooks_with_no_versions\":[],\"message\":\"unable to solve dependencies in allotted time.\"}]}"
@response = Net::HTTPPreconditionFailed.new("1.1", "412", "(response) unauthorized")
allow(@response).to receive(:body).and_return(@response_body)
@exception = Net::HTTPClientException.new("(exception) precondition failed", @response)
@@ -93,7 +93,7 @@ describe Chef::Formatters::ErrorInspectors::CookbookResolveErrorInspector do
it "prints a pretty message" do
@description.display(@outputter)
@outputter_output.rewind
- expect(@outputter_output.read).to include("unable to solve dependencies in alotted time.")
+ expect(@outputter_output.read).to include("unable to solve dependencies in allotted time.")
end
end
diff --git a/spec/unit/http_spec.rb b/spec/unit/http_spec.rb
index bf873b8535..bb52db60fd 100644
--- a/spec/unit/http_spec.rb
+++ b/spec/unit/http_spec.rb
@@ -43,7 +43,7 @@ describe Chef::HTTP do
end
- describe "#intialize" do
+ describe "#initialize" do
it "accepts a keepalive option and passes it to the http_client" do
http = Chef::HTTP.new(uri, keepalives: true)
expect(Chef::HTTP::BasicClient).to receive(:new).with(uri, ssl_policy: Chef::HTTP::APISSLPolicy, keepalives: true).and_call_original
@@ -165,7 +165,7 @@ describe Chef::HTTP do
end
it "raises the error without retrying or sleeping" do
- # We modify the strings to give addtional context, but the exception class should be the same
+ # We modify the strings to give additional context, but the exception class should be the same
expect { http.get("/") }.to raise_error(exception.class)
end
end
diff --git a/spec/unit/key_spec.rb b/spec/unit/key_spec.rb
index efae549490..09d6b48af5 100644
--- a/spec/unit/key_spec.rb
+++ b/spec/unit/key_spec.rb
@@ -21,7 +21,7 @@ require "spec_helper"
require "chef/key"
describe Chef::Key do
- # whether user or client irrelevent to these tests
+ # whether user or client irrelevant to these tests
let(:key) { Chef::Key.new("original_actor", "user") }
let(:public_key_string) do
<<~EOS
diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb
index 5a3d6a1475..75c8589c32 100644
--- a/spec/unit/knife/bootstrap_spec.rb
+++ b/spec/unit/knife/bootstrap_spec.rb
@@ -2035,7 +2035,7 @@ describe Chef::Knife::Bootstrap do
knife.do_connect({})
end
- context "when sshd confgiured with requiretty" do
+ context "when sshd configured with requiretty" do
let(:pty_err_msg) { "Sudo requires a TTY. Please see the README on how to configure sudo to allow for non-interactive usage." }
let(:expected_error) { Train::UserError.new(pty_err_msg, :sudo_no_tty) }
before do
diff --git a/spec/unit/knife/environment_edit_spec.rb b/spec/unit/knife/environment_edit_spec.rb
index 1f2ff27ce8..ccac745888 100644
--- a/spec/unit/knife/environment_edit_spec.rb
+++ b/spec/unit/knife/environment_edit_spec.rb
@@ -63,7 +63,7 @@ describe Chef::Knife::EnvironmentEdit do
@knife.run
end
- it "shoud show usage and exit when no environment name is provided" do
+ it "should show usage and exit when no environment name is provided" do
@knife.name_args = []
expect(@knife).to receive(:show_usage)
expect { @knife.run }.to raise_error(SystemExit)
diff --git a/spec/unit/knife/ssl_fetch_spec.rb b/spec/unit/knife/ssl_fetch_spec.rb
index fb904074b3..4b0a3b91dd 100644
--- a/spec/unit/knife/ssl_fetch_spec.rb
+++ b/spec/unit/knife/ssl_fetch_spec.rb
@@ -56,7 +56,7 @@ describe Chef::Knife::SslFetch do
context "when a specific URI is given" do
let(:name_args) { %w{https://example.test:10443/foo} }
- it "fetchs the SSL configuration against the given host" do
+ it "fetches the SSL configuration against the given host" do
expect(ssl_fetch.host).to eq("example.test")
expect(ssl_fetch.port).to eq(10443)
end
diff --git a/spec/unit/knife_spec.rb b/spec/unit/knife_spec.rb
index 47d4a6bf66..ba6a084454 100644
--- a/spec/unit/knife_spec.rb
+++ b/spec/unit/knife_spec.rb
@@ -526,7 +526,7 @@ describe Chef::Knife do
knife.run_with_pretty_exceptions
expect(stderr.string).to match(/The request that .* sent was using API version 10000000./)
- expect(stderr.string).to match(/The server you sent the request to supports a min API verson of 0 and a max API version of 1./)
+ expect(stderr.string).to match(/The server you sent the request to supports a min API version of 0 and a max API version of 1./)
expect(stderr.string).to match(/Please either update your .* or the server to be a compatible set./)
end
diff --git a/spec/unit/lwrp_spec.rb b/spec/unit/lwrp_spec.rb
index cb7ebde029..fc52560021 100644
--- a/spec/unit/lwrp_spec.rb
+++ b/spec/unit/lwrp_spec.rb
@@ -445,7 +445,7 @@ describe "LWRP" do
end
end
- context "with a cookbook with a hypen in the name" do
+ context "with a cookbook with a hyphen in the name" do
let(:lwrp_cookbook_name) { "l-w-r-p" }
diff --git a/spec/unit/mixin/openssl_helper_spec.rb b/spec/unit/mixin/openssl_helper_spec.rb
index 5155d66a22..4ae8754610 100644
--- a/spec/unit/mixin/openssl_helper_spec.rb
+++ b/spec/unit/mixin/openssl_helper_spec.rb
@@ -862,7 +862,7 @@ describe Chef::Mixin::OpenSSLHelper do
@certfile = Tempfile.new("certfile")
end
- context "When the cert file doesnt not exist" do
+ context "When the cert file doesn't exist" do
it "returns true" do
expect(instance.cert_need_renewall?("/tmp/bad_filename", 3650)).to be_truthy
end
@@ -876,7 +876,7 @@ describe Chef::Mixin::OpenSSLHelper do
end
end
- context "When the cert file does exist, and does not contain a soon to expire certficitate" do
+ context "When the cert file does exist, and does not contain a soon to expire certificate" do
it "returns false" do
@certfile.write("-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIVAPCkjE+wlZ1PgXwgvFgXKzhSpUkvMA0GCSqGSIb3DQEB\nCwUAMA0xCzAJBgNVBAMMAkNBMB4XDTE5MTIyNTEyNTY1NVoXDTI5MTIyMjEyNTY1\nNVowDTELMAkGA1UEAwwCQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB\nAQC9bDWs5akf85UEMj8kry4DYNuAnaL4GnMs6XukQtp3dso+FgbKprgVogyepnet\nE+GlQq32u/n4y8K228kB6NoCn+c/yP+4QlKUBt0xSzQbSUuAE/5xZoKi/kH1ZsQ/\nuKXN/tIHagApEUGn5zqc8WBvWPliRAqiklwj8WtSw1WRa5eCdaVtln3wKuvPnYR5\n/V4YBHyHNhtlfXJBMtEaXm1rRzJGun+FdcrsCfcIFXp8lWobF+EVP8fRwqFTEtT6\nRXv6RT8sHy53a0KNTm8qnbacfr1MofgUuhzLjOrbIVvXpnRLeOkv8XW5rSH+zgsC\nZFK3bJ3j6UVbFQV4jXwlAWVrAgMBAAGjgY4wgYswDgYDVR0PAQH/BAQDAgGmMA8G\nA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFK4S2PNu6bpjxkJxedNaxfCrwtD4MEkG\nA1UdIwRCMECAFK4S2PNu6bpjxkJxedNaxfCrwtD4oRGkDzANMQswCQYDVQQDDAJD\nQYIVAPCkjE+wlZ1PgXwgvFgXKzhSpUkvMA0GCSqGSIb3DQEBCwUAA4IBAQBGk+u3\n9N3PLWNOwYrqK7fD4yceWnz4UsV9uN1IU5PQTgYBaGyAZvU+VJluZZeDj7QjwbUW\ngISclvW/pSWpUVW3O0sfAM97u+5UMYHz4W5Bgq8CtdOKHgdZHKhzBePhmou11zO0\nZ6uQ7bkh0/REqKO7TFKaMMnakEhFXoDrS1EiB4W69KVXyrBVzVm5LK7uvOAQAeMp\nnEk3Oz+5pmKjSCf1cEd2jzAgDbaVrIvxICPgXAlNrKukmRW/0UHqDDVBfF7PioD2\nptlQFxWIkih6s/clwhsBFBwV1yyCirYfjhzmKPPLZUmx10okudLzaKrRbkPxrzbC\nmKEZoV+Nz2CNrGm5\n-----END CERTIFICATE-----\n")
@certfile.close
@@ -884,7 +884,7 @@ describe Chef::Mixin::OpenSSLHelper do
end
end
- context "When the cert file does exist, and does contain a soon to expire certficitate" do
+ context "When the cert file does exist, and does contain a soon to expire certificate" do
it "returns true" do
@certfile.write("-----BEGIN CERTIFICATE-----\nMIIDODCCAiCgAwIBAgIVAPCkjE+wlZ1PgXwgvFgXKzhSpUkvMA0GCSqGSIb3DQEB\nCwUAMA0xCzAJBgNVBAMMAkNBMB4XDTE5MTIyNTEyNTY1NVoXDTI5MTIyMjEyNTY1\nNVowDTELMAkGA1UEAwwCQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB\nAQC9bDWs5akf85UEMj8kry4DYNuAnaL4GnMs6XukQtp3dso+FgbKprgVogyepnet\nE+GlQq32u/n4y8K228kB6NoCn+c/yP+4QlKUBt0xSzQbSUuAE/5xZoKi/kH1ZsQ/\nuKXN/tIHagApEUGn5zqc8WBvWPliRAqiklwj8WtSw1WRa5eCdaVtln3wKuvPnYR5\n/V4YBHyHNhtlfXJBMtEaXm1rRzJGun+FdcrsCfcIFXp8lWobF+EVP8fRwqFTEtT6\nRXv6RT8sHy53a0KNTm8qnbacfr1MofgUuhzLjOrbIVvXpnRLeOkv8XW5rSH+zgsC\nZFK3bJ3j6UVbFQV4jXwlAWVrAgMBAAGjgY4wgYswDgYDVR0PAQH/BAQDAgGmMA8G\nA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFK4S2PNu6bpjxkJxedNaxfCrwtD4MEkG\nA1UdIwRCMECAFK4S2PNu6bpjxkJxedNaxfCrwtD4oRGkDzANMQswCQYDVQQDDAJD\nQYIVAPCkjE+wlZ1PgXwgvFgXKzhSpUkvMA0GCSqGSIb3DQEBCwUAA4IBAQBGk+u3\n9N3PLWNOwYrqK7fD4yceWnz4UsV9uN1IU5PQTgYBaGyAZvU+VJluZZeDj7QjwbUW\ngISclvW/pSWpUVW3O0sfAM97u+5UMYHz4W5Bgq8CtdOKHgdZHKhzBePhmou11zO0\nZ6uQ7bkh0/REqKO7TFKaMMnakEhFXoDrS1EiB4W69KVXyrBVzVm5LK7uvOAQAeMp\nnEk3Oz+5pmKjSCf1cEd2jzAgDbaVrIvxICPgXAlNrKukmRW/0UHqDDVBfF7PioD2\nptlQFxWIkih6s/clwhsBFBwV1yyCirYfjhzmKPPLZUmx10okudLzaKrRbkPxrzbC\nmKEZoV+Nz2CNrGm5\n-----END CERTIFICATE-----\n")
@certfile.close
diff --git a/spec/unit/node/attribute_spec.rb b/spec/unit/node/attribute_spec.rb
index 4490aca9a9..e6429c0c24 100644
--- a/spec/unit/node/attribute_spec.rb
+++ b/spec/unit/node/attribute_spec.rb
@@ -178,7 +178,7 @@ describe Chef::Node::Attribute do
expect(@attributes).to be_a_kind_of(Chef::Node::Attribute)
end
- it "should take an Automatioc, Normal, Default and Override hash" do
+ it "should take an Automatic, Normal, Default and Override hash" do
expect { Chef::Node::Attribute.new({}, {}, {}, {}) }.not_to raise_error
end
diff --git a/spec/unit/node_spec.rb b/spec/unit/node_spec.rb
index 5b50f888f0..e21328d373 100644
--- a/spec/unit/node_spec.rb
+++ b/spec/unit/node_spec.rb
@@ -297,7 +297,7 @@ describe Chef::Node do
expect(node[:snoopy][:is_a_puppy]).to eq(true)
end
- it "should let you use tag as a convience method for the tags attribute" do
+ it "should let you use tag as a convince method for the tags attribute" do
node.normal["tags"] = %w{one two}
node.tag("three", "four")
expect(node["tags"]).to eq(%w{one two three four})
@@ -436,7 +436,7 @@ describe Chef::Node do
node.override["mysql"]["server"]["port"] = 3456
end
- it "deletes all the values and returns the value with the highest precidence" do
+ it "deletes all the values and returns the value with the highest precedence" do
expect( node.rm("mysql", "server", "port") ).to eql(3456)
expect( node["mysql"]["server"]["port"] ).to be_nil
expect( node["mysql"]["server"] ).to eql({})
@@ -527,7 +527,7 @@ describe Chef::Node do
expect( node.rm_default("mysql", "server", "port") ).to eql(3456)
end
- it "returns nil for the combined attribues" do
+ it "returns nil for the combined attributes" do
expect( node.rm_default("mysql", "server", "port") ).to eql(3456)
expect( node["mysql"]["server"]["port"] ).to eql(nil)
end
@@ -633,7 +633,7 @@ describe Chef::Node do
expect( node["mysql"]["server"] ).to eql({ "data_dir" => "/my_raid_volume/lib/mysql" })
end
- it "replaces a value at the cookbook sub-level of the atributes only" do
+ it "replaces a value at the cookbook sub-level of the attributes only" do
node.default["mysql"]["server"]["port"] = 2345
node.default["mysql"]["server"]["service_name"] = "fancypants-sql"
node.role_default["mysql"]["server"]["port"] = 1234
@@ -1764,7 +1764,7 @@ describe Chef::Node do
a = node.default["foo"]
# assign that somewhere else in the tree
node.default["fizz"] = a
- # now upate the source
+ # now update the source
a["duptest"] = true
# the tree should have been updated
expect(node.default["fizz"]["duptest"]).to be true
diff --git a/spec/unit/property_spec.rb b/spec/unit/property_spec.rb
index 177314d8bc..1e6ec8878a 100644
--- a/spec/unit/property_spec.rb
+++ b/spec/unit/property_spec.rb
@@ -819,7 +819,7 @@ describe "Chef::Resource.property" do
expect(resource.x).to eq 2
expect(Namer.current_index).to eq 2
end
- it "setting the same lazy value on two different instances runs it on each instancee" do
+ it "setting the same lazy value on two different instances runs it on each instances" do
resource2 = resource_class.new("blah2")
l = lazy { Namer.next_index }
resource.x l
@@ -1319,7 +1319,7 @@ describe "Chef::Resource.property" do
expect { thing_two_resource.copy_properties_from(thing_three_resource) }.to raise_error(NoMethodError)
end
- it "does not blow up if blows up if the target resource does not implement a set propery" do
+ it "does not blow up if blows up if the target resource does not implement a set properly" do
thing_three_resource.foo "foo"
thing_three_resource.bar "bar"
thing_two_resource.copy_properties_from(thing_three_resource)
diff --git a/spec/unit/provider/apt_preference_spec.rb b/spec/unit/provider/apt_preference_spec.rb
index 91b2f58acb..1cb68f9cda 100644
--- a/spec/unit/provider/apt_preference_spec.rb
+++ b/spec/unit/provider/apt_preference_spec.rb
@@ -82,7 +82,7 @@ describe "Chef::Provider::AptPreference" do
FileUtils.touch("#{pref_dir}/libmysqlclient16_1wildcard.pref")
end
- it "deletes the name santized .pref file" do
+ it "deletes the name sanitized .pref file" do
provider.run_action(:remove)
expect(new_resource).to be_updated_by_last_action
expect(File).not_to exist("#{pref_dir}/libmysqlclient16_1wildcard.pref")
diff --git a/spec/unit/provider/package/cab_spec.rb b/spec/unit/provider/package/cab_spec.rb
index 0ffbcd4a51..f281e2c69b 100644
--- a/spec/unit/provider/package/cab_spec.rb
+++ b/spec/unit/provider/package/cab_spec.rb
@@ -132,7 +132,7 @@ describe Chef::Provider::Package::Cab do
new_resource.cookbook_name = "cab_package"
end
- it "sets the desired parameters of downloades cab file" do
+ it "sets the desired parameters of downloaded cab file" do
allow(provider).to receive(:default_download_cache_path).and_return("C:\\chef\\cache\\package")
source_resource = provider.source_resource
expect(source_resource.path).to be == "C:\\chef\\cache\\package"
diff --git a/spec/unit/provider/package/msu_spec.rb b/spec/unit/provider/package/msu_spec.rb
index 905d48649f..b3cfa0576a 100644
--- a/spec/unit/provider/package/msu_spec.rb
+++ b/spec/unit/provider/package/msu_spec.rb
@@ -141,7 +141,7 @@ describe Chef::Provider::Package::Msu, :windows_only do
new_resource.cookbook_name = "Msu_package"
end
- it "sets the desired parameters of downloades msu file" do
+ it "sets the desired parameters of downloaded msu file" do
allow(provider).to receive(:default_download_cache_path).and_return("C:\\chef\\cache\\package")
source_resource = provider.source_resource
expect(source_resource.path).to be == "C:\\chef\\cache\\package"
diff --git a/spec/unit/provider/package/rpm_spec.rb b/spec/unit/provider/package/rpm_spec.rb
index 1c4f9d31ee..813eda0377 100644
--- a/spec/unit/provider/package/rpm_spec.rb
+++ b/spec/unit/provider/package/rpm_spec.rb
@@ -50,7 +50,7 @@ describe Chef::Provider::Package::Rpm do
describe "when the package source is not valid" do
- context "when source is not defiend" do
+ context "when source is not defined" do
let(:new_resource) { Chef::Resource::RpmPackage.new("ImageMagick-c++") }
it "should raise an exception when attempting any action" do
@@ -428,7 +428,7 @@ describe Chef::Provider::Package::Rpm do
provider.install_package("/tmp/ImageMagick-c++-6.5.4.7-7.el6_5.x86_64.rpm", "6.5.4.7-7.el6_5")
end
- it "should uprgrade from a path when the package is a path and the source is nil" do
+ it "should upgrade from a path when the package is a path and the source is nil" do
expect(new_resource.source).to eq("/tmp/ImageMagick-c++-6.5.4.7-7.el6_5.x86_64.rpm")
current_resource.version("21.4-19.el5")
provider.current_resource = current_resource
diff --git a/spec/unit/provider/package/rubygems_spec.rb b/spec/unit/provider/package/rubygems_spec.rb
index 54b721ed40..0a55ffd784 100644
--- a/spec/unit/provider/package/rubygems_spec.rb
+++ b/spec/unit/provider/package/rubygems_spec.rb
@@ -808,7 +808,7 @@ describe Chef::Provider::Package::Rubygems do
end
end
- context "when clear_sources is set true and an explict source is specified" do
+ context "when clear_sources is set true and an explicit source is specified" do
let(:gem_binary) { "/foo/bar" }
let(:source) { "http://mirror.ops.rhcloud.com/mirror/ruby" }
@@ -821,7 +821,7 @@ describe Chef::Provider::Package::Rubygems do
end
end
- context "when clear_sources is set false and an explict source is specified" do
+ context "when clear_sources is set false and an explicit source is specified" do
let(:gem_binary) { "/foo/bar" }
let(:source) { "http://mirror.ops.rhcloud.com/mirror/ruby" }
@@ -867,7 +867,7 @@ describe Chef::Provider::Package::Rubygems do
end
describe "at version specified with comparison operator" do
- context "if current version satisifies requested version" do
+ context "if current version satisfies requested version" do
let(:target_version) { ">=2.3.0" }
let(:current_version) { "2.3.3" }
diff --git a/spec/unit/provider/package/solaris_spec.rb b/spec/unit/provider/package/solaris_spec.rb
index 5fc2d89a81..8effa82a78 100644
--- a/spec/unit/provider/package/solaris_spec.rb
+++ b/spec/unit/provider/package/solaris_spec.rb
@@ -55,7 +55,7 @@ describe Chef::Provider::Package::Solaris do
expect(@provider.current_resource.name).to eq("SUNWbash")
end
- it "should set the current reource package name to the new resource package name" do
+ it "should set the current resource package name to the new resource package name" do
allow(@provider).to receive(:shell_out_compacted).and_return(@status)
@provider.load_current_resource
expect(@provider.current_resource.package_name).to eq("SUNWbash")
diff --git a/spec/unit/provider/package_spec.rb b/spec/unit/provider/package_spec.rb
index accd913ebe..ab2f60cd46 100644
--- a/spec/unit/provider/package_spec.rb
+++ b/spec/unit/provider/package_spec.rb
@@ -551,7 +551,7 @@ describe "Chef::Provider::Package - Multi" do
expect(new_resource).not_to be_updated_by_last_action
end
- it "raises an exception if both are not installed and no caondidates are available" do
+ it "raises an exception if both are not installed and no candidates are available" do
current_resource.version([nil, nil])
provider.candidate_version = [nil, nil]
expect { provider.run_action(:install) }.to raise_error(Chef::Exceptions::Package)
@@ -631,7 +631,7 @@ describe "Chef::Provider::Package - Multi" do
expect(new_resource).not_to be_updated_by_last_action
end
- it "should raise an exception if both are not installed and no caondidates are available" do
+ it "should raise an exception if both are not installed and no candidates are available" do
current_resource.version([nil, nil])
provider.candidate_version = [nil, nil]
expect { provider.run_action(:upgrade) }.to raise_error(Chef::Exceptions::Package)
diff --git a/spec/unit/provider/remote_file/http_spec.rb b/spec/unit/provider/remote_file/http_spec.rb
index 8ece1a854b..032cf474ef 100644
--- a/spec/unit/provider/remote_file/http_spec.rb
+++ b/spec/unit/provider/remote_file/http_spec.rb
@@ -305,7 +305,7 @@ describe Chef::Provider::RemoteFile::HTTP do
it "should disable gzip compression in the client" do
# Before block in the parent context has set an expectation on
- # Chef::HTTP::Simple.new() being called with expected arguments. Here we fufil
+ # Chef::HTTP::Simple.new() being called with expected arguments. Here we fulfill
# that expectation, so that we can explicitly set it for this test.
# This is intended to provide insurance that refactoring of the parent
# context does not negate the value of this particular example.
diff --git a/spec/unit/provider/service/windows_spec.rb b/spec/unit/provider/service/windows_spec.rb
index 4209624057..2815c266b8 100644
--- a/spec/unit/provider/service/windows_spec.rb
+++ b/spec/unit/provider/service/windows_spec.rb
@@ -431,7 +431,7 @@ describe Chef::Provider::Service::Windows, "load_current_resource" do
expect(provider.resource_updated?).to be false
end
- it "does not convigure service" do
+ it "does not configure service" do
expect(Win32::Service).to_not receive(:configure)
provider.action_configure
end
diff --git a/spec/unit/resource/cron_spec.rb b/spec/unit/resource/cron_spec.rb
index e70e8aa76a..4322d6c24b 100644
--- a/spec/unit/resource/cron_spec.rb
+++ b/spec/unit/resource/cron_spec.rb
@@ -139,7 +139,7 @@ describe Chef::Resource::Cron do
end
end
- describe "when it has a time (minute, hour, day, month, weeekend) and user" do
+ describe "when it has a time (minute, hour, day, month, weekend) and user" do
before do
resource.command("tackle")
resource.minute("1")
diff --git a/spec/unit/resource/remote_file_spec.rb b/spec/unit/resource/remote_file_spec.rb
index 27b889ea9e..62dca20ddf 100644
--- a/spec/unit/resource/remote_file_spec.rb
+++ b/spec/unit/resource/remote_file_spec.rb
@@ -78,7 +78,7 @@ describe Chef::Resource::RemoteFile do
expect(resource.source).to eql(["file:///C:/foo bar"])
end
- it "accepts a delayed evalutator (string) for the remote file source" do
+ it "accepts a delayed evaluator (string) for the remote file source" do
resource.source Chef::DelayedEvaluator.new { "http://opscode.com/" }
expect(resource.source).to eql([ "http://opscode.com/" ])
end
@@ -165,7 +165,7 @@ describe Chef::Resource::RemoteFile do
expect(resource.use_last_modified).to be_truthy
end
- it "disables etags indivdually" do
+ it "disables etags individually" do
resource.use_etags(false)
expect(resource.use_etags).to be_falsey
expect(resource.use_last_modified).to be_truthy
diff --git a/spec/unit/resource/windows_workgroup_spec.rb b/spec/unit/resource/windows_workgroup_spec.rb
index 0ea0d8b291..14cec253bf 100644
--- a/spec/unit/resource/windows_workgroup_spec.rb
+++ b/spec/unit/resource/windows_workgroup_spec.rb
@@ -58,13 +58,13 @@ describe Chef::Resource::WindowsWorkgroup do
describe "#join_command" do
context "if password property is not specified" do
- it "contructs a command without credentials" do
+ it "constructs a command without credentials" do
expect(provider.join_command).to eql("Add-Computer -WorkgroupName example -Force")
end
end
context "if password property is specified" do
- it "contructs a command without credentials" do
+ it "constructs a command without credentials" do
resource.password("1234")
resource.user("admin")
expect(provider.join_command).to eql("$pswd = ConvertTo-SecureString '1234' -AsPlainText -Force;$credential = New-Object System.Management.Automation.PSCredential (\"admin\",$pswd);Add-Computer -WorkgroupName example -Credential $credential -Force")
diff --git a/spec/unit/resource_reporter_spec.rb b/spec/unit/resource_reporter_spec.rb
index 22bba578eb..1c6b063198 100644
--- a/spec/unit/resource_reporter_spec.rb
+++ b/spec/unit/resource_reporter_spec.rb
@@ -794,7 +794,7 @@ describe Chef::ResourceReporter do
end
- it "should raise if an unkwown error happens" do
+ it "should raise if an unknown error happens" do
allow(rest_client).to receive(:raw_request).and_raise(Exception.new)
expect do
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb
index d6b67e6f2e..d41cc0e8a3 100644
--- a/spec/unit/resource_spec.rb
+++ b/spec/unit/resource_spec.rb
@@ -366,7 +366,7 @@ describe Chef::Resource do
end
context "when property is sensitive" do
- it "supresses that properties value" do
+ it "suppresses that properties value" do
resource_class = Class.new(Chef::Resource) { property :foo, String, sensitive: true }
resource = resource_class.new("sensitive_property_tests")
resource.foo = "some value"
@@ -375,7 +375,7 @@ describe Chef::Resource do
end
context "when property is required" do
- it "does not propagate vailidation errors" do
+ it "does not propagate validation errors" do
resource_class = Class.new(Chef::Resource) { property :foo, String, required: true }
resource = resource_class.new("required_property_tests")
expect { resource.to_text }.to_not raise_error Chef::Exceptions::ValidationFailed
@@ -1027,7 +1027,7 @@ describe Chef::Resource do
describe "with a syntax error in the resource spec" do
- it "raises an exception immmediately" do
+ it "raises an exception immediately" do
expect do
resource.notifies(:run, "typo[missing-closing-bracket")
end.to raise_error(Chef::Exceptions::InvalidResourceSpecification)
@@ -1069,7 +1069,7 @@ describe Chef::Resource do
error_inspector = Chef::Formatters::ErrorInspectors::ResourceFailureInspector.new(resource, action, err)
description = Chef::Formatters::ErrorDescription.new("test")
error_inspector.add_explanation(description)
- Chef::Log.info("descrtiption: #{description.inspect},error_inspector: #{error_inspector}")
+ Chef::Log.info("description: #{description.inspect},error_inspector: #{error_inspector}")
description.sections[1]["Compiled Resource:"]
end
diff --git a/spec/unit/run_list/versioned_recipe_list_spec.rb b/spec/unit/run_list/versioned_recipe_list_spec.rb
index e116ffc130..03eef8da3c 100644
--- a/spec/unit/run_list/versioned_recipe_list_spec.rb
+++ b/spec/unit/run_list/versioned_recipe_list_spec.rb
@@ -69,7 +69,7 @@ describe Chef::RunList::VersionedRecipeList do
expect(list.with_versions).to include({ name: "rails", version: "1.0.0" })
end
- it "should allow you to spcify no version, even when a version already exists" do
+ it "should allow you to specify no version, even when a version already exists" do
list.add_recipe "rails", "1.0.0"
list.add_recipe "rails"
expect(list.with_versions).to include({ name: "rails", version: "1.0.0" })
diff --git a/spec/unit/user_v1_spec.rb b/spec/unit/user_v1_spec.rb
index 4bde7278fe..965d3e7719 100644
--- a/spec/unit/user_v1_spec.rb
+++ b/spec/unit/user_v1_spec.rb
@@ -26,7 +26,7 @@ describe Chef::UserV1 do
@user = Chef::UserV1.new
end
- shared_examples_for "string fields with no contraints" do
+ shared_examples_for "string fields with no constraints" do
it "should let you set the public key" do
expect(@user.send(method, "some_string")).to eq("some_string")
end
@@ -109,49 +109,49 @@ describe Chef::UserV1 do
describe "string fields" do
describe "public_key" do
- it_should_behave_like "string fields with no contraints" do
+ it_should_behave_like "string fields with no constraints" do
let(:method) { :public_key }
end
end
describe "private_key" do
- it_should_behave_like "string fields with no contraints" do
+ it_should_behave_like "string fields with no constraints" do
let(:method) { :private_key }
end
end
describe "display_name" do
- it_should_behave_like "string fields with no contraints" do
+ it_should_behave_like "string fields with no constraints" do
let(:method) { :display_name }
end
end
describe "first_name" do
- it_should_behave_like "string fields with no contraints" do
+ it_should_behave_like "string fields with no constraints" do
let(:method) { :first_name }
end
end
describe "middle_name" do
- it_should_behave_like "string fields with no contraints" do
+ it_should_behave_like "string fields with no constraints" do
let(:method) { :middle_name }
end
end
describe "last_name" do
- it_should_behave_like "string fields with no contraints" do
+ it_should_behave_like "string fields with no constraints" do
let(:method) { :last_name }
end
end
describe "email" do
- it_should_behave_like "string fields with no contraints" do
+ it_should_behave_like "string fields with no constraints" do
let(:method) { :email }
end
end
describe "password" do
- it_should_behave_like "string fields with no contraints" do
+ it_should_behave_like "string fields with no constraints" do
let(:method) { :password }
end
end
diff --git a/spec/unit/util/diff_spec.rb b/spec/unit/util/diff_spec.rb
index 70376bcdb1..113910ed30 100644
--- a/spec/unit/util/diff_spec.rb
+++ b/spec/unit/util/diff_spec.rb
@@ -402,7 +402,7 @@ shared_examples_for "a diff util" do
end
end
- it "should identify null-teriminated multi-line string files as binary" do
+ it "should identify null-terminated multi-line string files as binary" do
Tempfile.open("chef-util-diff-spec") do |file|
file.write("This is a binary file.\nNo Really\nit is\0")
file.close
diff --git a/spec/unit/util/dsc/resource_store.rb b/spec/unit/util/dsc/resource_store.rb
index a864a2c1da..a91b10d3c0 100644
--- a/spec/unit/util/dsc/resource_store.rb
+++ b/spec/unit/util/dsc/resource_store.rb
@@ -55,7 +55,7 @@ describe Chef::Util::DSC::ResourceStore do
expect(resource_store.find("foo")).to eql([resource_a])
end
- it "returns multiple resoures if they are found" do
+ it "returns multiple resources if they are found" do
expect(resource_store).to receive(:query_resource).and_return([resource_a, resource_b])
expect(resource_store.find("foo")).to include(resource_a, resource_b)
end
diff --git a/spec/unit/util/file_edit_spec.rb b/spec/unit/util/file_edit_spec.rb
index 5c5b04d8a5..14e675d41c 100644
--- a/spec/unit/util/file_edit_spec.rb
+++ b/spec/unit/util/file_edit_spec.rb
@@ -105,7 +105,7 @@ describe Chef::Util::FileEdit do
target_file.close!
end
- describe "initialiize" do
+ describe "initialize" do
it "should create a new Chef::Util::FileEdit object" do
expect(fedit).to be_instance_of(Chef::Util::FileEdit)
end
diff --git a/spec/unit/util/windows/logon_session_spec.rb b/spec/unit/util/windows/logon_session_spec.rb
index 8a94802bf6..8d8d613b77 100644
--- a/spec/unit/util/windows/logon_session_spec.rb
+++ b/spec/unit/util/windows/logon_session_spec.rb
@@ -31,7 +31,7 @@ describe ::Chef::Util::Windows::LogonSession do
let(:authentication) { :remote }
shared_examples_for "it received syntactically invalid credentials" do
- it "does not raisees an exception when it is initialized" do
+ it "does not raises an exception when it is initialized" do
expect { session }.to raise_error(ArgumentError)
end
end
diff --git a/spec/unit/win32/link_spec.rb b/spec/unit/win32/link_spec.rb
index de7b165dd0..04fc045703 100644
--- a/spec/unit/win32/link_spec.rb
+++ b/spec/unit/win32/link_spec.rb
@@ -46,14 +46,14 @@ describe Chef::ReservedNames::Win32::File, :windows_only do
allow(Chef::ReservedNames::Win32::File).to receive(:CreateSymbolicLinkW).with(any_args) { "don't //actually// do this" }
end
- it "will not pass the unpirivileged symlink flag if the node is not Windows 10" do
+ it "will not pass the unprivileged symlink flag if the node is not Windows 10" do
allow_any_instance_of(Chef::ReservedNames::Win32::Version).to receive(:windows_10?).and_return(false)
expect(Chef::ReservedNames::Win32::File).to receive(:CreateSymbolicLinkW).with("b", "a", without_privilege)
described_class.symlink("a", "b")
end
- it "will not pass the unpirivileged symlink flag if the node is not at least Windows 10 Creators Update" do
+ it "will not pass the unprivileged symlink flag if the node is not at least Windows 10 Creators Update" do
allow_any_instance_of(Chef::ReservedNames::Win32::Version).to receive(:windows_10?).and_return(true)
allow_any_instance_of(Chef::ReservedNames::Win32::Version).to receive(:build_number).and_return(1)
@@ -61,7 +61,7 @@ describe Chef::ReservedNames::Win32::File, :windows_only do
described_class.symlink("a", "b")
end
- it "will pass the unpirivileged symlink flag if the node is Windows 10 Creators Update or higher" do
+ it "will pass the unprivileged symlink flag if the node is Windows 10 Creators Update or higher" do
allow_any_instance_of(Chef::ReservedNames::Win32::Version).to receive(:windows_10?).and_return(true)
allow_any_instance_of(Chef::ReservedNames::Win32::Version).to receive(:build_number).and_return(15063)