summaryrefslogtreecommitdiff
path: root/chef-config
diff options
context:
space:
mode:
Diffstat (limited to 'chef-config')
-rw-r--r--chef-config/lib/chef-config/config.rb2
-rw-r--r--chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb2
-rw-r--r--chef-config/spec/unit/config_spec.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb
index 2348f0677f..88ce6216c4 100644
--- a/chef-config/lib/chef-config/config.rb
+++ b/chef-config/lib/chef-config/config.rb
@@ -1073,7 +1073,7 @@ module ChefConfig
# Check if the proxy string contains a scheme. If not, add the url's scheme to the
# proxy before parsing. The regex /^.*:\/\// matches, for example, http://. Reusing proxy
# here since we are really just trying to get the string built correctly.
- proxy = if !proxy_env_var.empty?
+ proxy = unless proxy_env_var.empty?
if proxy_env_var =~ /^.*:\/\//
URI.parse(proxy_env_var)
else
diff --git a/chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb b/chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb
index ca1bdb4c0b..b7a8a178ea 100644
--- a/chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb
+++ b/chef-config/lib/chef-config/mixin/fuzzy_hostname_matcher.rb
@@ -32,7 +32,7 @@ module ChefConfig
def fuzzy_hostname_match?(hostname, match)
# Do greedy matching by adding wildcard if it is not specified
- match = "*" + match if !match.start_with?("*")
+ match = "*" + match unless match.start_with?("*")
Fuzzyurl.matches?(Fuzzyurl.mask(hostname: match), hostname)
end
diff --git a/chef-config/spec/unit/config_spec.rb b/chef-config/spec/unit/config_spec.rb
index 378cc4a4a1..ed52c5606e 100644
--- a/chef-config/spec/unit/config_spec.rb
+++ b/chef-config/spec/unit/config_spec.rb
@@ -618,7 +618,7 @@ RSpec.describe ChefConfig::Config do
# On Windows, we'll detect an omnibus build and set this to the
# cacert.pem included in the package, but it's nil if you're on Windows
# w/o omnibus (e.g., doing development on Windows, custom build, etc.)
- if !is_windows
+ unless is_windows
it "ChefConfig::Config[:ssl_ca_file] defaults to nil" do
expect(ChefConfig::Config[:ssl_ca_file]).to be_nil
end