summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkgibbons <mark.gibbons@nordstrom.com>2016-08-16 14:10:44 -0700
committermarkgibbons <mark.gibbons@nordstrom.com>2016-08-16 14:10:44 -0700
commit806a56de6ae5fe956508ad6bfc90cb6f39cb1807 (patch)
treec42958c1f4ece2267f4832350855ed2718ddd06f
parent9cbd80dff6009730c4d714ce0f77353a797ff292 (diff)
downloadohai-806a56de6ae5fe956508ad6bfc90cb6f39cb1807.tar.gz
Style fixes
-rw-r--r--lib/ohai/plugins/kernel.rb2
-rw-r--r--spec/unit/plugins/solaris2/kernel_spec.rb12
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/ohai/plugins/kernel.rb b/lib/ohai/plugins/kernel.rb
index b3a67fdc..5002d266 100644
--- a/lib/ohai/plugins/kernel.rb
+++ b/lib/ohai/plugins/kernel.rb
@@ -151,7 +151,7 @@ Ohai.plugin(:Kernel) do
so = shell_out("uname -s")
kernel[:os] = so.stdout.split($/)[0]
- so = File.open('/etc/release') { |file| file.gets }
+ so = File.open("/etc/release") { |file| file.gets }
md = /(?<update>\d.*\d)/.match(so)
kernel[:update] = md[:update] if md
diff --git a/spec/unit/plugins/solaris2/kernel_spec.rb b/spec/unit/plugins/solaris2/kernel_spec.rb
index bddaf7bb..b90ec990 100644
--- a/spec/unit/plugins/solaris2/kernel_spec.rb
+++ b/spec/unit/plugins/solaris2/kernel_spec.rb
@@ -147,22 +147,22 @@ describe Ohai::System, "Solaris2.X kernel plugin" do
@release = StringIO.new(" Solaris 10 10/08 s10s_u6wos_07b SPARC\n Use is subject to license terms.\n Assembled 27 October 2008")
allow(File).to receive(:open).with("/etc/release").and_yield(@release)
@plugin.run
- expect(@plugin[:kernel][:update]).to eq('10 10/08 s10s_u6wos_07')
- end
+ expect(@plugin[:kernel][:update]).to eq("10 10/08 s10s_u6wos_07")
+ end
it "should give the Oracle Solaris update version informtion" do
@release = StringIO.new(" Oracle Solaris 10 1/13 s10s_u11wos_24a SPARC\n Assembled 17 January 2013")
allow(File).to receive(:open).with("/etc/release").and_yield(@release)
@plugin.run
- expect(@plugin[:kernel][:update]).to eq('10 1/13 s10s_u11wos_24')
- end
+ expect(@plugin[:kernel][:update]).to eq("10 1/13 s10s_u11wos_24")
+ end
it "should give the Solaris 11 update version informtion" do
@release = StringIO.new(" Oracle Solaris 11.3 SPARC\n Assembled 25 July 2016")
allow(File).to receive(:open).with("/etc/release").and_yield(@release)
@plugin.run
- expect(@plugin[:kernel][:update]).to eq('11.3')
- end
+ expect(@plugin[:kernel][:update]).to eq("11.3")
+ end
it_should_check_from_deep_mash("solaris2::kernel", "kernel", "os", "uname -s", [0, "SunOS\n", ""])