sys-proctable 0.9.4-universal-mingw32 → 0.9.5-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OWY3YTM4MTJiOWU0OTkwNzk1YTYzN2ZmOWZjNjBiYTQwM2NlYWI1MA==
4
+ YTFiOTRhOTI4MDU2ZTI3YjA1MDlhODMzZmJjMDhmMWMwYWEzODc4OA==
5
5
  data.tar.gz: !binary |-
6
- YjcyOTE5MTMxYTFjZjc2YjIzNWFlZGZlYmE5ZjRkNDIyNjRlNTk5NA==
7
- !binary "U0hBNTEy":
6
+ ODdlYjk0YTgyMDI4OGZjYzU1Nzc2MjBlNDkyNmZjOWQzZmJjZmQyMw==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- NWFjMDhmMGZkZTFhM2MxZGJlMzUyN2I1YTFlZTU3NDBlMjJiMjVjZWMxOWRm
10
- YTUyMmI2ODA4OTA4MzJlMDY5ZmViYWQwMDE2NTFmN2E4ODliOWRiN2RiMWE1
11
- MDliNmJjYTM0MDM5ODU4NzMyMWFlMThkNDExOTE4YTZjOTE5NDI=
9
+ ZmNhOTg3ODBlOWJlYTRjMzkwNDI0YmJlNDA4M2I2MjVhYjIzNGE2MWVjNDMy
10
+ MzcwZjRlYWEyYWZjYTFhNGFhZDU5MGU4YmQ3ODQ5MWEyN2E4NWE5MjU4YTAz
11
+ ZTYwNTU1M2ZjYTc4NDg3MDMyN2ZjMDQ3YmY0OGMyNDU2YmQwMjk=
12
12
  data.tar.gz: !binary |-
13
- MTlhYWU4ZDk4NzY0MWFiMDllMDY4MjU3NGZmZWQ0YTlmNGZjZTkzM2VhZTk2
14
- MjY0ODYxZDY4ODRlMDY2Njk2M2RlNzc1MTNiYjQ0YWY2MmZhZGJkM2IxZTY5
15
- MzAyN2U3NDg3NzBhNzEzYjdmMGEwOWZkOTcwZWQ5M2YwZDk4MGM=
13
+ MDRjZGI0NzU3MzA3ODk0OTljNDQ3NmM4NzhmM2IyYWU0ODRkYzczMTc2OWQw
14
+ M2RlZjc2MDAzYTdhY2JlNmQ3OGU4OTU0M2Y3ODExYjc5Mjc2MWQxYTcyY2Q3
15
+ ZjM1N2M5OWFhZjNlOGNkZTZhN2FmZDUzYjZmOGFjMWM3ZjJlNTc=
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ == 0.9.5 - 10-Feb-2015
2
+ * Significant cleanup and memory reduction of the OSX code. Thanks go
3
+ to Ivan (toy) for the patches.
4
+ * Skip over /proc/<file>/status if unreadable on Linux. Thanks go to Jianjun
5
+ Mao for the patch.
6
+
1
7
  == 0.9.4 - 4-Mar-2014
2
8
  * Added support for AIX 5.3 or later courtesy of Rick Ohnemus.
3
9
  * The Solaris version now uses FFI structs instead of a packed array.
data/Rakefile CHANGED
@@ -174,6 +174,8 @@ namespace :gem do
174
174
  spec.files += ['lib/windows/sys/proctable.rb']
175
175
  spec.test_files << 'test/test_sys_proctable_windows.rb'
176
176
  end
177
+
178
+ spec.test_files << 'test/test_sys_top.rb'
177
179
 
178
180
  # https://github.com/rubygems/rubygems/issues/147
179
181
  spec.original_platform = spec.platform
@@ -15,7 +15,7 @@ module Sys
15
15
  class Error < StandardError; end
16
16
 
17
17
  # The version of the sys-proctable library
18
- VERSION = '0.9.4'
18
+ VERSION = '0.9.5'
19
19
 
20
20
  # The comm field corresponds to the 'name' field. The 'cmdline' field
