diff options
author | danielsdeleo <dan@opscode.com> | 2012-10-24 10:47:35 -0700 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-07-15 11:59:23 -0700 |
commit | 125656b669dfad4f1515a9715f86b94bf243c2fb (patch) | |
tree | ee34329435af27494e12bea4e94fbbaf43e6b9d1 | |
parent | 0968882b5542da094df29a7fb8b42cbabcdcd008 (diff) | |
download | ohai-125656b669dfad4f1515a9715f86b94bf243c2fb.tar.gz |
[OHAI-412] fix uptime plugins for seconds_to_human change
Previously there was a _seconds_to_human method defined by the top level
uptime plugin, but this was moved to a mixin and the leading underscore
removed from the method name.
-rw-r--r-- | lib/ohai/plugins/darwin/uptime.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/freebsd/uptime.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/netbsd/uptime.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/openbsd/uptime.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/sigar/uptime.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/solaris2/uptime.rb | 2 | ||||
-rw-r--r-- | lib/ohai/plugins/windows/uptime.rb | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/lib/ohai/plugins/darwin/uptime.rb b/lib/ohai/plugins/darwin/uptime.rb index d9cf01f5..ea258ec4 100644 --- a/lib/ohai/plugins/darwin/uptime.rb +++ b/lib/ohai/plugins/darwin/uptime.rb @@ -25,7 +25,7 @@ popen4("/usr/sbin/sysctl kern.boottime") do |pid, stdin, stdout, stderr| stdout.each do |line| if line =~ /kern.boottime:\D+(\d+)/ uptime_seconds Time.new.to_i - $1.to_i - uptime self._seconds_to_human(uptime_seconds) + uptime seconds_to_human(uptime_seconds) end end end diff --git a/lib/ohai/plugins/freebsd/uptime.rb b/lib/ohai/plugins/freebsd/uptime.rb index 7d0da153..ea49fa09 100644 --- a/lib/ohai/plugins/freebsd/uptime.rb +++ b/lib/ohai/plugins/freebsd/uptime.rb @@ -25,7 +25,7 @@ popen4("/sbin/sysctl kern.boottime") do |pid, stdin, stdout, stderr| stdout.each do |line| if line =~ /kern.boottime:\D+(\d+)/ uptime_seconds Time.new.to_i - $1.to_i - uptime self._seconds_to_human(uptime_seconds) + uptime seconds_to_human(uptime_seconds) end end end diff --git a/lib/ohai/plugins/netbsd/uptime.rb b/lib/ohai/plugins/netbsd/uptime.rb index 85f3588a..75470735 100644 --- a/lib/ohai/plugins/netbsd/uptime.rb +++ b/lib/ohai/plugins/netbsd/uptime.rb @@ -25,7 +25,7 @@ popen4("/sbin/sysctl kern.boottime") do |pid, stdin, stdout, stderr| stdout.each do |line| if line =~ /kern.boottime:\D+(\d+)/ uptime_seconds Time.new.to_i - $1.to_i - uptime self._seconds_to_human(uptime_seconds) + uptime seconds_to_human(uptime_seconds) end end end diff --git a/lib/ohai/plugins/openbsd/uptime.rb b/lib/ohai/plugins/openbsd/uptime.rb index 3d903321..6028d1e7 100644 --- a/lib/ohai/plugins/openbsd/uptime.rb +++ b/lib/ohai/plugins/openbsd/uptime.rb @@ -25,7 +25,7 @@ popen4("/sbin/sysctl kern.boottime") do |pid, stdin, stdout, stderr| stdout.each do |line| if line =~ /kern.boottime=(.+)/ uptime_seconds Time.new.to_i - Time.parse($1).to_i - uptime self._seconds_to_human(uptime_seconds) + uptime seconds_to_human(uptime_seconds) end end end diff --git a/lib/ohai/plugins/sigar/uptime.rb b/lib/ohai/plugins/sigar/uptime.rb index 5d2923d1..8d43d73a 100644 --- a/lib/ohai/plugins/sigar/uptime.rb +++ b/lib/ohai/plugins/sigar/uptime.rb @@ -24,4 +24,4 @@ provides "uptime", "uptime_seconds" uptime = sigar.uptime.uptime uptime_seconds uptime.to_i * 1000 -uptime self._seconds_to_human(uptime.to_i) +uptime seconds_to_human(uptime.to_i) diff --git a/lib/ohai/plugins/solaris2/uptime.rb b/lib/ohai/plugins/solaris2/uptime.rb index e39dfcf8..804e9da5 100644 --- a/lib/ohai/plugins/solaris2/uptime.rb +++ b/lib/ohai/plugins/solaris2/uptime.rb @@ -29,7 +29,7 @@ popen4('who -b') do |pid, stdin, stdout, stderr| stdout.each do |line| if line =~ /.* boot (.+)/ uptime_seconds Time.now.to_i - DateTime.parse($1).strftime('%s').to_i - uptime self._seconds_to_human(uptime_seconds) + uptime seconds_to_human(uptime_seconds) break end end diff --git a/lib/ohai/plugins/windows/uptime.rb b/lib/ohai/plugins/windows/uptime.rb index 7ad4ab75..2dcc0e48 100644 --- a/lib/ohai/plugins/windows/uptime.rb +++ b/lib/ohai/plugins/windows/uptime.rb @@ -20,4 +20,4 @@ require 'ruby-wmi' provides "uptime", "uptime_seconds" uptime_seconds ::WMI::Win32_PerfFormattedData_PerfOS_System.find(:first).SystemUpTime.to_i -uptime self._seconds_to_human(uptime_seconds) +uptime seconds_to_human(uptime_seconds) |