linux-kstat 0.2.0-universal-linux → 0.2.5-universal-linux

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30333c110611fbbf428e9807d60a29fb331dce1e72adf0b79f7814299447ab7d
4
- data.tar.gz: f72b8e41c0469d9cb6c84ad7cd200e599e0a019d842b7632ee3c4dfd46552002
3
+ metadata.gz: 80a62500cfed50f3ac32adae6d9f5a01ab616b67cb618ce988a49888a83e1344
4
+ data.tar.gz: 9a630c362757e0a56b67e8b75175655fdb690dea782258aaa1c5dd8a187d5bc5
5
5
  SHA512:
6
- metadata.gz: ade1f8ded0b205c64c293d0fde6d28ca8507ce676ec68a84e302589fa63ec2640221f1747a6a0e3fc9375733208b76eb080795f0626c6f49fc6b3c6db4a470d5
7
- data.tar.gz: fed3ad9149fec9d2b02efdffdf3654b83e549748d7ed9104cb3e66d24ac94049a31c9174c5933c51deaad2d36d97ad4403425c6ac9a3aac9281dfbe1851a24cb
6
+ metadata.gz: 997617497fc955a5ee149d9b3a9941b04645461ecd6e79f91cc296d05a9f92c228d627db037564837a13e19fe54d725bb1db99b59cadd2918b5a76e5e89955cd
7
+ data.tar.gz: 93e6c6a3185e9c0b899c97a12641c76e60aabe7c087c27e47f4631804ec17463a236998e21947a6f2a39a5761491a92fd13307b933549d38597022d7874516e1
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -0,0 +1,38 @@
1
+ ## 0.2.5 - 31-Oct-2020
2
+ * Switched from rdoc to markdown since github wasn't rendering rdoc properly.
3
+ * Minor gemspec updates.
4
+
5
+ ## 0.2.4 - 3-Apr-2020
6
+ * Added a LICENSE file as per the Apache license requirements.
7
+
8
+ ## 0.2.3 - 8-Dec-2019
9
+ * Added .rdoc extension to the README, CHANGES and MANIFEST files.
10
+
11
+ ## 0.2.2 - 5-Mar-2019
12
+ * Added the `steal`, `guest` and `guest_nice` attributes for cpu stats.
13
+
14
+ ## 0.2.1 - 25-Jan-2019
15
+ * Fixed license name (missing hyphen).
16
+ * Added metadata to the gemspec.
17
+ * Updated cert, should be good for about 10 years.
18
+
19
+ ## 0.2.0 - 19-Feb-2018
20
+ * Switched license to Apache 2.0.
21
+ * Added a linux-kstat.rb file for convenience.
22
+ * Rakefile now assumes rubygems 2.x.
23
+ * Tests switched to use rspec and development dependencies updated.
24
+ * VERSION constant is now frozen.
25
+ * Some doc updates in the README for bundler.
26
+ * This gem is now signed.
27
+
28
+ ## 0.1.3 - 18-Dec-2014
29
+ * Now properly ignores blank lines. Thanks go to "onlinehead" for the patch.
30
+
31
+ ## 0.1.2 - 2-Nov-2014
32
+ * Updates to the gemspec and Rakefile.
33
+
34
+ ## 0.1.1 - 20-May-2011
35
+ * Set the spec platform to 'universal-linux'.
36
+
37
+ ## 0.1.0 - 10-Feb-2011
38
+ * Initial release.
data/LICENSE ADDED
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
@@ -1,6 +1,6 @@
1
- * CHANGES
2
- * README
3
- * MANIFEST
1
+ * CHANGES.md
2
+ * README.md
3
+ * MANIFEST.md
4
4
  * Rakefile
5
5
  * linux-kstat.gemspec
6
6
  * certs/djberg96_pub.pem