21
21
  # is the CommandLine attribute on Windows XP or later, or the
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'sys-proctable'
5
- spec.version = '0.9.4'
5
+ spec.version = '0.9.5'
6
6
  spec.author = 'Daniel J. Berger'
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
@@ -19,7 +19,7 @@ class TC_ProcTable_All < Test::Unit::TestCase
19
19
  end
20
20
 
21
21
  def test_version
22
- assert_equal('0.9.4', ProcTable::VERSION)
22
+ assert_equal('0.9.5', ProcTable::VERSION)
23
23
  end
24
24
 
25
25
  def test_fields
@@ -71,6 +71,12 @@ class TC_ProcTable_All < Test::Unit::TestCase
71
71
  assert_kind_of(StandardError, Sys::ProcTable::Error.new)
72
72
  end
73
73
 
74
+ def test_from_thread
75
+ Thread.new do
76
+ Sys::ProcTable.ps
77
+ end.value
78
+ end
79
+
74
80
  def teardown
75
81
  @pid = nil
76
82
  end
@@ -0,0 +1,46 @@
1
+ ##############################################################################
2
+ # test_sys_top.rb
3
+ #
4
+ # Test suite for the sys-top library that is included with this distribution.
5
+ ##############################################################################
6
+ require 'rubygems'
7
+ gem 'test-unit'
8
+
9
+ require 'test/unit'
10
+ require 'sys/top'
11
+
12
+ class TC_Top < Test::Unit::TestCase
13
+ include Sys
14
+
15
+ def test_version
16
+ assert_equal('1.0.4', Top::VERSION)
17
+ end
18
+
19
+ def test_top_basic
20
+ assert_respond_to(Top, :top)
21
+ assert_nothing_raised{ Top.top }
22
+ assert_nothing_raised{ Top.top(5) }
23
+ assert_nothing_raised{ Top.top(5, 'cmdline') }
24
+ end
25
+
26
+ def test_top
27
+ assert_equal(10, Top.top.length)
28
+ assert_kind_of(Struct::ProcTableStruct, Top.top.first)
29
+ end
30
+
31
+ def test_top_with_size
32
+ assert_equal(5, Top.top(5).length)
33
+ end
34
+
35
+ def test_top_with_size_and_sort_by_field
36
+ assert_equal(5, Top.top(5, :cmdline).length)
37
+ end
38
+
39
+ def test_top_return_type
40
+ assert_kind_of(Array, Top.top)
41
+ end
42
+
43
+ def test_top_expected_errors
44
+ assert_raises(ArgumentError){ Top.top(1, 'foo', 2) }
45
+ end
46
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sys-proctable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: universal-mingw32
6
6
  authors:
7
7
  - Daniel J. Berger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-04 00:00:00.000000000 Z
11
+ date: 2015-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
@@ -51,18 +51,19 @@ extra_rdoc_files:
51
51
  - MANIFEST
52
52
  - doc/top.txt
53
53
  files:
54
- - benchmarks/bench_ps.rb
55
- - examples/example_ps.rb
56
- - lib/sys/top.rb
57
54
  - CHANGES
58
55
  - MANIFEST
59
- - Rakefile
60
56
  - README
61
- - sys-proctable.gemspec
62
- - test/test_sys_proctable_all.rb
57
+ - Rakefile
58
+ - benchmarks/bench_ps.rb
63
59
  - doc/top.txt
60
+ - examples/example_ps.rb
61
+ - lib/sys/top.rb
64
62
  - lib/windows/sys/proctable.rb
63
+ - sys-proctable.gemspec
64
+ - test/test_sys_proctable_all.rb
65
65
  - test/test_sys_proctable_windows.rb
66
+ - test/test_sys_top.rb
66
67
  homepage: http://www.rubyforge.org/projects/sysutils
67
68
  licenses:
68
69
  - Artistic 2.0
@@ -84,10 +85,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
85
  version: '0'
85
86
  requirements: []
86
87
  rubyforge_project: sysutils
87
- rubygems_version: 2.0.3
88
+ rubygems_version: 2.4.2
88
89
  signing_key:
89
90
  specification_version: 4
90
91
  summary: An interface for providing process table information
91
92
  test_files:
92
93
  - test/test_sys_proctable_all.rb
93
94
  - test/test_sys_proctable_windows.rb
95
+ - test/test_sys_top.rb