sys-cpu 0.8.1 → 0.8.2

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: 4cb6cd9291a34891912b829319c1bfe83076fab74de62c4ed66f0282ac1e511c
4
- data.tar.gz: 070bfb80aa72fa8d18733d986d2695bb89f82c91d1f1c65bce6dc20a23997039
3
+ metadata.gz: 204a857e1da67ff544e124e88c0e94d45381f1e83bc2f2ead79d87f337e7286c
4
+ data.tar.gz: d39b0686af6c00617a39bd1591e3157f229a846981ce7d972ac38e30f605c756
5
5
  SHA512:
6
- metadata.gz: '0095267433095258cc36bc7eef165589c7d8022c24687c926b16f0a8f8a50ff1ad8a4f40ad99ab248b3c9829e16dadb5d9c55675d7b936f108ce42dd34f3f352'
7
- data.tar.gz: db3d73bf53eb38c1dba4f24b60b3bc3643d1f0e1bc2ca5d53bff5a70126ac955db0b9298d921871203795fc6c41ec1261e8fd48510235bd7b70101899eeb0b9a
6
+ metadata.gz: 5b1fe1e9231fd1357d18412b6cdf203160db830d01c3c2bf3ff11b1ee321967fb6b8c7ece8744b5cde5433a035bda4ab808d90abc6b9d6f8a47f50c692987ac2
7
+ data.tar.gz: 911e6984160e4303ffe6da647970da124e58c1745424a61c6944c98d90bd8588a48ac53eec1006b06db646f56fd34e497017a179a8ef3e1f374b2aeb71e77bd0
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,7 @@
1
+ == 0.8.2 - 14-Jan-2020
2
+ * Added explicit .rdoc extension to README, CHANGES and MANIFEST files.
3
+ * Fixed license name in README.
4
+
1
5
  == 0.8.1 - 4-Nov-2018
2
6
  * Added metadata to the gemspec.
3
7
  * Fixed missing hyphen in license name.
@@ -1,8 +1,8 @@
1
1
  * install.rb
2
- * MANIFEST
3
- * CHANGES
2
+ * MANIFEST.rdoc
3
+ * CHANGES.rdoc
4
4
  * Rakefile
5
- * README
5
+ * README.rdoc
6
6
  * sys-cpu.gemspec
7
7
  * certs/djberg96_pub.pem
8
8
  * doc/bsd.txt
