diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2020-05-12 09:06:31 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2020-05-12 09:06:31 -0700 |
commit | 154c5c32cae6967693df5db4de944179300374aa (patch) | |
tree | 662c1bcad2ae90f756ad3dbfebcbb4b64a59e4d7 | |
parent | b9d3ce33cb286266c3469e84dce05c3be32b74a3 (diff) | |
download | ohai-154c5c32cae6967693df5db4de944179300374aa.tar.gz |
fix unrelated chefstyle issues
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/ohai/plugins/cpu.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/virtualbox.rb | 4 | ||||
-rw-r--r-- | spec/unit/plugins/abort_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/plugins/fail_spec.rb | 12 | ||||
-rw-r--r-- | spec/unit/plugins/linux/cpu_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/plugins/linux/network_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/plugins/solaris2/hostname_spec.rb | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/lib/ohai/plugins/cpu.rb b/lib/ohai/plugins/cpu.rb index 5375c726..eb7ea232 100644 --- a/lib/ohai/plugins/cpu.rb +++ b/lib/ohai/plugins/cpu.rb @@ -364,7 +364,7 @@ Ohai.plugin(:CPU) do cpu["cpustates"][value] += 1 when /core_id/ cpu[instance]["core_id"] = value - # Detect hyperthreading/multithreading + # Detect hyperthreading/multithreading cpucores.push(value) if cpucores.index(value).nil? when /family|fpu_type|model|stepping|vendor_id/ cpu[instance][key] = value diff --git a/lib/ohai/plugins/virtualbox.rb b/lib/ohai/plugins/virtualbox.rb index b2549f99..c3277d4c 100644 --- a/lib/ohai/plugins/virtualbox.rb +++ b/lib/ohai/plugins/virtualbox.rb @@ -93,8 +93,8 @@ Ohai.plugin(:Virtualbox) do so_cmd = "VBoxManage list --sorted #{query_type}" logger.trace(so_cmd) so = shell_out(so_cmd) - # raise an exception if the command fails - # so.error! + # raise an exception if the command fails + # so.error! if so.exitstatus == 0 # break the result into paragraph blocks, on successive newlines diff --git a/spec/unit/plugins/abort_spec.rb b/spec/unit/plugins/abort_spec.rb index 68531eb1..447427ed 100644 --- a/spec/unit/plugins/abort_spec.rb +++ b/spec/unit/plugins/abort_spec.rb @@ -34,7 +34,7 @@ describe "a plug-in that aborts execution" do Dir.mkdir("#{tmp}/plugins") rescue Errno::EEXIST - # ignore + # ignore end @@ -52,7 +52,7 @@ describe "a plug-in that aborts execution" do Dir.delete("#{tmp}/plugins") rescue - # ignore + # ignore end diff --git a/spec/unit/plugins/fail_spec.rb b/spec/unit/plugins/fail_spec.rb index 35a0643a..1fa252d1 100644 --- a/spec/unit/plugins/fail_spec.rb +++ b/spec/unit/plugins/fail_spec.rb @@ -26,7 +26,7 @@ shared_examples "a v7 loading failure" do Dir.mkdir("#{tmp}/plugins") rescue Errno::EEXIST - # ignore + # ignore end @@ -44,7 +44,7 @@ shared_examples "a v7 loading failure" do Dir.delete("#{tmp}/plugins") rescue - # ignore + # ignore end @@ -70,7 +70,7 @@ shared_examples "a v7 loading success" do Dir.mkdir("#{tmp}/plugins") rescue Errno::EEXIST - # ignore + # ignore end @@ -88,7 +88,7 @@ shared_examples "a v7 loading success" do Dir.delete("#{tmp}/plugins") rescue - # ignore + # ignore end @@ -113,7 +113,7 @@ shared_examples "a v7 run failure" do Dir.mkdir("#{tmp}/plugins") rescue Errno::EEXIST - # ignore + # ignore end @@ -131,7 +131,7 @@ shared_examples "a v7 run failure" do Dir.delete("#{tmp}/plugins") rescue - # ignore + # ignore end diff --git a/spec/unit/plugins/linux/cpu_spec.rb b/spec/unit/plugins/linux/cpu_spec.rb index 38de38a3..479c9083 100644 --- a/spec/unit/plugins/linux/cpu_spec.rb +++ b/spec/unit/plugins/linux/cpu_spec.rb @@ -96,7 +96,7 @@ describe Ohai::System, "General Linux cpu plugin" do tempfile.close tempfile.unlink rescue - # really do not care + # really do not care end diff --git a/spec/unit/plugins/linux/network_spec.rb b/spec/unit/plugins/linux/network_spec.rb index 4e6974e4..8aa11336 100644 --- a/spec/unit/plugins/linux/network_spec.rb +++ b/spec/unit/plugins/linux/network_spec.rb @@ -142,8 +142,8 @@ describe Ohai::System, "Linux Network Plugin" do collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:140 (140.0 B) EOM -# Note that ifconfig shows foo:veth0@eth0 but fails to show any address information. -# This was not a mistake collecting the output and Apparently ifconfig is broken in this regard. + # Note that ifconfig shows foo:veth0@eth0 but fails to show any address information. + # This was not a mistake collecting the output and Apparently ifconfig is broken in this regard. end let(:linux_ip_route) do diff --git a/spec/unit/plugins/solaris2/hostname_spec.rb b/spec/unit/plugins/solaris2/hostname_spec.rb index a8db9478..390b5e45 100644 --- a/spec/unit/plugins/solaris2/hostname_spec.rb +++ b/spec/unit/plugins/solaris2/hostname_spec.rb @@ -24,7 +24,7 @@ describe Ohai::System, "Solaris2.X hostname plugin" do allow(@plugin).to receive(:collect_os).and_return(:solaris2) allow(@plugin).to receive(:resolve_fqdn).and_return("kitteh.inurfridge.eatinurfoodz") allow(@plugin).to receive(:shell_out).with("hostname").and_return(mock_shell_out(0, "kitteh\n", "")) -# Socket.stub(:getaddrinfo).and_return( [["AF_INET", 0, "kitteh.inurfridge.eatinurfoodz", "10.1.2.3", 2, 0, 0]] ); + # Socket.stub(:getaddrinfo).and_return( [["AF_INET", 0, "kitteh.inurfridge.eatinurfoodz", "10.1.2.3", 2, 0, 0]] ); end it_should_check_from("solaris2::hostname", "hostname", "hostname", "kitteh") |