sys-uptime 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8bf1eb6f4cd27a729aaa980cbf240ffc981fbab03cf25e7cc1e14a01d2a980ae
4
- data.tar.gz: 97b84f93298523a7449fd61097dc791ee9d89c573afa4e67ec5521705ff03303
3
+ metadata.gz: 559d060a4c5cb7ef11471f1e079d53e6e758fbece095ceca8cb5906d1f9aaa93
4
+ data.tar.gz: 857205d6d793b0db9b3756cab8c22a85d0a02a3fd397eb6a483bc7820ae13054
5
5
  SHA512:
6
- metadata.gz: 5eff9d33d6c1d85181a1f888f62840013884a9e5f72bdc20a0fd64ca92933645a8384b3181bf884f17e9f4b066abcd4c3510e7289583ca2d975ec1cb897c7cd5
7
- data.tar.gz: '09a624b51158caf2b4e2d38583cd853455c761ea5e99aa8ae28a3be1fb93591708975d84e7afb27da95e52bc5b87edd56ffb1bee25eb0118bc512f9f41423e1d'
6
+ metadata.gz: 7e5ed8ebd668466adb8277a8fd397ff248ef4ca7e8353eb5f558ad147a07dafc288f7db8767ac1500e66732cedcad9af681c7369bd13fcd5461f68656bb18a00
7
+ data.tar.gz: 4b2f55fe62abfce0a863dd096e03dba42b6dcb85e34f1fa82f87beff20e70f49dc3bcf93059de52eee223a89745d7d53d9f9d670058d9ac61cb35319908f8dd6
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,4 +1,11 @@
1
- == 0.7.3 - 31-Dec-2019
1
+ ## 0.7.5 - 29-Oct-2020
2
+ * Switched docs to markdown format.
3
+ * Added a Gemfile.
4
+
5
+ ## 0.7.4 - 18-Mar-2020
6
+ * Added a LICENSE file as per the requirements of the Apache-2.0 license.
7
+
8
+ ## 0.7.3 - 31-Dec-2019
2
9
  * Attempting to call Sys::Uptime.new will now raise an error. I thought
3
10
  this was already the case, but apparently one of the tests was bad.
4
11
  * Added explicit .rdoc extensions to various text files so that github
@@ -7,48 +14,48 @@
7
14
  * Updated the gemspec to reflect the filename updates, as well as the
8
15
  added development dependency.
9
16
 
10
- == 0.7.2 - 4-Nov-2018
17
+ ## 0.7.2 - 4-Nov-2018
11
18
  * Added metadata to the gemspec.
12
19
  * The VERSION constant is now frozen.
13
20
  * Updated cert.
14
21
 
15
- == 0.7.1 - 14-May-2016
22
+ ## 0.7.1 - 14-May-2016
16
23
  * Altered internal layout, which also fixed a require bug. Thanks go
17
24
  to jkburges for the spot.
18
25
  * Moved the VERSION constant into a single file shared by all platforms.
19
26
 
20
- == 0.7.0 - 3-Oct-2015
27
+ ## 0.7.0 - 3-Oct-2015
21
28
  * Changed license to Apache 2.0.
22
29
  * Added a cert. This gem is now signed.
23
30
  * Added a sys-uptime.rb file for convenience.
24
31
  * Gem related tasks in the Rakefile now assume Rubygems 2.x.
25
32
 
26
- == 0.6.2 - 8-Nov-2014
33
+ ## 0.6.2 - 8-Nov-2014
27
34
  * Minor updates to gemspec and Rakefile.
28
35
 
29
- == 0.6.1 - 22-Oct-2012
36
+ ## 0.6.1 - 22-Oct-2012
30
37
  * Refactored a private method in the MS Windows source.
31
38
  * Minor fix for one private method test.
32
39
  * Fixed an RbConfig vs Config warning. Thanks Pedro Carrico.
33
40
 
34
- == 0.6.0 - 11-Dec-2011
41
+ ## 0.6.0 - 11-Dec-2011
35
42
  * Switched Unix code to use FFI.
36
43
  * Removed all of the C related tasks from the Rakefile and added the gem:build
37
44
  and gem:install tasks.
38
45
  * Internal directory layout changes, with appropriate changes to the gemspec.
39
46
 
40
- == 0.5.3 - 7-May-2009
47
+ ## 0.5.3 - 7-May-2009
41
48
  * Altered the Uptime.seconds implementation on Linux so that it works with
