diff options
author | Theodore Nordsieck <theo@opscode.com> | 2013-09-16 19:20:25 -0700 |
---|---|---|
committer | Theodore Nordsieck <theo@opscode.com> | 2013-09-17 15:33:08 -0700 |
commit | df0d519a0f9f59d364eb3ecf52310def3dee73da (patch) | |
tree | 555c36f0da52d5a33cdb58c5eea7af151d7df386 /lib/ohai/plugins | |
parent | fd2c5ead4f645016888d328b99152f8f1e3d3d75 (diff) | |
download | ohai-df0d519a0f9f59d364eb3ecf52310def3dee73da.tar.gz |
Fix windows line termination issues.
Diffstat (limited to 'lib/ohai/plugins')
-rw-r--r-- | lib/ohai/plugins/java.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/linux/kernel.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/perl.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/ohai/plugins/java.rb b/lib/ohai/plugins/java.rb index fcc27bfa..6a620a80 100644 --- a/lib/ohai/plugins/java.rb +++ b/lib/ohai/plugins/java.rb @@ -34,7 +34,7 @@ Ohai.plugin do end if so.exitstatus == 0 - so.stderr.lines do |line| + so.stderr.split(/\r?\n/).each do |line| case line when /java version \"([0-9\.\_]+)\"/ java[:version] = $1 diff --git a/lib/ohai/plugins/linux/kernel.rb b/lib/ohai/plugins/linux/kernel.rb index 47a83569..c2dd3e45 100644 --- a/lib/ohai/plugins/linux/kernel.rb +++ b/lib/ohai/plugins/linux/kernel.rb @@ -21,7 +21,7 @@ Ohai.plugin do collect_data do so = shell_out("uname -o") - kernel[:os] = so.stdout.split($/)[0] + kernel[:os] = so.stdout.split(/\r?\n/)[0] kext = Mash.new so = shell_out("env lsmod") diff --git a/lib/ohai/plugins/perl.rb b/lib/ohai/plugins/perl.rb index 64ccac4a..3b4b3282 100644 --- a/lib/ohai/plugins/perl.rb +++ b/lib/ohai/plugins/perl.rb @@ -27,7 +27,7 @@ Ohai.plugin do perl = Mash.new so = shell_out("perl -V:version -V:archname") if so.exitstatus == 0 - so.stdout.lines do |line| + so.stdout.split(/\r?\n/).each do |line| case line when /^version=\'(.+)\';$/ perl[:version] = $1 |