diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-05-21 16:11:05 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-05-21 16:11:05 -0700 |
commit | 4d435357873f8836cb033e6e4f7b2cf85b936672 (patch) | |
tree | 32e5c5b0b016e84e1cc25d6f22a4301ecaf54ab9 | |
parent | 2cc69ed97e698a18856b0f21e24b84f69b743eb9 (diff) | |
download | chef-4d435357873f8836cb033e6e4f7b2cf85b936672.tar.gz |
Fix chefstyle warnings (spacing on comments)
Signed-off-by: Tim Smith <tsmith@chef.io>
54 files changed, 191 insertions, 191 deletions
@@ -37,7 +37,7 @@ task :super_install do sh("rake install") end -# Templating the powershell extensions so we can inject distro constants + # Templating the powershell extensions so we can inject distro constants template_file = ::File.join(::File.dirname(__FILE__), "distro", "templates", "powershell", "chef", "chef.psm1.erb") psm1_path = ::File.join(::File.dirname(__FILE__), "distro", "powershell", "chef") FileUtils.mkdir_p psm1_path diff --git a/chef-config/lib/chef-config/path_helper.rb b/chef-config/lib/chef-config/path_helper.rb index 4487dd2cf2..80cac88f97 100644 --- a/chef-config/lib/chef-config/path_helper.rb +++ b/chef-config/lib/chef-config/path_helper.rb @@ -268,7 +268,7 @@ module ChefConfig # Determine if the given path is protected by OS X System Integrity Protection. def self.is_sip_path?(path, node) if node["platform"] == "mac_os_x" && Gem::Version.new(node["platform_version"]) >= Gem::Version.new("10.11") - # @todo: parse rootless.conf for this? + # @todo: parse rootless.conf for this? sip_paths = [ "/System", "/bin", "/sbin", "/usr" ] diff --git a/chef-config/spec/unit/config_spec.rb b/chef-config/spec/unit/config_spec.rb index 874e3a48c4..5cf814e7b3 100644 --- a/chef-config/spec/unit/config_spec.rb +++ b/chef-config/spec/unit/config_spec.rb @@ -186,29 +186,29 @@ RSpec.describe ChefConfig::Config do end describe "when configuring formatters" do - # if TTY and not(force-logger) - # formatter = configured formatter or default formatter - # formatter goes to STDOUT/ERR - # if log file is writeable - # log level is configured level or info - # log location is file - # else - # log level is warn - # log location is STDERR - # end - # elsif not(TTY) and force formatter - # formatter = configured formatter or default formatter - # if log_location specified - # formatter goes to log_location - # else - # formatter goes to STDOUT/ERR - # end - # else - # formatter = "null" - # log_location = configured-value or defualt - # log_level = info or defualt - # end - # + # if TTY and not(force-logger) + # formatter = configured formatter or default formatter + # formatter goes to STDOUT/ERR + # if log file is writeable + # log level is configured level or info + # log location is file + # else + # log level is warn + # log location is STDERR + # end + # elsif not(TTY) and force formatter + # formatter = configured formatter or default formatter + # if log_location specified + # formatter goes to log_location + # else + # formatter goes to STDOUT/ERR + # end + # else + # formatter = "null" + # log_location = configured-value or defualt + # log_level = info or defualt + # end + # it "has an empty list of formatters by default" do expect(ChefConfig::Config.formatters).to eq([]) end diff --git a/kitchen-tests/cookbooks/end_to_end/attributes/default.rb b/kitchen-tests/cookbooks/end_to_end/attributes/default.rb index 027d9881d8..332a3fe462 100644 --- a/kitchen-tests/cookbooks/end_to_end/attributes/default.rb +++ b/kitchen-tests/cookbooks/end_to_end/attributes/default.rb @@ -21,7 +21,7 @@ default["openssh"]["client"]["password_authentication"] = "yes" # turn off kerberos client-side default["openssh"]["client"]["gssapi_authentication"] = "no" default["openssh"]["client"]["check_host_ip"] = "no" -# everone turns strict host key checking off anyway +# everyone turns strict host key checking off anyway default["openssh"]["client"]["strict_host_key_checking"] = "no" # force protocol 2 default["openssh"]["client"]["protocol"] = "2" diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb index 35aefc949d..6469e9b532 100644 --- a/lib/chef/application/apply.rb +++ b/lib/chef/application/apply.rb @@ -215,7 +215,7 @@ class Chef::Application::Apply < Chef::Application Chef::Application.fatal!("#{e.class}: #{e.message}", e) end - # Get this party started + # Get this party started def run(enforce_license = false) reconfigure check_license_acceptance if enforce_license diff --git a/lib/chef/application/exit_code.rb b/lib/chef/application/exit_code.rb index fb1519e573..3235bfadeb 100644 --- a/lib/chef/application/exit_code.rb +++ b/lib/chef/application/exit_code.rb @@ -139,8 +139,8 @@ class Chef def notify_on_deprecation(message) Chef.deprecated(:exit_code, message) rescue Chef::Exceptions::DeprecatedFeatureError - # Have to rescue this, otherwise this unhandled error preempts - # the current exit code assignment. + # Have to rescue this, otherwise this unhandled error preempts + # the current exit code assignment. end def non_standard_exit_code_warning(exit_code) diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb index 689ae3bf8a..8237729e89 100644 --- a/lib/chef/chef_fs/chef_fs_data_store.rb +++ b/lib/chef/chef_fs/chef_fs_data_store.rb @@ -204,7 +204,7 @@ class Chef @memory_store.create(path, name, data, *options) elsif path[0] == "cookbooks" && path.length == 2 - # Do nothing. The entry gets created when the cookbook is created. + # Do nothing. The entry gets created when the cookbook is created. # /policy_groups/GROUP/policies/NAME elsif path[0] == "policy_groups" && path[2] == "policies" @@ -724,8 +724,8 @@ class Chef path[-1] = "#{path[-1]}.json" end - # /acls/containers|nodes|... do NOT drop into the next elsif, and do - # not get .json appended + # /acls/containers|nodes|... do NOT drop into the next elsif, and do + # not get .json appended # /nodes|clients|.../x.json elsif path.length == 2 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 e0d4bea665..aa6981f23c 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 @@ -66,7 +66,7 @@ class Chef # } # } def children - # Grab the names of the children, append json, and make child entries + # Grab the names of the children, append json, and make child entries @children ||= begin result = [] data = root.get_json(api_path) diff --git a/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb b/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb index b60b84cb68..0a1ee83c36 100644 --- a/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb @@ -71,7 +71,7 @@ class Chef # Children are foo.json and bar.json in this case. # def children - # Grab the names of the children, append json, and make child entries + # Grab the names of the children, append json, and make child entries @children ||= root.get_json(api_path).keys.sort.map do |key| make_child_entry(key, true) end diff --git a/lib/chef/chef_fs/file_system/multiplexed_dir.rb b/lib/chef/chef_fs/file_system/multiplexed_dir.rb index 2930dd5d8c..82fa146264 100644 --- a/lib/chef/chef_fs/file_system/multiplexed_dir.rb +++ b/lib/chef/chef_fs/file_system/multiplexed_dir.rb @@ -19,7 +19,7 @@ class Chef def children result = [] seen = {} - # If multiple things have the same name, the first one wins. + # If multiple things have the same name, the first one wins. multiplexed_dirs.each do |dir| dir.children.each do |child| if seen[child.name] diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb index e9d21512d2..aa9130d10d 100644 --- a/lib/chef/cookbook_version.rb +++ b/lib/chef/cookbook_version.rb @@ -327,10 +327,10 @@ class Chef # extract the preference part from the path. if manifest_record_path =~ %r{(#{Regexp.escape(segment.to_s)}/[^/]+/#{Regexp.escape(dirname)})/.+$} - # Note the specificy_dirname includes the segment and - # dirname argument as above, which is what - # preferences_for_path returns. It could be - # "files/ubuntu-9.10/dirname", for example. + # Note the specificy_dirname includes the segment and + # dirname argument as above, which is what + # preferences_for_path returns. It could be + # "files/ubuntu-9.10/dirname", for example. specificity_dirname = $1 # Record the specificity_dirname only if it's in the list of diff --git a/lib/chef/deprecated.rb b/lib/chef/deprecated.rb index 7062e27aab..7962e96bfb 100644 --- a/lib/chef/deprecated.rb +++ b/lib/chef/deprecated.rb @@ -72,7 +72,7 @@ class Chef # Just in case someone uses a symbol in the config by mistake. silence_spec = silence_spec.to_s end - # Check for a silence by deprecation name, or by location. + # Check for a silence by deprecation name, or by location. self.class.deprecation_key == silence_spec || self.class.deprecation_id.to_s == silence_spec || "chef-#{self.class.deprecation_id}" == silence_spec.downcase || location.include?(silence_spec) end # check if this warning has been silenced by inline comment. diff --git a/lib/chef/dsl/platform_introspection.rb b/lib/chef/dsl/platform_introspection.rb index 166066bad7..50f30bda52 100644 --- a/lib/chef/dsl/platform_introspection.rb +++ b/lib/chef/dsl/platform_introspection.rb @@ -168,7 +168,7 @@ class Chef has_platform end - # Implementation class for determining platform family dependent values + # Implementation class for determining platform family dependent values class PlatformFamilyDependentValue # Create a platform family dependent value object. diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index 0c8efe722f..98efe6aae6 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -94,13 +94,13 @@ class Chef description: "For WinRM basic authentication when using the 'ssl' auth method.", boolean: true - # This option was provided in knife bootstrap windows winrm, - # but it is ignored in knife-windows/WinrmSession, and so remains unimplemeneted here. - # option :kerberos_keytab_file, - # :short => "-T KEYTAB_FILE", - # :long => "--keytab-file KEYTAB_FILE", - # :description => "The Kerberos keytab file used for authentication", - # :proc => Proc.new { |keytab| Chef::Config[:knife][:kerberos_keytab_file] = keytab } + # This option was provided in knife bootstrap windows winrm, + # but it is ignored in knife-windows/WinrmSession, and so remains unimplemeneted here. + # option :kerberos_keytab_file, + # :short => "-T KEYTAB_FILE", + # :long => "--keytab-file KEYTAB_FILE", + # :description => "The Kerberos keytab file used for authentication", + # :proc => Proc.new { |keytab| Chef::Config[:knife][:kerberos_keytab_file] = keytab } option :kerberos_realm, short: "-R KERBEROS_REALM", diff --git a/lib/chef/knife/cookbook_site_search.rb b/lib/chef/knife/cookbook_site_search.rb index 209a1ffba6..ad19ce9df4 100644 --- a/lib/chef/knife/cookbook_site_search.rb +++ b/lib/chef/knife/cookbook_site_search.rb @@ -24,7 +24,7 @@ class Chef class Knife class CookbookSiteSearch < Knife::SupermarketSearch - # Handle the subclassing (knife doesn't do this :() + # Handle the subclassing (knife doesn't do this :() dependency_loaders.concat(superclass.dependency_loaders) banner "knife cookbook site search QUERY (options)" diff --git a/lib/chef/knife/cookbook_site_show.rb b/lib/chef/knife/cookbook_site_show.rb index 2a3f654a65..accb528672 100644 --- a/lib/chef/knife/cookbook_site_show.rb +++ b/lib/chef/knife/cookbook_site_show.rb @@ -24,7 +24,7 @@ class Chef class Knife class CookbookSiteShow < Knife::SupermarketShow - # Handle the subclassing (knife doesn't do this :() + # Handle the subclassing (knife doesn't do this :() dependency_loaders.concat(superclass.dependency_loaders) banner "knife cookbook site show COOKBOOK [VERSION] (options)" diff --git a/lib/chef/knife/cookbook_site_unshare.rb b/lib/chef/knife/cookbook_site_unshare.rb index 372f79f8b4..6de7b55559 100644 --- a/lib/chef/knife/cookbook_site_unshare.rb +++ b/lib/chef/knife/cookbook_site_unshare.rb @@ -25,7 +25,7 @@ class Chef class Knife class CookbookSiteUnshare < Knife::SupermarketUnshare - # Handle the subclassing (knife doesn't do this :() + # Handle the subclassing (knife doesn't do this :() dependency_loaders.concat(superclass.dependency_loaders) banner "knife cookbook site unshare COOKBOOK (options)" diff --git a/lib/chef/mixin/create_path.rb b/lib/chef/mixin/create_path.rb index 6d6f66317e..26988556aa 100644 --- a/lib/chef/mixin/create_path.rb +++ b/lib/chef/mixin/create_path.rb @@ -53,14 +53,14 @@ class Chef private def create_dir(path) - # When doing multithreaded downloads into the file cache, the following - # interleaving raises an error here: - # - # thread1 thread2 - # File.directory?(create_path) <- false - # File.directory?(create_path) <- false - # Dir.mkdir(create_path) - # Dir.mkdir(create_path) <- raises Errno::EEXIST + # When doing multithreaded downloads into the file cache, the following + # interleaving raises an error here: + # + # thread1 thread2 + # File.directory?(create_path) <- false + # File.directory?(create_path) <- false + # Dir.mkdir(create_path) + # Dir.mkdir(create_path) <- raises Errno::EEXIST Chef::Log.trace("Creating directory #{path}") Dir.mkdir(path) rescue Errno::EEXIST diff --git a/lib/chef/node/mixin/deep_merge_cache.rb b/lib/chef/node/mixin/deep_merge_cache.rb index 8cde5a400a..e88e079895 100644 --- a/lib/chef/node/mixin/deep_merge_cache.rb +++ b/lib/chef/node/mixin/deep_merge_cache.rb @@ -19,9 +19,9 @@ class Chef class Node module Mixin module DeepMergeCache - # Cache of deep merged values by top-level key. This is a simple hash which has keys that are the - # top-level keys of the node object, and we save the computed deep-merge for that key here. There is - # no cache of subtrees. + # Cache of deep merged values by top-level key. This is a simple hash which has keys that are the + # top-level keys of the node object, and we save the computed deep-merge for that key here. There is + # no cache of subtrees. attr_accessor :deep_merge_cache def initialize @@ -31,10 +31,10 @@ class Chef @deep_merge_cache = {} end - # Invalidate a key in the deep_merge_cache. If called with nil, or no arg, this will invalidate - # the entire deep_merge cache. In the case of the user doing node.default['foo']['bar']['baz']= - # that eventually results in a call to reset_cache('foo') here. A node.default=hash_thing call - # must invalidate the entire cache and re-deep-merge the entire node object. + # Invalidate a key in the deep_merge_cache. If called with nil, or no arg, this will invalidate + # the entire deep_merge cache. In the case of the user doing node.default['foo']['bar']['baz']= + # that eventually results in a call to reset_cache('foo') here. A node.default=hash_thing call + # must invalidate the entire cache and re-deep-merge the entire node object. def reset_cache(path = nil) if path.nil? deep_merge_cache.clear diff --git a/lib/chef/provider/service/simple.rb b/lib/chef/provider/service/simple.rb index 754437b4a0..0d1a9ae786 100644 --- a/lib/chef/provider/service/simple.rb +++ b/lib/chef/provider/service/simple.rb @@ -117,9 +117,9 @@ class Chef logger.trace("#{@new_resource} is running") end rescue Mixlib::ShellOut::ShellCommandFailed, SystemCallError - # ShellOut sometimes throws different types of Exceptions than ShellCommandFailed. - # Temporarily catching different types of exceptions here until we get Shellout fixed. - # TODO: Remove the line before one we get the ShellOut fix. + # ShellOut sometimes throws different types of Exceptions than ShellCommandFailed. + # Temporarily catching different types of exceptions here until we get Shellout fixed. + # TODO: Remove the line before one we get the ShellOut fix. @status_load_success = false @current_resource.running false nil diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb index e0ede765c2..52d94d31a1 100644 --- a/lib/chef/provider/windows_task.rb +++ b/lib/chef/provider/windows_task.rb @@ -426,7 +426,7 @@ class Chef when TaskScheduler::AT_LOGON # TODO: handle option for this trigger when TaskScheduler::AT_SYSTEMSTART - # TODO: handle option for this trigger + # TODO: handle option for this trigger end end diff --git a/lib/chef/resource/build_essential.rb b/lib/chef/resource/build_essential.rb index 0ed2fba151..3bca73333f 100644 --- a/lib/chef/resource/build_essential.rb +++ b/lib/chef/resource/build_essential.rb @@ -60,7 +60,7 @@ class Chef when fedora_derived? package %w{ autoconf bison flex gcc gcc-c++ gettext kernel-devel make m4 ncurses-devel patch } - # Ensure GCC 4 is available on older pre-6 EL + # Ensure GCC 4 is available on older pre-6 EL package %w{ gcc44 gcc44-c++ } if platform_family?("rhel") && node["platform_version"].to_i < 6 when freebsd? package "devel/gmake" diff --git a/lib/chef/resource/launchd.rb b/lib/chef/resource/launchd.rb index 39d95bbf69..938244d097 100644 --- a/lib/chef/resource/launchd.rb +++ b/lib/chef/resource/launchd.rb @@ -76,20 +76,20 @@ class Chef property :start_calendar_interval, [Hash, Array], description: "A Hash (similar to crontab) that defines the calendar frequency at which a job is started or an Array.", coerce: proc { |type| - # Coerce into an array of hashes to make validation easier + # Coerce into an array of hashes to make validation easier array = if type.is_a?(Array) type else [type] end - # Check to make sure that our array only has hashes + # Check to make sure that our array only has hashes unless array.all? { |obj| obj.is_a?(Hash) } error_msg = "start_calendar_interval must be a single hash or an array of hashes!" raise Chef::Exceptions::ValidationFailed, error_msg end - # Make sure the hashes don't have any incorrect keys/values + # Make sure the hashes don't have any incorrect keys/values array.each do |entry| allowed_keys = %w{Minute Hour Day Weekday Month} unless entry.keys.all? { |key| allowed_keys.include?(key) } @@ -105,7 +105,7 @@ class Chef end end - # Don't return array if we only have one entry + # Don't return array if we only have one entry if array.size == 1 array.first else diff --git a/lib/chef/resource/macos_userdefaults.rb b/lib/chef/resource/macos_userdefaults.rb index 4e0f6b3b38..2d0633be6c 100644 --- a/lib/chef/resource/macos_userdefaults.rb +++ b/lib/chef/resource/macos_userdefaults.rb @@ -61,9 +61,9 @@ class Chef desired_state: false, skip_docs: true - # coerce various ways of representing a boolean into either 0 (false) or 1 (true) - # which is what the defaults CLI expects. Why? Well defaults itself accepts a few - # different formats, but when you do a read command it all comes back as 1 or 0. + # coerce various ways of representing a boolean into either 0 (false) or 1 (true) + # which is what the defaults CLI expects. Why? Well defaults itself accepts a few + # different formats, but when you do a read command it all comes back as 1 or 0. def coerce_booleans(val) return 1 if [true, "TRUE", "1", "true", "YES", "yes"].include?(val) return 0 if [false, "FALSE", "0", "false", "NO", "no"].include?(val) diff --git a/lib/chef/resource/windows_firewall_rule.rb b/lib/chef/resource/windows_firewall_rule.rb index 32938c227b..3de986ecc9 100644 --- a/lib/chef/resource/windows_firewall_rule.rb +++ b/lib/chef/resource/windows_firewall_rule.rb @@ -41,7 +41,7 @@ class Chef description: "The local address the firewall rule applies to." property :local_port, [String, Integer, Array], - # split various formats of comma separated lists and provide a sorted array of strings to match PS output + # split various formats of comma separated lists and provide a sorted array of strings to match PS output coerce: proc { |d| d.is_a?(String) ? d.split(/\s*,\s*/).sort : Array(d).sort.map(&:to_s) }, description: "The local port the firewall rule applies to." @@ -49,7 +49,7 @@ class Chef description: "The remote address the firewall rule applies to." property :remote_port, [String, Integer, Array], - # split various formats of comma separated lists and provide a sorted array of strings to match PS output + # split various formats of comma separated lists and provide a sorted array of strings to match PS output coerce: proc { |d| d.is_a?(String) ? d.split(/\s*,\s*/).sort : Array(d).sort.map(&:to_s) }, description: "The remote port the firewall rule applies to." diff --git a/lib/chef/resource/windows_share.rb b/lib/chef/resource/windows_share.rb index eaf2429f75..0c57ff3bc1 100644 --- a/lib/chef/resource/windows_share.rb +++ b/lib/chef/resource/windows_share.rb @@ -149,8 +149,8 @@ class Chef raise "The windows_share resource relies on PowerShell cmdlets not present in Windows releases prior to 8/2012. Cannot continue!" if node["platform_version"].to_f < 6.3 end -# given the string output of Get-SmbShareAccess parse out -# arrays of full access users, change users, and read only users + # given the string output of Get-SmbShareAccess parse out + # arrays of full access users, change users, and read only users def parse_permissions(results_string) json_results = Chef::JSONCompat.from_json(results_string) json_results = [json_results] unless json_results.is_a?(Array) # single result is not an array @@ -171,8 +171,8 @@ class Chef [f_users, c_users, r_users] end -# local names are returned from Get-SmbShareAccess in the full format MACHINE\\NAME -# but users of this resource would simply say NAME so we need to strip the values for comparison + # local names are returned from Get-SmbShareAccess in the full format MACHINE\\NAME + # but users of this resource would simply say NAME so we need to strip the values for comparison def stripped_account(name) name.slice!("#{node["hostname"]}\\") name diff --git a/lib/chef/resource/windows_task.rb b/lib/chef/resource/windows_task.rb index 359892b35a..8b5ca79823 100644 --- a/lib/chef/resource/windows_task.rb +++ b/lib/chef/resource/windows_task.rb @@ -159,16 +159,16 @@ class Chef private - ## Resource is not idempotent when day, start_day is not provided with frequency :weekly - ## we set start_day when not given by user as current date based on which we set the day property for current current date day is monday .. - ## we set the monday as the day so at next run when new_resource.day is nil and current_resource day is monday due to which udpate gets called + ## Resource is not idempotent when day, start_day is not provided with frequency :weekly + ## we set start_day when not given by user as current date based on which we set the day property for current current date day is monday .. + ## we set the monday as the day so at next run when new_resource.day is nil and current_resource day is monday due to which udpate gets called def idempotency_warning_for_frequency_weekly(day, start_day) if start_day.nil? && day.nil? logger.warn "To maintain idempotency for frequency :weekly provide start_day, start_time and day." end end - # Validate the passed value is numeric values only if it is a string + # Validate the passed value is numeric values only if it is a string def numeric_value_in_string?(val) return true if Integer(val) rescue ArgumentError @@ -194,7 +194,7 @@ class Chef end end - # returns true if frequency_modifer has values First, second, third, fourth, last, lastday + # returns true if frequency_modifer has values First, second, third, fourth, last, lastday def frequency_modifier_includes_days_of_weeks?(frequency_modifier) frequency_modifier = frequency_modifier.to_s.split(",") frequency_modifier.map! { |value| value.strip.upcase } @@ -209,7 +209,7 @@ class Chef raise ArgumentError, "Invalid value passed for `random_delay`. Please pass seconds as an Integer (e.g. 60) or a String with numeric values only (e.g. '60')." unless numeric_value_in_string?(random_delay) end - # @todo when we drop ruby 2.3 support this should be converted to .match?() instead of =~f + # @todo when we drop ruby 2.3 support this should be converted to .match?() instead of =~f def validate_start_day(start_day, frequency) if start_day && frequency == :none raise ArgumentError, "`start_day` property is not supported with frequency: #{frequency}" @@ -221,7 +221,7 @@ class Chef end end - # @todo when we drop ruby 2.3 support this should be converted to .match?() instead of =~ + # @todo when we drop ruby 2.3 support this should be converted to .match?() instead of =~ def validate_start_time(start_time, frequency) if start_time raise ArgumentError, "`start_time` property is not supported with `frequency :none`" if frequency == :none @@ -321,7 +321,7 @@ class Chef end end - # This method returns true if day has values from 1-31 which is a days of moths and used with frequency :monthly + # This method returns true if day has values from 1-31 which is a days of moths and used with frequency :monthly def days_includes_days_of_months?(days) days.map! { |day| day.to_s.strip.downcase } (days - VALID_DAYS_OF_MONTH).empty? @@ -339,11 +339,11 @@ class Chef end end - # Converts the number of seconds to an ISO8601 duration format and returns it. - # Ref : https://github.com/arnau/ISO8601/blob/master/lib/iso8601/duration.rb#L18-L23 - # e.g. - # ISO8601::Duration.new(65707200).to_s - # returns 'PT65707200S' + # Converts the number of seconds to an ISO8601 duration format and returns it. + # Ref : https://github.com/arnau/ISO8601/blob/master/lib/iso8601/duration.rb#L18-L23 + # e.g. + # ISO8601::Duration.new(65707200).to_s + # returns 'PT65707200S' def sec_to_dur(seconds) ISO8601::Duration.new(seconds.to_i).to_s end diff --git a/lib/chef/util/dsc/lcm_output_parser.rb b/lib/chef/util/dsc/lcm_output_parser.rb index 2c052396e1..38c202a4bb 100644 --- a/lib/chef/util/dsc/lcm_output_parser.rb +++ b/lib/chef/util/dsc/lcm_output_parser.rb @@ -160,9 +160,9 @@ class Chef def self.parse_line(line) if match = line.match(/^.*?:.*?:\s*LCM:\s*\[(.*?)\](.*)/) - # If the line looks like - # What If: [machinename]: LCM: [op_action op_type] message - # extract op_action, op_type, and message + # If the line looks like + # What If: [machinename]: LCM: [op_action op_type] message + # extract op_action, op_type, and message operation, info = match.captures op_action, op_type = operation.strip.split(" ").map { |m| m.downcase.to_sym } else diff --git a/lib/chef/win32/api/file.rb b/lib/chef/win32/api/file.rb index 7aca1068e0..11a18e26d1 100644 --- a/lib/chef/win32/api/file.rb +++ b/lib/chef/win32/api/file.rb @@ -461,22 +461,22 @@ BOOL WINAPI DeviceIoControl( =end safe_attach_function :DeviceIoControl, %i{HANDLE DWORD LPVOID DWORD LPVOID DWORD LPDWORD pointer}, :BOOL -# BOOL WINAPI DeleteVolumeMountPoint( - # _In_ LPCTSTR lpszVolumeMountPoint -# ); + # BOOL WINAPI DeleteVolumeMountPoint( + # _In_ LPCTSTR lpszVolumeMountPoint + # ); safe_attach_function :DeleteVolumeMountPointW, [:LPCTSTR], :BOOL -# BOOL WINAPI SetVolumeMountPoint( - # _In_ LPCTSTR lpszVolumeMountPoint, - # _In_ LPCTSTR lpszVolumeName -# ); + # BOOL WINAPI SetVolumeMountPoint( + # _In_ LPCTSTR lpszVolumeMountPoint, + # _In_ LPCTSTR lpszVolumeName + # ); safe_attach_function :SetVolumeMountPointW, %i{LPCTSTR LPCTSTR}, :BOOL -# BOOL WINAPI GetVolumeNameForVolumeMountPoint( - # _In_ LPCTSTR lpszVolumeMountPoint, - # _Out_ LPTSTR lpszVolumeName, - # _In_ DWORD cchBufferLength -# ); + # BOOL WINAPI GetVolumeNameForVolumeMountPoint( + # _In_ LPCTSTR lpszVolumeMountPoint, + # _Out_ LPTSTR lpszVolumeName, + # _In_ DWORD cchBufferLength + # ); safe_attach_function :GetVolumeNameForVolumeMountPointW, %i{LPCTSTR LPTSTR DWORD}, :BOOL =begin @@ -538,12 +538,12 @@ BOOL WINAPI VerQueryValue( # ensures the handle is closed on exit of the block # FIXME: yard with @yield def file_search_handle(path) - # Workaround for CHEF-4419: - # Make sure paths starting with "/" has a drive letter - # assigned from the current working diretory. - # Note: With CHEF-4427 this issue will be fixed with a - # broader fix to map all the paths starting with "/" to - # SYSTEM_DRIVE on windows. + # Workaround for CHEF-4419: + # Make sure paths starting with "/" has a drive letter + # assigned from the current working diretory. + # Note: With CHEF-4427 this issue will be fixed with a + # broader fix to map all the paths starting with "/" to + # SYSTEM_DRIVE on windows. path = ::File.expand_path(path) if path.start_with? "/" path = canonical_encode_path(path) find_data = WIN32_FIND_DATA.new diff --git a/lib/chef/win32/file.rb b/lib/chef/win32/file.rb index 508ea3ae2a..44153e0992 100644 --- a/lib/chef/win32/file.rb +++ b/lib/chef/win32/file.rb @@ -171,7 +171,7 @@ class Chef rescue Chef::Exceptions::Win32APIFunctionNotImplemented => e raise e rescue Exception - # things are ok. + # things are ok. end def self.file_access_check(path, desired_access) diff --git a/lib/chef/win32/process.rb b/lib/chef/win32/process.rb index fa3286108c..17621f8518 100644 --- a/lib/chef/win32/process.rb +++ b/lib/chef/win32/process.rb @@ -82,8 +82,8 @@ class Chef (call_succeeded != 0) && (is_64_bit_process_result.get_int(0) != 0) end - # Must have PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION rights, - # AND the PROCESS_VM_READ right + # Must have PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION rights, + # AND the PROCESS_VM_READ right def self.get_process_memory_info(handle) memory_info = PROCESS_MEMORY_COUNTERS.new unless GetProcessMemoryInfo(handle.handle, memory_info, memory_info.size) diff --git a/omnibus/README.md b/omnibus/README.md index 66bdb55448..6e49f091a5 100644 --- a/omnibus/README.md +++ b/omnibus/README.md @@ -24,7 +24,7 @@ You create a platform-specific package using the `build project` command: $ bundle exec omnibus build <PROJECT> ``` -The platform/architecture type of the package created will match the platform where the `build project` command is invoked. For example, running this command on a MacBook Pro will generate a Mac OS X package. After the build completes packages will be available in the `pkg/` folder. +The platform/architecture type of the package created will match the platform where the `build project` command is invoked. For example, running this command on a MacBook Pro will generate a macOS package. After the build completes packages will be available in the `pkg/` folder. ### Clean diff --git a/omnibus/omnibus-test.ps1 b/omnibus/omnibus-test.ps1 index 5585a97638..d5fb9c7bcd 100644 --- a/omnibus/omnibus-test.ps1 +++ b/omnibus/omnibus-test.ps1 @@ -91,7 +91,7 @@ winrm quickconfig -quiet bundle If ($lastexitcode -ne 0) { Exit $lastexitcode } -# FIXME: we need to add back unit and integration tests here. we have no converage of those on e.g. AIX +# FIXME: we need to add back unit and integration tests here. we have no coverage of those on e.g. AIX # # chocolatey functional tests fail so disable that tag directly <-- and this is a bug that needs fixing. bundle exec rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation --tag ~choco_installed spec/functional diff --git a/omnibus/package-scripts/angrychef/postrm b/omnibus/package-scripts/angrychef/postrm index a153da7102..0963b1d901 100755 --- a/omnibus/package-scripts/angrychef/postrm +++ b/omnibus/package-scripts/angrychef/postrm @@ -45,6 +45,6 @@ if [ ! -f /etc/redhat-release -a ! -f /etc/fedora-release -a ! -f /etc/system-re # not a redhat-ish RPM-based system cleanup_symlinks elif [ "x$1" = "x0" ]; then - # RPM-based system and we're deinstalling rather than upgrading + # RPM-based system and we're uninstalling rather than upgrading cleanup_symlinks fi diff --git a/omnibus/package-scripts/chef/postrm b/omnibus/package-scripts/chef/postrm index a153da7102..0963b1d901 100755 --- a/omnibus/package-scripts/chef/postrm +++ b/omnibus/package-scripts/chef/postrm @@ -45,6 +45,6 @@ if [ ! -f /etc/redhat-release -a ! -f /etc/fedora-release -a ! -f /etc/system-re # not a redhat-ish RPM-based system cleanup_symlinks elif [ "x$1" = "x0" ]; then - # RPM-based system and we're deinstalling rather than upgrading + # RPM-based system and we're uninstalling rather than upgrading cleanup_symlinks fi diff --git a/spec/functional/resource/user/dscl_spec.rb b/spec/functional/resource/user/dscl_spec.rb index 6a18e0fd19..462e4aaa0b 100644 --- a/spec/functional/resource/user/dscl_spec.rb +++ b/spec/functional/resource/user/dscl_spec.rb @@ -29,7 +29,7 @@ describe "Chef::Resource::User with Chef::Provider::User::Dscl provider", metada def clean_user shell_out!("/usr/bin/dscl . -delete '/Users/#{username}'") rescue Mixlib::ShellOut::ShellCommandFailed - # Raised when the user is already cleaned + # Raised when the user is already cleaned end def user_should_exist diff --git a/spec/functional/resource/user/mac_user_spec.rb b/spec/functional/resource/user/mac_user_spec.rb index 2a2a4f4eac..f383140d0a 100644 --- a/spec/functional/resource/user/mac_user_spec.rb +++ b/spec/functional/resource/user/mac_user_spec.rb @@ -29,7 +29,7 @@ describe "Chef::Resource::User with Chef::Provider::User::MacUser provider", met def clean_user shell_out!("/usr/bin/dscl . -delete '/Users/#{username}'") rescue Mixlib::ShellOut::ShellCommandFailed - # Raised when the user is already cleaned + # Raised when the user is already cleaned end def ensure_file_cache_path_exists diff --git a/spec/support/shared/functional/file_resource.rb b/spec/support/shared/functional/file_resource.rb index ac37e2c735..7547d119bb 100644 --- a/spec/support/shared/functional/file_resource.rb +++ b/spec/support/shared/functional/file_resource.rb @@ -370,7 +370,7 @@ shared_examples_for "a configured file resource" do Chef::Config[:ssl_verify_mode] = :verify_none end - # note the stripping of the drive letter from the tmpdir on windows + # note the stripping of the drive letter from the tmpdir on windows let(:backup_glob) { File.join(CHEF_SPEC_BACKUP_PATH, test_file_dir.sub(/^([A-Za-z]:)/, ""), "#{file_base}*") } # Most tests update the resource, but a few do not. We need to test that the diff --git a/spec/unit/knife/role_env_run_list_add_spec.rb b/spec/unit/knife/role_env_run_list_add_spec.rb index 3696134dd3..13a05db33e 100644 --- a/spec/unit/knife/role_env_run_list_add_spec.rb +++ b/spec/unit/knife/role_env_run_list_add_spec.rb @@ -21,8 +21,8 @@ require "spec_helper" describe Chef::Knife::RoleEnvRunListAdd do before(:each) do -# Chef::Config[:role_name] = "websimian" -# Chef::Config[:env_name] = "QA" + # Chef::Config[:role_name] = "websimian" + # Chef::Config[:env_name] = "QA" @knife = Chef::Knife::RoleEnvRunListAdd.new @knife.config = { after: nil, @@ -36,10 +36,10 @@ describe Chef::Knife::RoleEnvRunListAdd do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should have an empty default run list" do @knife.run diff --git a/spec/unit/knife/role_env_run_list_clear_spec.rb b/spec/unit/knife/role_env_run_list_clear_spec.rb index cc608c918b..d4b9625550 100644 --- a/spec/unit/knife/role_env_run_list_clear_spec.rb +++ b/spec/unit/knife/role_env_run_list_clear_spec.rb @@ -44,10 +44,10 @@ describe Chef::Knife::RoleEnvRunListClear do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_env_run_list_remove_spec.rb b/spec/unit/knife/role_env_run_list_remove_spec.rb index 9bade8fac4..7f9b41475c 100644 --- a/spec/unit/knife/role_env_run_list_remove_spec.rb +++ b/spec/unit/knife/role_env_run_list_remove_spec.rb @@ -44,10 +44,10 @@ describe Chef::Knife::RoleEnvRunListRemove do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_env_run_list_replace_spec.rb b/spec/unit/knife/role_env_run_list_replace_spec.rb index 5a3365a686..93b233efdc 100644 --- a/spec/unit/knife/role_env_run_list_replace_spec.rb +++ b/spec/unit/knife/role_env_run_list_replace_spec.rb @@ -44,10 +44,10 @@ describe Chef::Knife::RoleEnvRunListReplace do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_env_run_list_set_spec.rb b/spec/unit/knife/role_env_run_list_set_spec.rb index 52ef1010b7..d35e4dbb17 100644 --- a/spec/unit/knife/role_env_run_list_set_spec.rb +++ b/spec/unit/knife/role_env_run_list_set_spec.rb @@ -44,10 +44,10 @@ describe Chef::Knife::RoleEnvRunListSet do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_run_list_add_spec.rb b/spec/unit/knife/role_run_list_add_spec.rb index 74235a019c..6f222ee80a 100644 --- a/spec/unit/knife/role_run_list_add_spec.rb +++ b/spec/unit/knife/role_run_list_add_spec.rb @@ -21,8 +21,8 @@ require "spec_helper" describe Chef::Knife::RoleRunListAdd do before(:each) do -# Chef::Config[:role_name] = "websimian" -# Chef::Config[:env_name] = "QA" + # Chef::Config[:role_name] = "websimian" + # Chef::Config[:env_name] = "QA" @knife = Chef::Knife::RoleRunListAdd.new @knife.config = { after: nil, @@ -36,10 +36,10 @@ describe Chef::Knife::RoleRunListAdd do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should have a run list with the monkey role" do @knife.run diff --git a/spec/unit/knife/role_run_list_clear_spec.rb b/spec/unit/knife/role_run_list_clear_spec.rb index 58730d42d5..327a9979b0 100644 --- a/spec/unit/knife/role_run_list_clear_spec.rb +++ b/spec/unit/knife/role_run_list_clear_spec.rb @@ -43,10 +43,10 @@ describe Chef::Knife::RoleRunListClear do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_run_list_remove_spec.rb b/spec/unit/knife/role_run_list_remove_spec.rb index e1786d7bb6..200a559c08 100644 --- a/spec/unit/knife/role_run_list_remove_spec.rb +++ b/spec/unit/knife/role_run_list_remove_spec.rb @@ -43,10 +43,10 @@ describe Chef::Knife::RoleRunListRemove do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_run_list_replace_spec.rb b/spec/unit/knife/role_run_list_replace_spec.rb index 6335f75a16..1957403fb1 100644 --- a/spec/unit/knife/role_run_list_replace_spec.rb +++ b/spec/unit/knife/role_run_list_replace_spec.rb @@ -43,10 +43,10 @@ describe Chef::Knife::RoleRunListReplace do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_run_list_set_spec.rb b/spec/unit/knife/role_run_list_set_spec.rb index 7733174870..06098c585e 100644 --- a/spec/unit/knife/role_run_list_set_spec.rb +++ b/spec/unit/knife/role_run_list_set_spec.rb @@ -43,10 +43,10 @@ describe Chef::Knife::RoleRunListSet do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/provider/git_spec.rb b/spec/unit/provider/git_spec.rb index 90364cfc2a..65289bf4c5 100644 --- a/spec/unit/provider/git_spec.rb +++ b/spec/unit/provider/git_spec.rb @@ -638,7 +638,7 @@ describe Chef::Provider::Git do expect(@provider).to receive(:enable_submodules) expect(@provider).to receive(:add_remotes) @provider.run_action(:checkout) - # @resource.should be_updated + # @resource.should be_updated end it "should not checkout if the destination exists or is a non empty directory" do @@ -676,7 +676,7 @@ describe Chef::Provider::Git do expect(@provider).to receive(:enable_submodules) expect(@provider).to receive(:add_remotes) @provider.run_action(:sync) - # @resource.should be_updated + # @resource.should be_updated end it "does not fetch any updates if the remote revision matches the current revision" do @@ -696,7 +696,7 @@ describe Chef::Provider::Git do expect(@provider).to receive(:action_checkout) expect(@provider).not_to receive(:shell_out!) @provider.run_action(:sync) - # @resource.should be_updated + # @resource.should be_updated end it "clones the repo instead of fetching updates if the deploy directory is empty" do diff --git a/spec/unit/provider/osx_profile_spec.rb b/spec/unit/provider/osx_profile_spec.rb index 017041bc60..9554f235f3 100644 --- a/spec/unit/provider/osx_profile_spec.rb +++ b/spec/unit/provider/osx_profile_spec.rb @@ -61,8 +61,8 @@ describe Chef::Provider::OsxProfile do "ProfileVersion" => 1 }], } end - # If anything is changed within this profile, be sure to update the - # ProfileUUID in all_profiles to match the new config specific UUID + # If anything is changed within this profile, be sure to update the + # ProfileUUID in all_profiles to match the new config specific UUID let(:test_profile) do { "PayloadIdentifier" => "com.testprofile.screensaver", diff --git a/spec/unit/provider/package/msu_spec.rb b/spec/unit/provider/package/msu_spec.rb index f71bd9a775..897ae254f0 100644 --- a/spec/unit/provider/package/msu_spec.rb +++ b/spec/unit/provider/package/msu_spec.rb @@ -261,9 +261,9 @@ describe Chef::Provider::Package::Msu, :windows_only do expect(cab_files).to eql(["msu_dir/IE10-Windows6.1-KB2859903-x86.CAB"]) end -# We couldn't find any msu file with multiple cab files in it. -# So we are not 100% sure about the structure of XML file in this case -# The specs below cover 2 possible XML formats + # We couldn't find any msu file with multiple cab files in it. + # So we are not 100% sure about the structure of XML file in this case + # The specs below cover 2 possible XML formats context "handles different xml formats for multiple cab files in the msu package" do it "parses xml file with multiple <package> tags" do xml_file = File.join(CHEF_SPEC_DATA, "sample_msu2.xml") diff --git a/spec/unit/provider/service/gentoo_service_spec.rb b/spec/unit/provider/service/gentoo_service_spec.rb index f9da2a828c..99c01b595b 100644 --- a/spec/unit/provider/service/gentoo_service_spec.rb +++ b/spec/unit/provider/service/gentoo_service_spec.rb @@ -37,7 +37,7 @@ describe Chef::Provider::Service::Gentoo do allow(File).to receive(:exists?).with("/etc/runlevels/default/chef").and_return(false) allow(File).to receive(:readable?).with("/etc/runlevels/default/chef").and_return(false) end - # new test: found_enabled state + # new test: found_enabled state # describe "load_current_resource" do it "should raise Chef::Exceptions::Service if /sbin/rc-update does not exist" do diff --git a/spec/unit/provider_resolver_spec.rb b/spec/unit/provider_resolver_spec.rb index e7ff875f5d..69068edae9 100644 --- a/spec/unit/provider_resolver_spec.rb +++ b/spec/unit/provider_resolver_spec.rb @@ -593,14 +593,14 @@ describe Chef::ProviderResolver do "debian" => { ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig::Debian ], package: [ Chef::Resource::AptPackage, Chef::Provider::Package::Apt ], - # service: [ Chef::Resource::DebianService, Chef::Provider::Service::Debian ], + # service: [ Chef::Resource::DebianService, Chef::Provider::Service::Debian ], "debian" => { "7.0" => { }, "6.0" => { ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ], - # service: [ Chef::Resource::InsservService, Chef::Provider::Service::Insserv ], + # service: [ Chef::Resource::InsservService, Chef::Provider::Service::Insserv ], }, "5.0" => { ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ], @@ -619,7 +619,7 @@ describe Chef::ProviderResolver do "linuxmint" => { "3.1.4" => { ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ], - # service: [ Chef::Resource::UpstartService, Chef::Provider::Service::Upstart ], + # service: [ Chef::Resource::UpstartService, Chef::Provider::Service::Upstart ], }, }, "raspbian" => { @@ -667,7 +667,7 @@ describe Chef::ProviderResolver do # TODO should be Chef::Resource::PortagePackage package: [ Chef::Resource::Package, Chef::Provider::Package::Portage ], portage_package: [ Chef::Resource::PortagePackage, Chef::Provider::Package::Portage ], - # service: [ Chef::Resource::GentooService, Chef::Provider::Service::Gentoo ], + # service: [ Chef::Resource::GentooService, Chef::Provider::Service::Gentoo ], "gentoo" => { "3.1.4" => { @@ -676,14 +676,14 @@ describe Chef::ProviderResolver do }, "rhel" => { - # service: [ Chef::Resource::SystemdService, Chef::Provider::Service::Systemd ], + # service: [ Chef::Resource::SystemdService, Chef::Provider::Service::Systemd ], package: [ Chef::Resource::DnfPackage, Chef::Provider::Package::Dnf ], ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig::Redhat ], %w{amazon xcp xenserver ibm_powerkvm cloudlinux parallels} => { "3.1.4" => { package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ], - # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ], + # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ], }, }, %w{redhat centos scientific oracle} => { @@ -692,14 +692,14 @@ describe Chef::ProviderResolver do }, "6.0" => { package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ], - # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ], + # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ], }, }, "fedora" => { "15.0" => { }, "14.0" => { - # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ], + # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ], }, }, }, @@ -761,7 +761,7 @@ describe Chef::ProviderResolver do package: [ Chef::Resource::Package, Chef::Provider::Package::Bff ], rpm_package: [ Chef::Resource::RpmPackage, Chef::Provider::Package::Rpm ], user: [ Chef::Resource::User::AixUser, Chef::Provider::User::Aix ], - # service: [ Chef::Resource::AixService, Chef::Provider::Service::Aix ], + # service: [ Chef::Resource::AixService, Chef::Provider::Service::Aix ], "aix" => { "aix" => { diff --git a/spec/unit/run_context_spec.rb b/spec/unit/run_context_spec.rb index 6ccd5d0187..5bd7a360fb 100644 --- a/spec/unit/run_context_spec.rb +++ b/spec/unit/run_context_spec.rb @@ -138,7 +138,7 @@ describe Chef::RunContext do expect(node).to receive(:loaded_recipe).with(:ancient, "aliens") expect do run_context.include_recipe("ancient::aliens") - # In CHEF-5120, this becomes a Chef::Exceptions::MissingCookbookDependency error: + # In CHEF-5120, this becomes a Chef::Exceptions::MissingCookbookDependency error: end.to raise_error(Chef::Exceptions::CookbookNotFound) end |