sys-cpu 1.0.2 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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: 1.0.2
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -35,7 +35,7 @@ cert_chain:
35
35
  ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
36
36
  WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
37
37
  -----END CERTIFICATE-----
38
- date: 2021-01-25 00:00:00.000000000 Z
38
+ date: 2022-08-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
@@ -108,6 +136,7 @@ files:
108
136
  - install.rb
109
137
  - lib/sys-cpu.rb
110
138
  - lib/sys/cpu.rb
139
+ - lib/sys/darwin/sys/cpu.rb
111
140
  - lib/sys/linux/sys/cpu.rb
112
141
  - lib/sys/unix/sys/cpu.rb
113
142
  - lib/sys/windows/sys/cpu.rb
@@ -115,7 +144,7 @@ files:
115
144
  - spec/sys_cpu_bsd_spec.rb
116
145
  - spec/sys_cpu_hpux_spec.rb
117
146
  - spec/sys_cpu_linux_spec.rb
118
- - spec/sys_cpu_spec.rb
147
+ - spec/sys_cpu_shared.rb
119
148
  - spec/sys_cpu_sunos_spec.rb
120
149
  - spec/sys_cpu_windows_spec.rb
121
150
  - sys-cpu.gemspec
@@ -125,10 +154,11 @@ licenses:
125
154
  metadata:
126
155
  homepage_uri: https://github.com/djberg96/sys-cpu
127
156
  bug_tracker_uri: https://github.com/djberg96/sys-cpu/issues
128
- 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
129
158
  documentation_uri: https://github.com/djberg96/sys-cpu/wiki
130
159
  source_code_uri: https://github.com/djberg96/sys-cpu
131
160
  wiki_uri: https://github.com/djberg96/sys-cpu/wiki
161
+ rubygems_mfa_required: 'true'
132
162
  post_install_message:
133
163
  rdoc_options: []
134
164
  require_paths:
@@ -144,15 +174,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
174
  - !ruby/object:Gem::Version
145
175
  version: '0'
146
176
  requirements: []
147
- rubygems_version: 3.0.3
177
+ rubygems_version: 3.2.32
148
178
  signing_key:
149
179
  specification_version: 4
150
180
  summary: A Ruby interface for providing CPU information
151
181
  test_files:
152
182
  - spec/spec_helper.rb
153
183
  - spec/sys_cpu_bsd_spec.rb
184
+ - spec/sys_cpu_shared.rb
154
185
  - spec/sys_cpu_sunos_spec.rb
155
186
  - spec/sys_cpu_hpux_spec.rb
156
187
  - spec/sys_cpu_linux_spec.rb
157
188
  - spec/sys_cpu_windows_spec.rb
158
- - 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.