@@ -0,0 +1,75 @@
1
+ = Description
2
+ A Ruby interface for getting cpu information.
3
+
4
+ = Installation
5
+ gem install sys-cpu
6
+
7
+ = Adding the trusted cert
8
+ gem cert --add <(curl -Ls https://raw.githubusercontent.com/djberg96/sys-cpu/ffi/certs/djberg96_pub.pem)
9
+
10
+ = Notes
11
+ == Solaris
12
+ Currently there is no +processors+ iterative method for multi-cpu systems.
13
+ I plan to add it this in a future release.
14
+
15
+ == OS X
16
+ The CPU.model method returns very limited information. I do not yet know
17
+ how to get more detailed information.
18
+
19
+ == Linux
20
+ This is pure Ruby. This version reads information out of /proc/cpuinfo and
21
+ /proc/loadavg, so if /proc isn't mounted it won't work.
22
+
23
+ The key-value information in /proc/cpuinfo is stored internally (i.e. in
24
+ memory) as an array of hashes when you first +require+ this package. This
25
+ overhead is exceptionally minimal, given that your average cpuinfo file
26
+ contains less than 1k of text (and I don't store whitespace or newlines).
27
+
28
+ The text documentation for Linux is dynamically generated during the
29
+ build process because the fields vary depending on your setup. So, don't
30
+ look at it until *after* you've installed it. You will see a doc/linux.txt
31
+ file after you run +rake install+ (via install.rb).
32
+
33
+ == HP-UX
34
+ Unlike other platforms, you can get load averages for an individual cpu in
35
+ multi-cpu systems. See documentation for more details.
36
+
37
+ Note that version 0.7.x and later will not work on HP-UX because of the
38
+ switch to FFI and the lack of a testing platform. However, version 0.6.x
39
+ will work just fine.
40
+
41
+ == MS Windows
42
+ This is a pure Ruby implementation using the win32ole package + WMI. The C
43
+ version has been scrapped.
44
+
45
+ As of version 0.5.0, the CPU.usage method has been removed in favor of the
46
+ CPU.load_avg method. This does not (currently) use a perf counter, so there
47
+ is no longer any delay. Also, the +processors+ method has been added and the
48
+ +supported+ method has been dropped. See the documentation for other changes.
49
+
50
+ = Acknowledgements
51
+ Thanks go to the MPlayer team for some source code that helped me on
52
+ certain versions of FreeBSD in the original C version.
53
+
54
+ = Known Bugs
55
+ None that I'm aware of. Please report bugs on the project page at:
56
+
57
+ https://github.com/djberg96/sys-cpu
58
+
59
+ = Future Plans
60
+ * Add iterative CPU.processors method.
61
+ * Add more information in general, such as what +prtdiag+ shows.
62
+
63
+ = License
64
+ Apache-2.0
65
+
66
+ = Copyright
67
+ (C) 2003-2020 Daniel J. Berger, All Rights Reserved
68
+
69
+ = Warranty
70
+ This package is provided "as is" and without any express or
71
+ implied warranties, including, without limitation, the implied
72
+ warranties of merchantability and fitness for a particular purpose.
73
+
74
+ = Author
75
+ Daniel J. Berger
@@ -5,7 +5,7 @@ require 'rbconfig'
5
5
  module Sys
6
6
  class CPU
7
7
  # The version of the sys-cpu gem.
8
- VERSION = '0.8.1'.freeze
8
+ VERSION = '0.8.2'.freeze
9
9
  end
10
10
  end
11
11
 
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'sys-cpu'
5
- spec.version = '0.8.1'
5
+ spec.version = '0.8.2'
6
6
  spec.author = 'Daniel J. Berger'
7
7
  spec.email = 'djberg96@gmail.com'
8
8
  spec.license = 'Apache-2.0'
@@ -12,7 +12,7 @@ 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 = ['CHANGES', 'README', 'MANIFEST']
15
+ spec.extra_rdoc_files = Dir['*.rdoc']
16
16
 
17
17
  # The ffi dependency is only relevent for the Unix version. Given the
18
18
  # ubiquity of ffi these days, I felt a bogus dependency on ffi for Windows
@@ -10,7 +10,7 @@ require 'test-unit'
10
10
 
11
11
  class TC_Sys_CPU_VERSION < Test::Unit::TestCase
12
12
  test "version number is set to the expected value" do
13
- assert_equal('0.8.1', Sys::CPU::VERSION)
13
+ assert_equal('0.8.2', Sys::CPU::VERSION)
14
14
  end
15
15
 
16
16
  test "version number is frozen" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sys-cpu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -87,51 +87,51 @@ email: djberg96@gmail.com
87
87
  executables: []
88
88
  extensions: []
89
89
  extra_rdoc_files:
90
- - CHANGES
91
- - README
92
- - MANIFEST
90
+ - CHANGES.rdoc
91
+ - MANIFEST.rdoc
92
+ - README.rdoc
93
93
  files:
94
- - CHANGES
95
94
  - test
96
- - test/test_sys_cpu_hpux.rb
95
+ - test/test_sys_cpu.rb
97
96
  - test/test_sys_cpu_bsd.rb
98
- - test/test_sys_cpu_version.rb
97
+ - test/test_sys_cpu_hpux.rb
98
+ - test/test_sys_cpu_linux.rb
99
99
  - test/test_sys_cpu_sunos.rb
100
100
  - test/test_sys_cpu_windows.rb
101
- - test/test_sys_cpu_linux.rb
102
- - test/test_sys_cpu.rb
101
+ - test/test_sys_cpu_version.rb
103
102
  - examples
104
103
  - examples/example_sys_cpu_sunos.rb
105
104
  - examples/example_sys_cpu_hpux.rb
106
105
  - examples/example_sys_cpu_linux.rb
107
- - examples/example_sys_cpu_windows.rb
108
106
  - examples/example_sys_cpu_bsd.rb
107
+ - examples/example_sys_cpu_windows.rb
109
108
  - doc
110
109
  - doc/linux.txt
111
- - doc/sunos.txt
112
110
  - doc/bsd.txt
113
- - doc/windows.txt
114
111
  - doc/hpux.txt
115
- - sys-cpu.gemspec
112
+ - doc/sunos.txt
113
+ - doc/windows.txt
116
114
  - install.rb
117
- - README
118
115
  - Rakefile
119
- - MANIFEST
116
+ - certs
117
+ - certs/djberg96_pub.pem
120
118
  - lib
121
119
  - lib/sys-cpu.rb
122
120
  - lib/sys
123
- - lib/sys/cpu.rb
124
- - lib/sys/windows
125
- - lib/sys/windows/sys
126
- - lib/sys/windows/sys/cpu.rb
127
121
  - lib/sys/linux
128
122
  - lib/sys/linux/sys
129
123
  - lib/sys/linux/sys/cpu.rb
130
124
  - lib/sys/unix
131
125
  - lib/sys/unix/sys
132
126
  - lib/sys/unix/sys/cpu.rb
133
- - certs
134
- - certs/djberg96_pub.pem
127
+ - lib/sys/windows
128
+ - lib/sys/windows/sys
129
+ - lib/sys/windows/sys/cpu.rb
130
+ - lib/sys/cpu.rb
131
+ - CHANGES.rdoc
132
+ - MANIFEST.rdoc
133
+ - README.rdoc
134
+ - sys-cpu.gemspec
135
135
  homepage: https://github.com/djberg96/sys-cpu
136
136
  licenses:
137
137
  - Apache-2.0
metadata.gz.sig CHANGED
Binary file
data/README DELETED
@@ -1,75 +0,0 @@
1
- = Description
2
- A Ruby interface for getting cpu information.
3
-
4
- = Installation
5
- gem install sys-cpu
6
-
7
- = Adding the trusted cert
8
- gem cert --add <(curl -Ls https://raw.githubusercontent.com/djberg96/sys-cpu/ffi/certs/djberg96_pub.pem)
9
-
10
- = Notes
11
- == Solaris
12
- Currently there is no 'processors()' iterative method for multi-cpu systems.
13
- I plan to add it this in a future release.
14
-
15
- == OS X
16
- The CPU.model method returns very limited information. I do not yet know
17
- how to get more detailed information.
18
-
19
- == Linux
20
- This is pure Ruby. This version reads information out of /proc/cpuinfo and
21
- /proc/loadavg, so if /proc isn't mounted it won't work.
22
-
23
- The key-value information in /proc/cpuinfo is stored internally (i.e. in
24
- memory) as an array of hashes when you first 'require' this package. This
25
- overhead is exceptionally minimal, given that your average cpuinfo file
26
- contains less than 1k of text (and I don't store whitespace or newlines).
27
-
28
- The text documentation for Linux is dynamically generated during the
29
- build process because the fields vary depending on your setup. So, don't
30
- look at it until *after* you've installed it. You will see a doc/linux.txt
31
- file after you run 'rake install' (via install.rb).
32
-
33
- == HP-UX
34
- Unlike other platforms, you can get load averages for an individual cpu in
35
- multi-cpu systems. See documentation for more details.
36
-
37
- Note that version 0.7.x and later will not work on HP-UX because of the
38
- switch to FFI and the lack of a testing platform. However, version 0.6.x
39
- will work just fine.
40
-
41
- == MS Windows
42
- This is a pure Ruby implementation using the win32ole package + WMI. The C
43
- version has been scrapped.
44
-
45
- As of version 0.5.0, the CPU.usage method has been removed in favor of the
46
- CPU.load_avg method. This does not (currently) use a perf counter, so there
47
- is no longer any delay. Also, the 'processors' method has been
48
- added and the 'supported' method has been dropped. See the documentation
49
- for other changes.
50
-
51
- = Acknowledgements
52
- Thanks go to the MPlayer team for some source code that helped me on
53
- certain versions of FreeBSD in the original C version.
54
-
55
- = Known Bugs
56
- None that I'm aware of. Please report bugs on the project page at
57
- https://github.com/djberg96/sys-cpu
58
-
59
- = Future Plans
60
- Add iterative CPU.processors method.
61
- Add more information in general, such as what 'prtdiag' shows.
62
-
63
- = License
64
- Artistic 2.0
65
-
66
- = Copyright
67
- (C) 2003-2015 Daniel J. Berger, All Rights Reserved
68
-
69
- = Warranty
70
- This package is provided "as is" and without any express or
71
- implied warranties, including, without limitation, the implied
72
- warranties of merchantability and fitness for a particular purpose.
73
-
74
- = Author
75
- Daniel J. Berger