sys-proctable 0.9.4-universal-solaris → 0.9.5-universal-solaris

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -18,7 +18,7 @@ module Sys
18
18
  private_class_method :new
19
19
 
20
20
  # The version of the sys-proctable library
21
- VERSION = '0.9.4'
21
+ VERSION = '0.9.5'
22
22
 
23
23
  private
24
24
 
@@ -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,83 +1,101 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: sys-proctable
3
- version: !ruby/object:Gem::Version
4
- version: 0.9.4
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.5
5
+ prerelease:
5
6
  platform: universal-solaris
6
- authors:
7
+ authors:
7
8
  - Daniel J. Berger
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
-
12
- date: 2014-03-04 00:00:00 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
12
+ date: 2015-02-10 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
15
  name: test-unit
16
- prerelease: false
17
- requirement: &id001 !ruby/object:Gem::Requirement
18
- requirements:
19
- - &id002
20
- - ">="
21
- - !ruby/object:Gem::Version
22
- version: "0"
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
23
22
  type: :development
24
- version_requirements: *id001
25
- - !ruby/object:Gem::Dependency
26
- name: rake
27
23
  prerelease: false
28
- requirement: &id003 !ruby/object:Gem::Requirement
29
- requirements:
30
- - *id002
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
31
38
  type: :development
32
- version_requirements: *id003
33
- description: " The sys-proctable library provides an interface for gathering information\n about processes on your system, i.e. the process table. Most major\n platforms are supported and, while different platforms may return\n different information, the external interface is identical across\n platforms.\n"
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: ! " The sys-proctable library provides an interface for gathering
47
+ information\n about processes on your system, i.e. the process table. Most major\n
48
+ \ platforms are supported and, while different platforms may return\n different
49
+ information, the external interface is identical across\n platforms.\n"
34
50
  email: djberg96@gmail.com
35
51
  executables: []
36
-
37
52
  extensions: []
38
-
39
- extra_rdoc_files:
53
+ extra_rdoc_files:
40
54
  - CHANGES
41
55
  - README
42
56
  - MANIFEST
43
57
  - doc/top.txt
44
- files:
45
- - CHANGES
46
- - MANIFEST
47
- - README
48
- - Rakefile
58
+ files:
49
59
  - benchmarks/bench_ps.rb
50
- - doc/top.txt
51
60
  - examples/example_ps.rb
52
- - lib/sunos/sys/proctable.rb
53
61
  - lib/sys/top.rb
62
+ - CHANGES
63
+ - MANIFEST
64
+ - Rakefile
65
+ - README
54
66
  - sys-proctable.gemspec
55
67
  - test/test_sys_proctable_all.rb
68
+ - doc/top.txt
69
+ - lib/sunos/sys/proctable.rb
56
70
  - test/test_sys_proctable_sunos.rb
71
+ - test/test_sys_top.rb
57
72
  homepage: http://www.rubyforge.org/projects/sysutils
58
- licenses:
73
+ licenses:
59
74
  - Artistic 2.0
60
- metadata: {}
61
-
62
75
  post_install_message:
63
76
  rdoc_options: []
64
-
65
- require_paths:
77
+ require_paths:
66
78
  - lib
67
79
  - lib/sunos
68
- required_ruby_version: !ruby/object:Gem::Requirement
69
- requirements:
70
- - *id002
71
- required_rubygems_version: !ruby/object:Gem::Requirement
72
- requirements:
73
- - *id002
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
74
92
  requirements: []
75
-
76
93
  rubyforge_project: sysutils
77
- rubygems_version: 2.2.2
94
+ rubygems_version: 1.8.23
78
95
  signing_key:
79
- specification_version: 4
96
+ specification_version: 3
80
97
  summary: An interface for providing process table information
81
- test_files:
98
+ test_files:
82
99
  - test/test_sys_proctable_all.rb
83
100
  - test/test_sys_proctable_sunos.rb
101
+ - test/test_sys_top.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 493156f7b41233bb2dc91f61f64d668d681369f2
4
- data.tar.gz: 73c3ea02760e2a1038a3cb79b5bc1bdd8a7843f5
5
- SHA512:
6
- metadata.gz: d47a88803966ff31fbd8b3010ea9856dfe35bb424a18ec87b62972860228bc0467aae6ffdb4cfbb33a07ede4a38938022a6cdce5c11aa9d0497c6e9e621a1abd
7
- data.tar.gz: 36c9b04c0f5668a1bd50aa83dc1bec55f2e4fd92178184703db047d805770e85a1c2d6789a0011c29542963b975beed4b18d5969ae4a5a05bbd586f7e1388a75