sys-proctable 1.0.0-universal-mingw32 → 1.1.0-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -3
- data/CHANGES +367 -357
- data/MANIFEST +33 -34
- data/README +110 -118
- data/Rakefile +215 -218
- data/benchmarks/bench_ps.rb +21 -21
- data/doc/top.txt +46 -46
- data/examples/example_ps.rb +20 -20
- data/lib/sys-proctable.rb +1 -1
- data/lib/sys/proctable/version.rb +6 -6
- data/lib/sys/top.rb +31 -31
- data/lib/windows/sys/proctable.rb +207 -207
- data/sys-proctable.gemspec +40 -40
- data/test/test_sys_proctable_all.rb +98 -87
- data/test/test_sys_proctable_windows.rb +324 -324
- data/test/test_sys_top.rb +65 -46
- metadata +4 -4
- metadata.gz.sig +0 -0
data/test/test_sys_top.rb
CHANGED
@@ -1,46 +1,65 @@
|
|
1
|
-
##############################################################################
|
2
|
-
# test_sys_top.rb
|
3
|
-
#
|
4
|
-
# Test suite for the sys-top library that is included with this distribution.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
require '
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
assert_kind_of(
|
41
|
-
end
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
end
|
1
|
+
##############################################################################
|
2
|
+
# test_sys_top.rb
|
3
|
+
#
|
4
|
+
# Test suite for the sys-top library that is included with this distribution.
|
5
|
+
#
|
6
|
+
# Tests omitted on OSX until I figure out how to get pctcpu information.
|
7
|
+
##############################################################################
|
8
|
+
require 'test-unit'
|
9
|
+
require 'sys/top'
|
10
|
+
|
11
|
+
class TC_Top < Test::Unit::TestCase
|
12
|
+
include Sys
|
13
|
+
|
14
|
+
def setup
|
15
|
+
@osx = RbConfig::CONFIG['host_os'] =~ /darwin/i
|
16
|
+
end
|
17
|
+
|
18
|
+
test "top version" do
|
19
|
+
assert_equal('1.0.4', Top::VERSION)
|
20
|
+
end
|
21
|
+
|
22
|
+
test "top basic functionality" do
|
23
|
+
assert_respond_to(Top, :top)
|
24
|
+
end
|
25
|
+
|
26
|
+
test "top works with no arguments" do
|
27
|
+
omit_if(@osx)
|
28
|
+
assert_nothing_raised{ Top.top }
|
29
|
+
end
|
30
|
+
|
31
|
+
test "top accepts optional arguments" do
|
32
|
+
omit_if(@osx)
|
33
|
+
assert_nothing_raised{ Top.top(5) }
|
34
|
+
assert_nothing_raised{ Top.top(5, 'cmdline') }
|
35
|
+
end
|
36
|
+
|
37
|
+
test "top with no arguments returns expected results" do
|
38
|
+
omit_if(@osx)
|
39
|
+
assert_equal(10, Top.top.length)
|
40
|
+
assert_kind_of(Struct::ProcTableStruct, Top.top.first)
|
41
|
+
end
|
42
|
+
|
43
|
+
test "top with size argument returns expected result" do
|
44
|
+
omit_if(@osx)
|
45
|
+
assert_equal(5, Top.top(5).length)
|
46
|
+
end
|
47
|
+
|
48
|
+
test "top with size and sort_by argument returns expected result" do
|
49
|
+
omit_if(@osx)
|
50
|
+
assert_equal(5, Top.top(5, :cmdline).length)
|
51
|
+
end
|
52
|
+
|
53
|
+
test "top returns an array" do
|
54
|
+
omit_if(@osx)
|
55
|
+
assert_kind_of(Array, Top.top)
|
56
|
+
end
|
57
|
+
|
58
|
+
test "top accepts a maximum of two arguments" do
|
59
|
+
assert_raises(ArgumentError){ Top.top(1, 'foo', 2) }
|
60
|
+
end
|
61
|
+
|
62
|
+
def teardown
|
63
|
+
@osx = nil
|
64
|
+
end
|
65
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sys-proctable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: universal-mingw32
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
|
31
31
|
tGSHgAmcLlkdGgan182qsE/4kKM=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2016-
|
33
|
+
date: 2016-06-27 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: test-unit
|
@@ -90,7 +90,7 @@ files:
|
|
90
90
|
- lib/windows/sys/proctable.rb
|
91
91
|
homepage: http://github.com/djberg96/sys-proctable
|
92
92
|
licenses:
|
93
|
-
-
|
93
|
+
- Apache 2.0
|
94
94
|
metadata: {}
|
95
95
|
post_install_message:
|
96
96
|
rdoc_options: []
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.6.4
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: An interface for providing process table information
|
metadata.gz.sig
CHANGED
Binary file
|