diff options
author | Tim Smith <tsmith@chef.io> | 2021-10-25 07:46:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 07:46:37 -0700 |
commit | 856afc0f772284612ed2b523405a4dffeb1ec260 (patch) | |
tree | 5f4c23b4e7b1afd92a726fba0e5cd4cfafa31fbf | |
parent | 4b7264721a79c4372f42e164487deaa931ccb797 (diff) | |
parent | 74115ca104e9908ab2b7b0824753bb618c1c57fa (diff) | |
download | ohai-856afc0f772284612ed2b523405a4dffeb1ec260.tar.gz |
Merge pull request #1702 from chef/dependabot/bundler/chefstyle-2.1.1
Update chefstyle requirement from 2.1.0 to 2.1.1
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/azure.rb | 2 | ||||
-rw-r--r-- | spec/unit/plugins/azure_spec.rb | 10 |
3 files changed, 7 insertions, 7 deletions
@@ -9,7 +9,7 @@ gem "chef-utils", git: "https://github.com/chef/chef", branch: "main", glob: "ch # NOTE: do not submit PRs to add pry as a dep, add to your Gemfile.local group :development do - gem "chefstyle", "2.1.0" + gem "chefstyle", "2.1.1" gem "ipaddr_extensions" gem "rake", ">= 10.1.0" gem "rspec-collection_matchers", "~> 1.0" diff --git a/lib/ohai/plugins/azure.rb b/lib/ohai/plugins/azure.rb index f8224666..c21b8ac7 100644 --- a/lib/ohai/plugins/azure.rb +++ b/lib/ohai/plugins/azure.rb @@ -48,7 +48,7 @@ Ohai.plugin(:Azure) do # check for either the waagent or the unknown-245 DHCP option that Azure uses # http://blog.mszcool.com/index.php/2015/04/detecting-if-a-virtual-machine-runs-in-microsoft-azure-linux-windows-to-protect-your-software-when-distributed-via-the-azure-marketplace/ def has_waagent? - if file_exist?("/usr/sbin/waagent") || dir_exist?('C:\WindowsAzure') + if file_exist?("/usr/sbin/waagent") || dir_exist?("C:\\WindowsAzure") logger.trace("Plugin Azure: Found waagent used by Azure.") true end diff --git a/spec/unit/plugins/azure_spec.rb b/spec/unit/plugins/azure_spec.rb index 1ddfe3d1..4d875e80 100644 --- a/spec/unit/plugins/azure_spec.rb +++ b/spec/unit/plugins/azure_spec.rb @@ -135,7 +135,7 @@ describe Ohai::System, "plugin azure" do before do allow(plugin).to receive(:hint?).with("azure").and_return(false) allow(plugin).to receive(:file_exist?).with("/usr/sbin/waagent").and_return(false) - allow(plugin).to receive(:dir_exist?).with('C:\WindowsAzure').and_return(false) + allow(plugin).to receive(:dir_exist?).with("C:\\WindowsAzure").and_return(false) allow(plugin).to receive(:file_exist?).with("/var/lib/dhcp/dhclient.eth0.leases").and_return(true) @double_file = double("/var/lib/dhcp/dhclient.eth0.leases") allow(@double_file).to receive(:each) @@ -169,7 +169,7 @@ describe Ohai::System, "plugin azure" do allow(plugin).to receive(:hint?).with("rackspace").and_return(true) allow(plugin).to receive(:hint?).with("azure").and_return(false) allow(plugin).to receive(:file_exist?).with("/usr/sbin/waagent").and_return(false) - allow(plugin).to receive(:dir_exist?).with('C:\WindowsAzure').and_return(false) + allow(plugin).to receive(:dir_exist?).with("C:\\WindowsAzure").and_return(false) allow(plugin).to receive(:file_exist?).with("/var/lib/dhcp/dhclient.eth0.leases").and_return(false) end @@ -180,7 +180,7 @@ describe Ohai::System, "plugin azure" do before do allow(plugin).to receive(:hint?).with("azure").and_return(false) allow(plugin).to receive(:file_exist?).with("/usr/sbin/waagent").and_return(true) - allow(plugin).to receive(:dir_exist?).with('C:\WindowsAzure').and_return(false) + allow(plugin).to receive(:dir_exist?).with("C:\\WindowsAzure").and_return(false) end it_behaves_like "azure" @@ -190,7 +190,7 @@ describe Ohai::System, "plugin azure" do before do allow(plugin).to receive(:hint?).with("azure").and_return(false) allow(plugin).to receive(:file_exist?).with("/usr/sbin/waagent").and_return(false) - allow(plugin).to receive(:dir_exist?).with('C:\WindowsAzure').and_return(true) + allow(plugin).to receive(:dir_exist?).with("C:\\WindowsAzure").and_return(true) end it_behaves_like "azure" @@ -200,7 +200,7 @@ describe Ohai::System, "plugin azure" do before do allow(plugin).to receive(:hint?).with("azure").and_return(false) allow(plugin).to receive(:file_exist?).with("/usr/sbin/waagent").and_return(false) - allow(plugin).to receive(:dir_exist?).with('C:\WindowsAzure').and_return(false) + allow(plugin).to receive(:dir_exist?).with("C:\\WindowsAzure").and_return(false) allow(plugin).to receive(:file_exist?).with("/var/lib/dhcp/dhclient.eth0.leases").and_return(true) @double_file = double("/var/lib/dhcp/dhclient.eth0.leases") allow(@double_file).to receive(:each) |