42
49
  both Ruby 1.8.x and 1.9.x. Thanks go to Alexey Chebotar for the spot.
43
50
 
44
- == 0.5.2 - 13-Dec-2008
51
+ ## 0.5.2 - 13-Dec-2008
45
52
  * Fixed a date/time issue in the Windows version caused by Ruby itself.
46
53
  * Fixed the Uptime.seconds, Uptime.minutes and Uptime.hours methods on MS
47
54
  Windows.
48
55
  * Renamed the test file to 'test_sys_uptime.rb'.
49
56
  * Some minor updates to the Rakefile.
50
57
 
51
- == 0.5.1 - 26-Jul-2007
58
+ ## 0.5.1 - 26-Jul-2007
52
59
  * Fixed bug in the MS Windows version caused by incorrect parsing of an
53
60
  MS specific date format (caused by a bug in Ruby 1.8.6). Thanks go to
54
61
  Robert H. for the spot.
@@ -57,7 +64,7 @@
57
64
  * Added an 'install_gem' Rake task, and updated the README installation
58
65
  instructions.
59
66
 
60
- == 0.5.0 - 30-Mar-2007
67
+ ## 0.5.0 - 30-Mar-2007
61
68
  * For platforms that use C code, the code now always uses the sysctl()
62
69
  function if supported by your system. This replaces the platform specific
63
70
  checks I was doing for the various BSD flavors.
@@ -67,20 +74,20 @@
67
74
  * Added a Rakefile - users should now use the 'test' and 'install' rake tasks.
68
75
  * Updates to the MANIFEST, README and uptime.txt files.
69
76
 
70
- == 0.4.5 - 19-Nov-2006
77
+ ## 0.4.5 - 19-Nov-2006
71
78
  * Internal layout changes, minor doc updates and gemspec improvements.
72
79
  * No code changes.
73
80
 
74
- == 0.4.4 - 30-Jun-2006
81
+ ## 0.4.4 - 30-Jun-2006
75
82
  * Added inline rdoc documentation to the source files.
76
83
  * Added a gemspec.
77
84
 
78
- == 0.4.3 - 18-Dec-2005
85
+ ## 0.4.3 - 18-Dec-2005
79
86
  * Changed the Linux version to pure Ruby. The current method of determining
80
87
  uptime in unix.c does not work in Linux kernel 2.6+. So, from now on it
81
88
  reads out of /proc/uptime.
82
89
 
83
- == 0.4.2 - 6-May-2005
90
+ ## 0.4.2 - 6-May-2005
84
91
  * Fixed a potential boot_time bug.
85
92
  * Removed the version.h file. It's no longer needed since the Windows
86
93
  version is pure Ruby.
@@ -92,13 +99,13 @@
92
99
  * Made most documents rdoc friendly.
93
100
  * Moved project to RubyForge.
94
101
 
95
- == 0.4.1 - 14-Dec-2004
102
+ ## 0.4.1 - 14-Dec-2004
96
103
  * Moved freebsd code into unix.c file.
97
104
  * Should now work past 249 days (2**31) on systems that have utmpx.h.
98
105
  * Fixed a bug with regards to boot_time, where it was possible that it would
99
106
  simply be empty.
100
107
 
101
- == 0.4.0 - 8-Jul-2004
108
+ ## 0.4.0 - 8-Jul-2004
102
109
  * Removed all reference to the CLK_TCK constant, as per documentation from
103
110
  Richard Stevens that it is deprecated and that sysconf() should be used
104
111
  instead (well, I knew about this, but ignored it until now).
@@ -118,18 +125,18 @@
118
125
  * Removed the uptime.html file - you may generate that on your own.
119
126
  * Added warranty and license info.
120
127
 
121
- == 0.3.2 - 30-Dec-2003
128
+ ## 0.3.2 - 30-Dec-2003
122
129
  * Cleaned up some warnings that showed up with -Wall on some unix platforms
123
130
  (int vs long format, explicit include)
124
131
  * Minor test suite and extconf.rb changes
125
132
 
126
- == 0.3.1 - 25-Jun-2003
133
+ ## 0.3.1 - 25-Jun-2003
127
134
  * Modified test files to handle HP-UX extensions
128
135
  * Minor doc updates
129
136
  * Added the dhms() method. Actually, this was in the 0.3.0
130
137
  release, I just forgot to mention it in this file :)
