sys-uptime 0.5.2-x86-linux → 0.5.3-x86-linux

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.5.3 - 7-May-2009
2
+ * Altered the Uptime.seconds implementation on Linux so that it works with
3
+ both Ruby 1.8.x and 1.9.x. Thanks go to Alexey Chebotar for the spot.
4
+
1
5
  == 0.5.2 - 13-Dec-2008
2
6
  * Fixed a date/time issue in the Windows version caused by Ruby itself.
3
7
  * Fixed the Uptime.seconds, Uptime.minutes and Uptime.hours methods on MS
data/doc/uptime.txt CHANGED
@@ -75,7 +75,7 @@ Uptime::Error
75
75
  Ruby's
76
76
 
77
77
  == Copyright
78
- Copyright 2002-2008, Daniel J. Berger
78
+ Copyright 2002-2009, Daniel J. Berger
79
79
 
80
80
  All Rights Reserved. This module is free software. It may be used,
81
81
  redistributed and/or modified under the same terms as Ruby itself.
data/lib/sys/uptime.rb CHANGED
@@ -9,9 +9,10 @@ module Sys
9
9
  class Error < StandardError; end
10
10
 
11
11
  # The version of this library.
12
- VERSION = '0.5.2'
12
+ VERSION = '0.5.3'
13
13
 
14
- @@file = '/proc/uptime'
14
+ # The file to read uptime information from.
15
+ UPTIME_FILE = '/proc/uptime'
15
16
 
16
17
  # Returns the total number of seconds of uptime.
17
18
  #
@@ -21,7 +22,7 @@ module Sys
21
22
  #
22
23
  def self.seconds
23
24
  begin
24
- IO.readlines(@@file).to_s.split.first.to_i
25
+ IO.read(UPTIME_FILE).split.first.to_i
25
26
  rescue Exception => err
26
27
  raise Error, err
27
28
  end
@@ -10,7 +10,7 @@ include Sys
10
10
 
11
11
  class TC_Uptime < Test::Unit::TestCase
12
12
  def test_version
13
- assert_equal('0.5.2', Uptime::VERSION)
13
+ assert_equal('0.5.3', Uptime::VERSION)
14
14
  end
15
15
 
16
16
  def test_seconds
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sys-uptime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: x86-linux
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -9,11 +9,11 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-13 00:00:00 -07:00
12
+ date: 2010-04-21 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
16
- description: A Ruby interface for getting system uptime information.
16
+ description: " The sys-uptime library is a simple interface for gathering uptime\n information. You can retrieve data in seconds, minutes, days, hours,\n or all of the above.\n"
17
17
  email: djberg96@gmail.com
18
18
  executables: []
19
19
 
@@ -33,6 +33,8 @@ files:
33
33
  - lib/sys/uptime.rb
34
34
  has_rdoc: true
35
35
  homepage: http://www.rubyforge.org/projects/sysutils
36
+ licenses: []
37
+
36
38
  post_install_message:
37
39
  rdoc_options: []
38
40
 
@@ -53,9 +55,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
55
  requirements: []
54
56
 
55
57
  rubyforge_project: sysutils
56
- rubygems_version: 1.3.1
58
+ rubygems_version: 1.3.3
57
59
  signing_key:
58
- specification_version: 2
60
+ specification_version: 3
59
61
  summary: A Ruby interface for getting system uptime information.
60
62
  test_files:
61
63
  - test/test_sys_uptime.rb