linux-kstat 0.1.3-universal-linux → 0.2.0-universal-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGES +9 -0
- data/MANIFEST +3 -1
- data/README +11 -2
- data/Rakefile +7 -12
- data/certs/djberg96_pub.pem +26 -0
- data/lib/linux-kstat.rb +1 -0
- data/lib/linux/kstat.rb +1 -1
- data/linux-kstat.gemspec +4 -3
- data/spec/linux_kstat_spec.rb +34 -0
- metadata +45 -13
- metadata.gz.sig +0 -0
- data/test/test_linux_kstat.rb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 30333c110611fbbf428e9807d60a29fb331dce1e72adf0b79f7814299447ab7d
|
4
|
+
data.tar.gz: f72b8e41c0469d9cb6c84ad7cd200e599e0a019d842b7632ee3c4dfd46552002
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ade1f8ded0b205c64c293d0fde6d28ca8507ce676ec68a84e302589fa63ec2640221f1747a6a0e3fc9375733208b76eb080795f0626c6f49fc6b3c6db4a470d5
|
7
|
+
data.tar.gz: fed3ad9149fec9d2b02efdffdf3654b83e549748d7ed9104cb3e66d24ac94049a31c9174c5933c51deaad2d36d97ad4403425c6ac9a3aac9281dfbe1851a24cb
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
ADDED
Binary file
|
data/CHANGES
CHANGED
@@ -1,3 +1,12 @@
|
|
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
|
+
|
1
10
|
= 0.1.3 - 18-Dec-2014
|
2
11
|
* Now properly ignores blank lines. Thanks go to "onlinehead" for the patch.
|
3
12
|
|
data/MANIFEST
CHANGED
data/README
CHANGED
@@ -4,7 +4,16 @@
|
|
4
4
|
= Installation
|
5
5
|
gem install linux-kstat
|
6
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
|
+
|
7
15
|
= Synopsis
|
16
|
+
# require 'linux-kstat' will also work
|
8
17
|
require 'linux/kstat'
|
9
18
|
|
10
19
|
kstat = Linux::Kstat.new
|
@@ -28,10 +37,10 @@
|
|
28
37
|
http://www.github.com/djberg96/linux-kstat
|
29
38
|
|
30
39
|
= License
|
31
|
-
|
40
|
+
Apache 2.0
|
32
41
|
|
33
42
|
= Copyright
|
34
|
-
(C) 2003-
|
43
|
+
(C) 2003-2018 Daniel J. Berger
|
35
44
|
All Rights Reserved.`
|
36
45
|
|
37
46
|
= Warranty
|
data/Rakefile
CHANGED
@@ -1,19 +1,16 @@
|
|
1
1
|
require 'rake'
|
2
2
|
require 'rake/clean'
|
3
|
-
require '
|
3
|
+
require 'rspec/core/rake_task'
|
4
4
|
|
5
5
|
CLEAN.include('**/*.gem', '**/*.rbc')
|
6
6
|
|
7
7
|
namespace :gem do
|
8
8
|
desc 'Build the linux-kstat gem'
|
9
9
|
task :create => [:clean] do
|
10
|
+
require 'rubygems/package'
|
10
11
|
spec = eval(IO.read('linux-kstat.gemspec'))
|
11
|
-
|
12
|
-
|
13
|
-
else
|
14
|
-
require 'rubygems/package'
|
15
|
-
Gem::Package.build(spec)
|
16
|
-
end
|
12
|
+
spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
|
13
|
+
Gem::Package.build(spec, true)
|
17
14
|
end
|
18
15
|
|
19
16
|
desc "Install the linux-kstat gem"
|
@@ -27,10 +24,8 @@ namespace :gem do
|
|
27
24
|
end
|
28
25
|
end
|
29
26
|
|
30
|
-
|
31
|
-
|
32
|
-
t.warning = true
|
33
|
-
t.verbose = true
|
27
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
28
|
+
t.pattern = ['spec/*.rb']
|
34
29
|
end
|
35
30
|
|
36
|
-
task :default => :
|
31
|
+
task :default => :spec
|
@@ -0,0 +1,26 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIEcDCCAtigAwIBAgIBATANBgkqhkiG9w0BAQsFADA/MREwDwYDVQQDDAhkamJl
|
3
|
+
cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
|
4
|
+
MB4XDTE4MDIxOTIzMjIxMloXDTI4MDIxNzIzMjIxMlowPzERMA8GA1UEAwwIZGpi
|
5
|
+
ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
6
|
+
bTCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAOFYobQ3ovXNC4RexrdP
|
7
|
+
malr3eyK6lvQuS5DOQpHQrT3sRbrhAy5c2effNmznnUzDDGnHs+ZKkAeVmUDIi+K
|
8
|
+
lfXjV8uPEkLMXUpDndg9rbmQmfie07ixCdE9JYRPwfMTcE+jbtUyZqEUIg7XYmuJ
|
9
|
+
j28bgsq7I9SMOPS9I+3DiEK50NzGd1ixA+RW8yfApC0jU6KkBQBekETvgQ2OOEH+
|
10
|
+
RwoQqLQ2OpujQsmiofRyvpm3i8DNaQ5Awx7dnCrX9M98KxKHrBuAGARUQl6xh7nU
|
11
|
+
vebWtf6p348oBopTwav0fulZ7zF54B0zVWUTBwHP4q9ulOfHYjqUUfu6NixtNisd
|
12
|
+
Qv4Dp82Qi12aeTd4KGBlbnNHSM+SENKlOydE3+ROEUHK+G6LjccwxBHtFMCjCjaD
|
13
|
+
PAH4f+RtfeuBFUJDzQKrM4dfosVHnAoILL4jv4rJNDvkdj7TD2qF1MZblbhc2R5W
|
14
|
+
Ap4PN2gtzmPAyAe1PXf6dT/Jd2b4GNgxYXLCDOufZDviLQIDAQABo3cwdTAJBgNV
|
15
|
+
HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUhSCp+aIknYPSqLCGAaPvJN4n
|
16
|
+
BZYwHQYDVR0RBBYwFIESZGpiZXJnOTZAZ21haWwuY29tMB0GA1UdEgQWMBSBEmRq
|
17
|
+
YmVyZzk2QGdtYWlsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAQCx5R3MfmTTZAd9+
|
18
|
+
RjqLjSzoaFEnqrhZCpuHzY9xEHmSldwHlzwLy60i4CHP7GySmlzTNZNJmPEG0ev5
|
19
|
+
YGXeRygkbN0x2pvCPdXHwcU4POTlM2JDntLIjWxNkOI9l9QNixuBrliqQ7UCMRkz
|
20
|
+
z+2K66CGGps2pGEPYU1hp0vjn4bQOyM1tPx5GothXvY5E8nd5mWuBjl3EmDLSIeC
|
21
|
+
AEA054SX5fumB3x83fLXQMl4Yw9nje/d8PkJgOUJOfCi5+P2I/YJ5YhjHpozvspN
|
22
|
+
cphsPbIxhkkKY+8YKXQRoHZPNuu0QdMHH6gvYTdjLmz9s4MICkp0Kg5UmWL96oCR
|
23
|
+
IZqb0JCjioPrrG3n/WV/ix5rPQ9MffHVPDFRD4wlbazwYn+A+KB0TxXJndHY9e6x
|
24
|
+
u7vZCyU93PFHpp/w270tu8VbayZSbmxF/oCsRuzWD0+xVsgLejqfWBbyGqwis995
|
25
|
+
p1I1Aujksa9wuoPhNNl8J4zKV1YtYorUDA44xq1iJEUE+ChB
|
26
|
+
-----END CERTIFICATE-----
|
data/lib/linux-kstat.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require_relative 'linux/kstat'
|
data/lib/linux/kstat.rb
CHANGED
data/linux-kstat.gemspec
CHANGED
@@ -3,8 +3,8 @@ require 'rbconfig'
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.name = 'linux-kstat'
|
6
|
-
gem.version = '0.
|
7
|
-
gem.license = '
|
6
|
+
gem.version = '0.2.0'
|
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')
|
@@ -12,10 +12,11 @@ Gem::Specification.new do |gem|
|
|
12
12
|
gem.summary = 'Ruby interface for Linux kernel stats in /proc/stat'
|
13
13
|
gem.test_files = Dir['test/test*']
|
14
14
|
gem.files = Dir['**/*'].reject{ |f| f.include?('git') }
|
15
|
+
gem.cert_chain = ['certs/djberg96_pub.pem']
|
15
16
|
|
16
17
|
gem.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
|
17
18
|
|
18
|
-
gem.add_development_dependency('
|
19
|
+
gem.add_development_dependency('rspec')
|
19
20
|
|
20
21
|
gem.description = <<-EOF
|
21
22
|
The linux-kstat library provides a hash style interface for reading
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#######################################################################
|
2
|
+
# linux_kstat_spec.rb
|
3
|
+
#
|
4
|
+
# Test suite for the linux-kstat library.
|
5
|
+
#######################################################################
|
6
|
+
require 'rspec'
|
7
|
+
require 'linux/kstat'
|
8
|
+
|
9
|
+
describe Linux::Kstat do
|
10
|
+
let(:kstat){ Linux::Kstat.new }
|
11
|
+
|
12
|
+
context "constants" do
|
13
|
+
it "defines a version constant that is set to the expected value" do
|
14
|
+
expect(Linux::Kstat::VERSION).to eql('0.2.0')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context "hash access" do
|
19
|
+
it "allows hash style key access" do
|
20
|
+
expect(subject).to respond_to(:[])
|
21
|
+
expect{ subject[:cpu] }.to_not raise_error
|
22
|
+
end
|
23
|
+
|
24
|
+
it "contains the expected keys and value types" do
|
25
|
+
expect(kstat[:cpu]).to be_kind_of(Hash)
|
26
|
+
expect(kstat[:btime]).to be_kind_of(Numeric)
|
27
|
+
expect(kstat[:intr]).to be_kind_of(Array)
|
28
|
+
end
|
29
|
+
|
30
|
+
it "does not allow key assignment" do
|
31
|
+
expect{ subject[:cpu] = 'test' }.to raise_error(NoMethodError)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
metadata
CHANGED
@@ -1,29 +1,56 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linux-kstat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: universal-linux
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIEcDCCAtigAwIBAgIBATANBgkqhkiG9w0BAQsFADA/MREwDwYDVQQDDAhkamJl
|
14
|
+
cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
|
15
|
+
MB4XDTE4MDIxOTIzMjIxMloXDTI4MDIxNzIzMjIxMlowPzERMA8GA1UEAwwIZGpi
|
16
|
+
ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
17
|
+
bTCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAOFYobQ3ovXNC4RexrdP
|
18
|
+
malr3eyK6lvQuS5DOQpHQrT3sRbrhAy5c2effNmznnUzDDGnHs+ZKkAeVmUDIi+K
|
19
|
+
lfXjV8uPEkLMXUpDndg9rbmQmfie07ixCdE9JYRPwfMTcE+jbtUyZqEUIg7XYmuJ
|
20
|
+
j28bgsq7I9SMOPS9I+3DiEK50NzGd1ixA+RW8yf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pp/w270tu8VbayZSbmxF/oCsRuzWD0+xVsgLejqfWBbyGqwis995
|
36
|
+
p1I1Aujksa9wuoPhNNl8J4zKV1YtYorUDA44xq1iJEUE+ChB
|
37
|
+
-----END CERTIFICATE-----
|
38
|
+
date: 2018-02-19 00:00:00.000000000 Z
|
12
39
|
dependencies:
|
13
40
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
41
|
+
name: rspec
|
15
42
|
requirement: !ruby/object:Gem::Requirement
|
16
43
|
requirements:
|
17
44
|
- - ">="
|
18
45
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
46
|
+
version: '0'
|
20
47
|
type: :development
|
21
48
|
prerelease: false
|
22
49
|
version_requirements: !ruby/object:Gem::Requirement
|
23
50
|
requirements:
|
24
51
|
- - ">="
|
25
52
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
53
|
+
version: '0'
|
27
54
|
description: |2
|
28
55
|
The linux-kstat library provides a hash style interface for reading
|
29
56
|
Linux kernel statistics read out of /proc/stat.
|
@@ -36,15 +63,21 @@ extra_rdoc_files:
|
|
36
63
|
- MANIFEST
|
37
64
|
files:
|
38
65
|
- CHANGES
|
66
|
+
- certs
|
67
|
+
- certs/djberg96_pub.pem
|
39
68
|
- MANIFEST
|
40
|
-
-
|
41
|
-
-
|
69
|
+
- lib
|
70
|
+
- lib/linux
|
42
71
|
- lib/linux/kstat.rb
|
72
|
+
- lib/linux-kstat.rb
|
73
|
+
- Rakefile
|
74
|
+
- spec
|
75
|
+
- spec/linux_kstat_spec.rb
|
43
76
|
- linux-kstat.gemspec
|
44
|
-
-
|
77
|
+
- README
|
45
78
|
homepage: https://github.com/djberg96/linux-kstat
|
46
79
|
licenses:
|
47
|
-
-
|
80
|
+
- Apache 2.0
|
48
81
|
metadata: {}
|
49
82
|
post_install_message:
|
50
83
|
rdoc_options: []
|
@@ -62,9 +95,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
95
|
version: '0'
|
63
96
|
requirements: []
|
64
97
|
rubyforge_project:
|
65
|
-
rubygems_version: 2.
|
98
|
+
rubygems_version: 2.7.6
|
66
99
|
signing_key:
|
67
100
|
specification_version: 4
|
68
101
|
summary: Ruby interface for Linux kernel stats in /proc/stat
|
69
|
-
test_files:
|
70
|
-
- test/test_linux_kstat.rb
|
102
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|
data/test/test_linux_kstat.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
#######################################################################
|
2
|
-
# test_linux_kstat.rb
|
3
|
-
#
|
4
|
-
# Test suite for the linux-kstat library.
|
5
|
-
#######################################################################
|
6
|
-
require 'test-unit'
|
7
|
-
require 'linux/kstat'
|
8
|
-
|
9
|
-
class TC_Linux_Kstat < Test::Unit::TestCase
|
10
|
-
def setup
|
11
|
-
@kstat = Linux::Kstat.new
|
12
|
-
end
|
13
|
-
|
14
|
-
test "version constant is set to the expected value" do
|
15
|
-
assert_equal('0.1.3', Linux::Kstat::VERSION)
|
16
|
-
end
|
17
|
-
|
18
|
-
test "kstat object can be accessed like a hash" do
|
19
|
-
assert_respond_to(@kstat, :[])
|
20
|
-
assert_nothing_raised{ @kstat[:cpu] }
|
21
|
-
end
|
22
|
-
|
23
|
-
test "kstat object contains expected keys" do
|
24
|
-
assert_kind_of(Hash, @kstat[:cpu])
|
25
|
-
assert_kind_of(Numeric, @kstat[:btime])
|
26
|
-
assert_kind_of(Array, @kstat[:intr])
|
27
|
-
end
|
28
|
-
|
29
|
-
test "values cannot be assigned to keys" do
|
30
|
-
assert_raise(NoMethodError){ @kstat[:cpu] = 'test' }
|
31
|
-
end
|
32
|
-
|
33
|
-
def teardown
|
34
|
-
@kstat = nil
|
35
|
-
end
|
36
|
-
end
|