diff options
Diffstat (limited to 'lib/chef/resource')
-rw-r--r-- | lib/chef/resource/dnf_package.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/dsc_resource.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/file.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/resource_notification.rb | 4 | ||||
-rw-r--r-- | lib/chef/resource/windows_script.rb | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/resource/dnf_package.rb b/lib/chef/resource/dnf_package.rb index 52c739beb9..c90e135335 100644 --- a/lib/chef/resource/dnf_package.rb +++ b/lib/chef/resource/dnf_package.rb @@ -70,7 +70,7 @@ class Chef } def allow_downgrade(arg = nil) - if !arg.nil? + unless arg.nil? Chef.deprecated(:dnf_package_allow_downgrade, "the allow_downgrade property on the dnf_package provider is not used, DNF supports downgrades by default.") end false diff --git a/lib/chef/resource/dsc_resource.rb b/lib/chef/resource/dsc_resource.rb index 3ccc30f0fb..c2965944ec 100644 --- a/lib/chef/resource/dsc_resource.rb +++ b/lib/chef/resource/dsc_resource.rb @@ -77,7 +77,7 @@ class Chef description: "The version number of the module to use. PowerShell 5.0.10018.0 (or higher) supports having multiple versions of a module installed. This should be specified along with the module_name." def property(property_name, value = nil) - if not property_name.is_a?(Symbol) + unless property_name.is_a?(Symbol) raise TypeError, "A property name of type Symbol must be specified, '#{property_name}' of type #{property_name.class} was given" end diff --git a/lib/chef/resource/file.rb b/lib/chef/resource/file.rb index 47fd9cada7..8cfbe47358 100644 --- a/lib/chef/resource/file.rb +++ b/lib/chef/resource/file.rb @@ -78,7 +78,7 @@ class Chef property :verifications, Array, default: lazy { [] } def verify(command = nil, opts = {}, &block) - if ! (command.nil? || [String, Symbol].include?(command.class)) + unless command.nil? || [String, Symbol].include?(command.class) raise ArgumentError, "verify requires either a string, symbol, or a block" end diff --git a/lib/chef/resource/resource_notification.rb b/lib/chef/resource/resource_notification.rb index 4bcadca60a..f9cad8232f 100644 --- a/lib/chef/resource/resource_notification.rb +++ b/lib/chef/resource/resource_notification.rb @@ -55,11 +55,11 @@ class Chef def resolve_resource_reference(resource_collection) return resource if resource.kind_of?(Chef::Resource) && notifying_resource.kind_of?(Chef::Resource) - if not(resource.kind_of?(Chef::Resource)) + unless resource.kind_of?(Chef::Resource) fix_resource_reference(resource_collection) end - if not(notifying_resource.kind_of?(Chef::Resource)) + unless notifying_resource.kind_of?(Chef::Resource) fix_notifier_reference(resource_collection) end end diff --git a/lib/chef/resource/windows_script.rb b/lib/chef/resource/windows_script.rb index 3177a32090..c542fbd81b 100644 --- a/lib/chef/resource/windows_script.rb +++ b/lib/chef/resource/windows_script.rb @@ -41,7 +41,7 @@ class Chef public def architecture(arg = nil) - assert_architecture_compatible!(arg) if ! arg.nil? + assert_architecture_compatible!(arg) unless arg.nil? result = set_or_return( :architecture, arg, |