131
138
 
132
- == 0.3.0 - 22-Jun-2003
139
+ ## 0.3.0 - 22-Jun-2003
133
140
  * Added OS X support - thanks go to Mike Hall for the patch
134
141
  * Fixed incorrect values in FreeBSD (again Mike Hall)
135
142
  * Modified tc_unix.rb test suite to handle OS X, along with a bit
@@ -138,7 +145,7 @@
138
145
  * Separated FreeBSD/OS X source into its own file (freebsd.c).
139
146
  The #ifdefs were starting to get too ugly for me
140
147
 
141
- == 0.2.1 - 13-May-2003
148
+ ## 0.2.1 - 13-May-2003
142
149
  * Fixed bug in extconf.rb file, and made some major changes
143
150
  * Modified test.rb for those without TestUnit
144
151
  * Modified TestUnit tests - some bogus tests were removed
@@ -148,7 +155,7 @@
148
155
  * Docs automatically included in doc directory (i.e. no more interactive
149
156
  document creation)
150
157
 
151
- == 0.2.0 - 13-Mar-2003
158
+ ## 0.2.0 - 13-Mar-2003
152
159
  * Added MS Windows support
153
160
  * Added a VERSION constant
154
161
  * Added a test suite (for those with TestUnit installed)
@@ -157,7 +164,7 @@
157
164
  * Changelog and Manifest are now CHANGES and MANIFEST, respectively
158
165
  * Many changes to extconf.rb
159
166
 
160
- == 0.1.3 - 6-Jan-2003
167
+ ## 0.1.3 - 6-Jan-2003
161
168
  * Added a VERSION class method
162
169
  * Added a copyright notice
163
170
  * Fixed up the docs a bit and moved them to the doc directory
@@ -165,14 +172,14 @@
165
172
  * Modified test.rb script to make it better
166
173
  * Changed install instructions slightly
167
174
 
168
- == 0.1.2 - 25-Aug-2002
175
+ ## 0.1.2 - 25-Aug-2002
169
176
  * Slight change to preprocessor commands to avoid redefining CLK_TCK on
170
177
  those systems that define it in time.h
171
178
  * Added an INSTALL file
172
179
 
173
- == 0.1.1 - 21-Jun-2002
180
+ ## 0.1.1 - 21-Jun-2002
174
181
  * The CLK_TCK constant wasn't necessarily being set correctly, which could
175
182
  lead to some odd results. This has been fixed.
176
183
 
177
- == 0.1.0 - 17-Jun-2002
184
+ ## 0.1.0 - 17-Jun-2002
178
185
  * Initial release
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source 'https://rubygems.org' do
2
+ gem 'rake'
3
+
4
+ platforms :ruby do
5
+ gem 'ffi', '~> 1.1'
6
+ end
7
+
8
+ group 'test' do
9
+ gem 'rspec', '~> 3.9'
10
+ end
11
+ end
File without changes
@@ -1,31 +1,33 @@
1
- == Description
1
+ ## Description
2
2
  A Ruby interface for getting system uptime information.
3
3
 
4
- == Prerequisites
4
+ ## Prerequisites
5
5
  ffi 0.1.0 or later on Unixy platforms.
6
6
 
7
- == Installation
7
+ ## Installation
8
8
 
9
- gem install sys-uptime
9
+ `gem install sys-uptime`
10
10
 
11
- == Synopsis
12
- require 'sys-uptime'
13
- include Sys
11
+ ## Synopsis
12
+ ```
13
+ require 'sys-uptime'
14
+ include Sys
14
15
 
15
- # Get everything
16
- p Uptime.uptime
17
- p Uptime.dhms.join(', ')
16
+ # Get everything
17
+ p Uptime.uptime
18
+ p Uptime.dhms.join(', ')
18
19
 
19
- # Get individual units
20
- p Uptime.days
21
- p Uptime.hours
22
- p Uptime.minutes
23
- p Uptime.seconds
20
+ # Get individual units
21
+ p Uptime.days
22
+ p Uptime.hours
23
+ p Uptime.minutes
24
+ p Uptime.seconds
24
25
 
25
- # Get the boot time
26
- p Uptime.boot_time
26
+ # Get the boot time
27
+ p Uptime.boot_time
28
+ ```
27
29
 
28
- == Notes
30
+ ## Notes
29
31
  On MS Windows the +Uptime.uptime+ and +Uptime.boot_time+ methods optionally
