sys-cpu 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sys-cpu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
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: 2021-01-28 00:00:00.000000000 Z
38
+ date: 2022-06-10 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: ffi
@@ -65,6 +65,20 @@ dependencies:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
+ - !ruby/object:Gem::Dependency
69
+ name: rubocop
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ type: :development
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
68
82
  - !ruby/object:Gem::Dependency
69
83
  name: rspec
70
84
  requirement: !ruby/object:Gem::Requirement
@@ -79,6 +93,20 @@ dependencies:
79
93
  - - "~>"
80
94
  - !ruby/object:Gem::Version
81
95
  version: '3.9'
96
+ - !ruby/object:Gem::Dependency
97
+ name: rubocop-rspec
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
82
110
  description: |2
83
111
  The sys-cpu library provides an interface for gathering information
84
112
  about your system's processor(s). Information includes speed, type,
@@ -95,9 +123,9 @@ files:
95
123
  - README.md
96
124
  - Rakefile
97
125
  - certs/djberg96_pub.pem
98
- - doc/bsd.txt
126
+ - doc/bsd.md
99
127
  - doc/hpux.txt
100
- - doc/linux.txt
128
+ - doc/linux.md
101
129
  - doc/sunos.txt
102
130
  - doc/windows.txt
103
131
  - examples/example_sys_cpu_bsd.rb
@@ -116,7 +144,7 @@ files:
116
144
  - spec/sys_cpu_bsd_spec.rb
117
145
  - spec/sys_cpu_hpux_spec.rb
118
146
  - spec/sys_cpu_linux_spec.rb
119
- - spec/sys_cpu_spec.rb
147
+ - spec/sys_cpu_shared.rb
120
148
  - spec/sys_cpu_sunos_spec.rb
121
149
  - spec/sys_cpu_windows_spec.rb
122
150
  - sys-cpu.gemspec
@@ -126,11 +154,11 @@ licenses:
126
154
  metadata:
127
155
  homepage_uri: https://github.com/djberg96/sys-cpu
128
156
  bug_tracker_uri: https://github.com/djberg96/sys-cpu/issues
129
- changelog_uri: https://github.com/djberg96/sys-cpu/blob/ffi/CHANGES.md
157
+ changelog_uri: https://github.com/djberg96/sys-cpu/blob/main/CHANGES.md
130
158
  documentation_uri: https://github.com/djberg96/sys-cpu/wiki
131
159
  source_code_uri: https://github.com/djberg96/sys-cpu
132
160
  wiki_uri: https://github.com/djberg96/sys-cpu/wiki
133
- post_install_message:
161
+ post_install_message:
134
162
  rdoc_options: []
135
163
  require_paths:
136
164
  - lib
@@ -145,15 +173,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
173
  - !ruby/object:Gem::Version
146
174
  version: '0'
147
175
  requirements: []
148
- rubygems_version: 3.0.3
149
- signing_key:
176
+ rubygems_version: 3.3.7
177
+ signing_key:
150
178
  specification_version: 4
151
179
  summary: A Ruby interface for providing CPU information
152
180
  test_files:
153
181
  - spec/spec_helper.rb
154
182
  - spec/sys_cpu_bsd_spec.rb
155
- - spec/sys_cpu_sunos_spec.rb
156
183
  - spec/sys_cpu_hpux_spec.rb
157
184
  - spec/sys_cpu_linux_spec.rb
185
+ - spec/sys_cpu_shared.rb
186
+ - spec/sys_cpu_sunos_spec.rb
158
187
  - spec/sys_cpu_windows_spec.rb
159
- - spec/sys_cpu_spec.rb
metadata.gz.sig CHANGED
Binary file
data/doc/bsd.txt DELETED
@@ -1,49 +0,0 @@
1
- == Description
2
- Sys::CPU - An interface for various cpu statistics
3
-
4
- == Synopsis
5
- require "sys/cpu"
6
- include Sys
7
-
8
- # BSD and OS X
9
- puts "Architecture: " + CPU.architecture
10
- puts "Machine: " + CPU.machine
11
- puts "Mhz: " + CPU.cpu_freq.to_s
12
- puts "Number of cpu's on this system: " + CPU.num_cpu.to_s
13
- puts "CPU model: " + CPU.model
14
- puts "Load averages: " + CPU.load_avg.join(", ")
15
-
16
- == Constants
17
- VERSION
18
- Returns the current version number for this package.
19
-
20
- == Class Methods
21
- CPU.architecture
22
- Returns the cpu's architecture.
23
-
24
- CPU.freq
25
- Returns an integer indicating the speed (i.e. frequency in Mhz) of
26
- the cpu.
27
-
28
- Not supported on OS X.
29
-
30
- CPU.load_avg
31
- Returns an array of three floats indicating the 1, 5 and 15 minute load
32
- average.
33
-
34
- CPU.machine
35
- Returns the class of cpu (probably identical to the architecture).
36
-
37
- CPU.model
38
- Returns a string indicating the cpu model.
39
-
40
- CPU.num_cpu
41
- Returns an integer indicating the number of cpu's on the system.
42
-
43
- == Error Classes
44
- CPU::Error < StandardError
45
- Raised is response to internal function errors, usually relating to an
46
- invalid cpu number.
47
-
48
- == More Information
49
- See the README file for more information.
data/doc/linux.txt DELETED
@@ -1,41 +0,0 @@
1
- == Description
2
- Sys::CPU - An interface for various cpu statistics
3
-
4
- == Synopsis
5
- require "sys/cpu"
6
- include Sys
7
-
8
- CPU.processors{ |cs|
9
- cs.members.each{ |m|
10
- puts "#{m}: " + cs[m].to_s
11
- }
12
- }
13
-
14
- CPU.bogomips(1) # -> returns bogomips for cpu #2
15
-
16
- == Notes
17
- Portions of this documentation built dynamically
18
-
19
- == Constants
20
- VERSION
21
- Returns the current version number for this package as a String.
22
-
23
- == Class Methods
24
- CPU.load_avg
25
- Returns an array of three floats indicating the 1, 5 and 15 minute load
26
- average.
27
-
28
- CPU.cpu_stats
29
- Returns a hash, with the cpu number as the key and an array as the value.
30
- The array contains the number of seconds that the system spent in
31
- user mode, user mode with low priority (nice), system mode, and the
32
- idle task, respectively, for that cpu.
33
-
34
- CPU.processors{ |cpu struct| block }
35
- Calls the block for each processor on your system, passing a CPUStruct as the
36
- parameter.
37
-
38
- The exact members of the CPUStruct are the same as the class method names, except
39
- for CPU.processors (although you may optionally omit the "?" when referring to a
40
- struct member). These were determined when you installed this package because they
41
- vary from one chip architecture to another.