@@ -0,0 +1,63 @@
1
+ ## Description
2
+
3
+ A Ruby library for gathering Linux kernel statistics out of `/proc/stat`.
4
+
5
+ ## Installation
6
+
7
+ `gem install linux-kstat`
8
+
9
+ ### Bundler
10
+
11
+ If you have trouble install this gem via bundler, please try this:
12
+
13
+ `bundle config specific_platform true`
14
+
15
+ Then attempt to install again.
16
+
17
+ ## Synopsis
18
+ ```
19
+ # require 'linux-kstat' will also work
20
+ require 'linux/kstat'
21
+
22
+ kstat = Linux::Kstat.new
23
+
24
+ p kstat[:cpu]
25
+ p kstat[:procs_running]
26
+ ```
27
+
28
+ ## Details
29
+
30
+ The values for most of the keys are a single numeric value. However, in the
31
+ case of "cpu" keys, the result is a 7 element hash of numeric values. In
32
+ the case of the "intr" key, the value is an array containing the list of
33
+ interrupts.
34
+
35
+ ## Information about /proc/stat
36
+
37
+ See http://www.linuxhowtos.org/System/procstat.htm for more information
38
+ about the meaning of each of the fields.
39
+
40
+ ## Known Bugs
41
+
42
+ None known. Please report any bugs on the github project page.
43
+
44
+ http://www.github.com/djberg96/linux-kstat
45
+
46
+ ## License
47
+
48
+ Apache-2.0
49
+
50
+ ## Copyright
51
+
52
+ (C) 2003-2020 Daniel J. Berger
53
+ All Rights Reserved.`
54
+
55
+ ## Warranty
56
+
57
+ This package is provided "as is" and without any express or
58
+ implied warranties, including, without limitation, the implied
59
+ warranties of merchantability and fitness for a particular purpose.
60
+
61
+ ## Author
62
+
63
+ Daniel J. Berger
@@ -1,26 +1,26 @@
1
1
  -----BEGIN CERTIF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2yzv/7idQHLJJq
13
+ 74BMnx0FIq6fCpu5slAipvxZ3ZkZpEXZFr3cIBtO1gFvQWW7E/Y3ijliWJS1GQFq
14
+ 058qERadHGu1yu1dojmFRo6W2KZvY9al2yIlbkpDrD5MYQIDAQABo3cwdTAJBgNV
15
+ HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUFZsMapgzJimzsbaBG2Tm8j5e
16
+ AzgwHQYDVR0RBBYwFIESZGpiZXJnOTZAZ21haWwuY29tMB0GA1UdEgQWMBSBEmRq
17
+ YmVyZzk2QGdtYWlsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAW2tnYixXQtKxgGXq
18
+ /3iSWG2bLwvxS4go3srO+aRXZHrFUMlJ5W0mCxl03aazxxKTsVVpZD8QZxvK91OQ
19
+ h9zr9JBYqCLcCVbr8SkmYCi/laxIZxsNE5YI8cC8vvlLI7AMgSfPSnn/Epq1GjGY
20
+ 6L1iRcEDtanGCIvjqlCXO9+BmsnCfEVehqZkQHeYczA03tpOWb6pon2wzvMKSsKH
21
+ ks0ApVdstSLz1kzzAqem/uHdG9FyXdbTAwH1G4ZPv69sQAFAOCgAqYmdnzedsQtE
22
+ 1LQfaQrx0twO+CZJPcRLEESjq8ScQxWRRkfuh2VeR7cEU7L7KqT10mtUwrvw7APf
23
+ DYoeCY9KyjIBjQXfbj2ke5u1hZj94Fsq9FfbEQg8ygCgwThnmkTrrKEiMSs3alYR
24
+ ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
25
+ WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
26
26
  -----END CERTIFICATE-----
@@ -7,7 +7,7 @@ module Linux
7
7
  extend Forwardable
8
8
 
9
9
  # The version of the linux-kstat library
10
- VERSION = '0.2.0'.freeze
10
+ VERSION = '0.2.5'.freeze
11
11
 
12
12
  # :stopdoc:
13
13
 
@@ -26,13 +26,16 @@ module Linux
26
26
  # kstat = Linux::Kstat.new
27
27
  #
28
28
  # kstat[:cpu] => {
29
- # :idle => 250713454,
30
- # :iowait => 2745691,
31
- # :irq => 39717,
32
- # :softirq => 31323,
33
- # :system => 1881655,
34
- # :nice => 117158,
35
- # :user => 7137418
29
+ # :idle => 250713454,
30
+ # :iowait => 2745691,
31
+ # :irq => 39717,
32
+ # :softirq => 31323,
33
+ # :system => 1881655,
34
+ # :nice => 117158,
35
+ # :user => 7137418,
36
+ # :steal => 0,
37
+ # :guest => 1162987977,
38
+ # :guest_nice => 0
36
39
  # }
37
40
  #
38
41
  # kstat[:processes] # => 1299560
@@ -54,13 +57,16 @@ module Linux
54
57
  unless info.empty?
55
58
  if info.first =~ /^cpu/i
56
59
  hash[info.first.to_sym] = {
57
- :user => info[1].to_i,
58
- :nice => info[2].to_i,
59
- :system => info[3].to_i,
60
- :idle => info[4].to_i,
61
- :iowait => info[5].to_i,
62
- :irq => info[6].to_i,
63
- :softirq => info[7].to_i
60
+ :user => info[1].to_i,
61
+ :nice => info[2].to_i,
62
+ :system => info[3].to_i,
63
+ :idle => info[4].to_i,
64
+ :iowait => info[5].to_i,
65
+ :irq => info[6].to_i,
66
+ :softirq => info[7].to_i,
67
+ :steal => info[8].to_i,
68
+ :guest => info[9].to_i,
69
+ :guest_nice => info[10].to_i
64
70
  }
65
71
  else
66
72
  if info.size > 2
@@ -3,21 +3,28 @@ require 'rbconfig'
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = 'linux-kstat'
6
- gem.version = '0.2.0'
7
- gem.license = 'Apache 2.0'
6
+ gem.version = '0.2.5'
7
+ gem.license = 'Apache-2.0'
8
8
  gem.author = 'Daniel J. Berger'
9
9
  gem.email = 'djberg96@gmail.com'
10
10
  gem.platform = Gem::Platform.new('universal-linux')
11
11
  gem.homepage = 'https://github.com/djberg96/linux-kstat'
12
12
  gem.summary = 'Ruby interface for Linux kernel stats in /proc/stat'
13
- gem.test_files = Dir['test/test*']
13
+ gem.test_files = Dir['spec/*_spec.rb']
14
14
  gem.files = Dir['**/*'].reject{ |f| f.include?('git') }
15
15
  gem.cert_chain = ['certs/djberg96_pub.pem']
16
16
 
17
- gem.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
18
-
19
17
  gem.add_development_dependency('rspec')
20
18
 
19
+ gem.metadata = {
20
+ 'homepage_uri' => 'https://github.com/djberg96/linux-kstat',
21
+ 'bug_tracker_uri' => 'https://github.com/djberg96/linux-kstat/issues',
22
+ 'changelog_uri' => 'https://github.com/djberg96/linux-kstat/blob/master/CHANGES',
23
+ 'documentation_uri' => 'https://github.com/djberg96/linux-kstat/wiki',
24
+ 'source_code_uri' => 'https://github.com/djberg96/linux-kstat',
25
+ 'wiki_uri' => 'https://github.com/djberg96/linux-kstat/wiki'
26
+ }
27
+
21
28
  gem.description = <<-EOF
22
29
  The linux-kstat library provides a hash style interface for reading
23
30
  Linux kernel statistics read out of /proc/stat.
@@ -11,7 +11,8 @@ describe Linux::Kstat do
11
11
 
12
12
  context "constants" do
13
13
  it "defines a version constant that is set to the expected value" do
14
- expect(Linux::Kstat::VERSION).to eql('0.2.0')
14
+ expect(Linux::Kstat::VERSION).to eql('0.2.5')
15
+ expect(Linux::Kstat::VERSION).to be_frozen
15
16
  end
16
17
  end
17
18
 
@@ -19,6 +20,7 @@ describe Linux::Kstat do
19
20
  it "allows hash style key access" do
20
21
  expect(subject).to respond_to(:[])
21
22
  expect{ subject[:cpu] }.to_not raise_error
23
+ expect(subject[:cpu].keys.size).to eql(10)
22
24
  end
23
25
 
24
26
  it "contains the expected keys and value types" do
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linux-kstat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.5
5
5
  platform: universal-linux
6
6
  authors:
7
7
  - Daniel J. Berger
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - |
12
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H1R9u2I3n3SAyFF2yzv/7idQHLJJq
24
+ 74BMnx0FIq6fCpu5slAipvxZ3ZkZpEXZFr3cIBtO1gFvQWW7E/Y3ijliWJS1GQFq
25
+ 058qERadHGu1yu1dojmFRo6W2KZvY9al2yIlbkpDrD5MYQIDAQABo3cwdTAJBgNV
26
+ HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUFZsMapgzJimzsbaBG2Tm8j5e
27
+ AzgwHQYDVR0RBBYwFIESZGpiZXJnOTZAZ21haWwuY29tMB0GA1UdEgQWMBSBEmRq
28
+ YmVyZzk2QGdtYWlsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAW2tnYixXQtKxgGXq
29
+ /3iSWG2bLwvxS4go3srO+aRXZHrFUMlJ5W0mCxl03aazxxKTsVVpZD8QZxvK91OQ
30
+ h9zr9JBYqCLcCVbr8SkmYCi/laxIZxsNE5YI8cC8vvlLI7AMgSfPSnn/Epq1GjGY
31
+ 6L1iRcEDtanGCIvjqlCXO9+BmsnCfEVehqZkQHeYczA03tpOWb6pon2wzvMKSsKH
32
+ ks0ApVdstSLz1kzzAqem/uHdG9FyXdbTAwH1G4ZPv69sQAFAOCgAqYmdnzedsQtE
33
+ 1LQfaQrx0twO+CZJPcRLEESjq8ScQxWRRkfuh2VeR7cEU7L7KqT10mtUwrvw7APf
34
+ DYoeCY9KyjIBjQXfbj2ke5u1hZj94Fsq9FfbEQg8ygCgwThnmkTrrKEiMSs3alYR
35
+ ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
36
+ WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
37
37
  -----END CERTIFICATE-----
38
- date: 2018-02-19 00:00:00.000000000 Z
38
+ date:
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rspec
@@ -57,29 +57,33 @@ description: |2
57
57
  email: djberg96@gmail.com
58
58
  executables: []
59
59
  extensions: []
60
- extra_rdoc_files:
61
- - README
62
- - CHANGES
63
- - MANIFEST
60
+ extra_rdoc_files: []
64
61
  files:
65
- - CHANGES
66
- - certs
67
- - certs/djberg96_pub.pem
68
- - MANIFEST
69
- - lib
70
- - lib/linux
71
- - lib/linux/kstat.rb
72
- - lib/linux-kstat.rb
73
62
  - Rakefile
74
63
  - spec
75
64
  - spec/linux_kstat_spec.rb
65
+ - lib
66
+ - lib/linux-kstat.rb
67
+ - lib/linux
68
+ - lib/linux/kstat.rb
69
+ - certs
70
+ - certs/djberg96_pub.pem
71
+ - LICENSE
72
+ - MANIFEST.md
73
+ - README.md
74
+ - CHANGES.md
76
75
  - linux-kstat.gemspec
77
- - README
78
76
  homepage: https://github.com/djberg96/linux-kstat
79
77
  licenses:
80
- - Apache 2.0
81
- metadata: {}
82
- post_install_message:
78
+ - Apache-2.0
79
+ metadata:
80
+ homepage_uri: https://github.com/djberg96/linux-kstat
81
+ bug_tracker_uri: https://github.com/djberg96/linux-kstat/issues
82
+ changelog_uri: https://github.com/djberg96/linux-kstat/blob/master/CHANGES
83
+ documentation_uri: https://github.com/djberg96/linux-kstat/wiki
84
+ source_code_uri: https://github.com/djberg96/linux-kstat
85
+ wiki_uri: https://github.com/djberg96/linux-kstat/wiki
86
+ post_install_message:
83
87
  rdoc_options: []
84
88
  require_paths:
85
89
  - lib
@@ -94,9 +98,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
98
  - !ruby/object:Gem::Version
95
99
  version: '0'
96
100
  requirements: []
97
- rubyforge_project:
98
- rubygems_version: 2.7.6
99
- signing_key:
101
+ rubygems_version: 3.0.3
102
+ signing_key:
100
103
  specification_version: 4
101
104
  summary: Ruby interface for Linux kernel stats in /proc/stat
102
- test_files: []
105
+ test_files:
106
+ - spec/linux_kstat_spec.rb
metadata.gz.sig CHANGED
Binary file
data/CHANGES DELETED
@@ -1,20 +0,0 @@
1
- = 0.2.0 - 19-Feb-2018
2
- * Switched license to Apache 2.0.
3
- * Added a linux-kstat.rb file for convenience.
4
- * Rakefile now assumes rubygems 2.x.
5
- * Tests switched to use rspec and development dependencies updated.
6
- * VERSION constant is now frozen.
7
- * Some doc updates in the README for bundler.
8
- * This gem is now signed.
9
-
10
- = 0.1.3 - 18-Dec-2014
11
- * Now properly ignores blank lines. Thanks go to "onlinehead" for the patch.
12
-
13
- = 0.1.2 - 2-Nov-2014
14
- * Updates to the gemspec and Rakefile.
15
-
16
- = 0.1.1 - 20-May-2011
17
- * Set the spec platform to 'universal-linux'.
18
-
19
- = 0.1.0 - 10-Feb-2011
20
- * Initial release.
data/README DELETED
@@ -1,52 +0,0 @@
1
- = Description
2
- A Ruby library for gathering Linux kernel statistics out of /proc/stat.
3
-
4
- = Installation
5
- gem install linux-kstat
6
-
7
- = Bundler
8
-
9
- If you have trouble install this gem via bundler, please try this:
10
-
11
- bundle config specific_platform true
12
-
13
- Then attempt to install again.
14
-
15
- = Synopsis
16
- # require 'linux-kstat' will also work
17
- require 'linux/kstat'
18
-
19
- kstat = Linux::Kstat.new
20
-
21
- p kstat[:cpu]
22
- p kstat[:procs_running]
23
-
24
- = Details
25
- The values for most of the keys are a single numeric value. However, in the
26
- case of "cpu" keys, the result is a 7 element hash of numeric values. In
27
- the case of the "intr" key, the value is an array containing the list of
28
- interrupts.
29
-
30
- = Information about /proc/stat
31
- See http://www.linuxhowtos.org/System/procstat.htm for more information
32
- about the meaning of each of the fields.
33
-
34
- = Known Bugs
35
- None known. Please report any bugs on the github project page.
36
-
37
- http://www.github.com/djberg96/linux-kstat
38
-
39
- = License
40
- Apache 2.0
41
-
42
- = Copyright
43
- (C) 2003-2018 Daniel J. Berger
44
- All Rights Reserved.`
45
-
46
- = Warranty
47
- This package is provided "as is" and without any express or
48
- implied warranties, including, without limitation, the implied
49
- warranties of merchantability and fitness for a particular purpose.
50
-
51
- = Author
52
- Daniel J. Berger