30
32
  takes a host name as a single argument. The default is localhost.
31
33
 
@@ -33,28 +35,28 @@ The current time, users and load average are not included in this library
33
35
  module, even though you may be used to seeing them with the command
34
36
  line version of +uptime+.
35
37
 
36
- == Known Bugs
38
+ ## Known Bugs
37
39
  None that I am aware of. Please log any bugs you find on the project
38
40
  website at https://github.com/djberg96/sys-uptime.
39
41
 
40
- == Questions
42
+ ## Questions
41
43
  "Doesn't Struct::Tms do this?" - No.
42
44
 
43
- == License
45
+ ## License
44
46
  Apache-2.0
45
47
 
46
- == Copyright
48
+ ## Copyright
47
49
  Copyright 2002-2019, Daniel J. Berger
48
50
 
49
51
  All Rights Reserved. This module is free software. It may be used,
50
52
  redistributed and/or modified under the same terms as Ruby itself.
51
53
 
52
- == Warranty
54
+ ## Warranty
53
55
  This library is provided "as is" and without any express or
54
56
  implied warranties, including, without limitation, the implied
55
57
  warranties of merchantability and fitness for a particular purpose.
56
58
 
57
- == Acknowledgements
59
+ ## Acknowledgements
58
60
  Andrea Fazzi for help with the FFI version.
59
61
 
60
62
  Mike Hall for help with the BSD side of things for the original C code.
@@ -63,5 +65,5 @@ Ola Eriksson, whose source code I shamelessly plagiarized to get a better
63
65
  implementation for systems that have the utmpx.h header file for the
64
66
  original C code.
65
67
 
66
- == Author
68
+ ## Author
67
69
  Daniel J. Berger
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rake/clean'
3
3
  require 'rake/testtask'
4
4
  require 'rspec/core/rake_task'
5
5
 
6
- CLEAN.include("**/*.gem", "**/*.rbx", "**/*.rbc")
6
+ CLEAN.include("**/*.gem", "**/*.rbx", "**/*.rbc", "**/*.lock")
7
7
 
8
8
  namespace 'gem' do
9
9
  desc 'Build the sys-uptime gem'
@@ -13,12 +13,12 @@ namespace 'gem' do
13
13
  spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
14
14
 
15
15
  if File::ALT_SEPARATOR
16
- spec.platform = Gem::Platform.new(['universal','mingw32'])
16
+ spec.platform = Gem::Platform.new(['universal', 'mingw32'])
17
17
  else
18
- spec.add_dependency('ffi', '>= 1.0.0')
18
+ spec.add_dependency('ffi', '~> 1.1')
19
19
  end
20
20
 
21
- Gem::Package.build(spec, true)
21
+ Gem::Package.build(spec)
22
22
  end
23
23
 
24
24
  desc 'Install the sys-uptime gem'
@@ -7,6 +7,6 @@ end
7
7
  module Sys
8
8
  class Uptime
9
9
  # The version of the sys-uptime library
10
- VERSION = '0.7.4'.freeze
10
+ VERSION = '0.7.5'.freeze
11
11
  end
12
12
  end
@@ -5,12 +5,12 @@
5
5
  # 'rake test' task, since it handles the pre-setup code for you.
6
6
  #####################################################################
7
7
  require 'sys/uptime'
8
- require 'test-unit'
8
+ require 'rspec'
9
9
  require 'socket'
10
10
 
11
11
  describe Sys::Uptime do
12
12
  example "version is set to expected value" do
13
- expect(Sys::Uptime::VERSION).to eql('0.7.4')
13
+ expect(Sys::Uptime::VERSION).to eql('0.7.5')
14
14
  expect(Sys::Uptime::VERSION.frozen?).to be(true)
15
15
  end
16
16
 
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'sys-uptime'
5
- spec.version = '0.7.4'
5
+ spec.version = '0.7.5'
6
6
  spec.author = 'Daniel J. Berger'
7
7
  spec.license = 'Apache-2.0'
8
8
  spec.email = 'djberg96@gmail.com'
@@ -12,13 +12,12 @@ Gem::Specification.new do |spec|
12
12
  spec.files = Dir["**/*"].reject{ |f| f.include?('git') }
13
13
  spec.cert_chain = ['certs/djberg96_pub.pem']
14
14
 
15
- spec.extra_rdoc_files = Dir["*.rdoc"]
16
- spec.add_development_dependency 'rspec', '~> 3'
15
+ spec.add_development_dependency 'rspec', '~> 3.9'
17
16
 
18
17
  spec.metadata = {
19
18
  'homepage_uri' => 'https://github.com/djberg96/sys-uptime',
20
19
  'bug_tracker_uri' => 'https://github.com/djberg96/sys-uptime/issues',
21
- 'changelog_uri' => 'https://github.com/djberg96/sys-uptime/blob/ffi/CHANGES',
20
+ 'changelog_uri' => 'https://github.com/djberg96/sys-uptime/blob/ffi/CHANGES.md',
22
21
  'documentation_uri' => 'https://github.com/djberg96/sys-uptime/wiki',
23
22
  'source_code_uri' => 'https://github.com/djberg96/sys-uptime',
24
23
  'wiki_uri' => 'https://github.com/djberg96/sys-uptime/wiki'
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sys-uptime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - |
@@ -35,7 +35,7 @@ cert_chain:
35
35
  ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
36
36
  WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
37
37
  -----END CERTIFICATE-----
38
- date:
38
+ date: 2020-10-29 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rspec
@@ -43,28 +43,28 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '3'
46
+ version: '3.9'
47
47
  type: :development
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '3'
53
+ version: '3.9'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: ffi
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ">="
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.0.0
60
+ version: '1.1'
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ">="
65
+ - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: 1.0.0
67
+ version: '1.1'
68
68
  description: |2
69
69
  The sys-uptime library is a simple interface for gathering uptime
70
70
  information. You can retrieve data in seconds, minutes, days, hours,
@@ -72,44 +72,33 @@ description: |2
72
72
  email: djberg96@gmail.com
73
73
  executables: []
74
74
  extensions: []
75
- extra_rdoc_files:
76
- - CHANGES.rdoc
77
- - MANIFEST.rdoc
78
- - README.rdoc
75
+ extra_rdoc_files: []
79
76
  files:
77
+ - CHANGES.md
78
+ - Gemfile
80
79
  - LICENSE
81
- - sys-uptime.gemspec
82
- - spec
83
- - spec/sys_uptime_spec.rb
80
+ - MANIFEST.md
81
+ - README.md
84
82
  - Rakefile
85
- - certs
86
83
  - certs/djberg96_pub.pem
87
- - examples
88
84
  - examples/uptime_test.rb
89
- - lib
90
85
  - lib/sys-uptime.rb
91
- - lib/sys
92
- - lib/sys/uptime.rb
93
- - lib/sys/unix
94
- - lib/sys/unix/sys
95
86
  - lib/sys/unix/sys/uptime.rb
96
- - lib/sys/windows
97
- - lib/sys/windows/sys
87
+ - lib/sys/uptime.rb
98
88
  - lib/sys/windows/sys/uptime.rb
99
- - CHANGES.rdoc
100
- - MANIFEST.rdoc
101
- - README.rdoc
89
+ - spec/sys_uptime_spec.rb
90
+ - sys-uptime.gemspec
102
91
  homepage: https://github.com/djberg96/sys-uptime
103
92
  licenses:
104
93
  - Apache-2.0
105
94
  metadata:
106
95
  homepage_uri: https://github.com/djberg96/sys-uptime
107
96
  bug_tracker_uri: https://github.com/djberg96/sys-uptime/issues
108
- changelog_uri: https://github.com/djberg96/sys-uptime/blob/ffi/CHANGES
97
+ changelog_uri: https://github.com/djberg96/sys-uptime/blob/ffi/CHANGES.md
109
98
  documentation_uri: https://github.com/djberg96/sys-uptime/wiki
110
99
  source_code_uri: https://github.com/djberg96/sys-uptime
111
100
  wiki_uri: https://github.com/djberg96/sys-uptime/wiki
112
- post_install_message:
101
+ post_install_message:
113
102
  rdoc_options: []
114
103
  require_paths:
115
104
  - lib
@@ -124,8 +113,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
113
  - !ruby/object:Gem::Version
125
114
  version: '0'
126
115
  requirements: []
127
- rubygems_version: 3.0.6
128
- signing_key:
116
+ rubygems_version: 3.1.4
117
+ signing_key:
129
118
  specification_version: 4
130
119
  summary: A Ruby interface for getting system uptime information.
131
120
  test_files:
metadata.gz.sig CHANGED
Binary file