sys-proctable 0.9.2-universal-mingw32 → 0.9.3-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.2'
18
+ VERSION = '0.9.3'
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.2'
5
+ spec.version = '0.9.3'
6
6
  spec.author = 'Daniel J. Berger'
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
@@ -1,84 +1,84 @@
1
- #######################################################################
2
- # test_sys_proctable_all.rb
3
- #
4
- # Test suite for methods common to all platforms. Generally speaking
5
- # you should run this test case using the 'rake test' task.
6
- #######################################################################
7
- require 'rubygems'
8
- gem 'test-unit'
9
-
10
- require 'test/unit'
11
- require 'sys/proctable'
12
- require 'test/test_sys_top'
13
- include Sys
14
-
15
- class TC_ProcTable_All < Test::Unit::TestCase
16
- def self.startup
17
- @@windows = File::ALT_SEPARATOR
18
- end
19
-
20
- def setup
21
- @pid = @@windows ? 0 : 1
22
- end
23
-
24
- def test_version
25
- assert_equal('0.9.2', ProcTable::VERSION)
26
- end
27
-
28
- def test_fields
29
- assert_respond_to(ProcTable, :fields)
30
- assert_nothing_raised{ ProcTable.fields }
31
- assert_kind_of(Array, ProcTable.fields)
32
- assert_kind_of(String, ProcTable.fields.first)
33
- end
34
-
35
- def test_ps
36
- assert_respond_to(ProcTable, :ps)
37
- assert_nothing_raised{ ProcTable.ps }
38
- assert_nothing_raised{ ProcTable.ps{} }
39
- end
40
-
41
- def test_ps_with_pid
42
- assert_nothing_raised{ ProcTable.ps(0) }
43
- end
44
-
45
- def test_ps_with_explicit_nil
46
- assert_nothing_raised{ ProcTable.ps(nil) }
47
- assert_kind_of(Array, ProcTable.ps(nil))
48
- end
49
-
50
- def test_ps_return_value
51
- assert_kind_of(Array, ProcTable.ps)
52
- assert_kind_of(Struct::ProcTableStruct, ProcTable.ps(@pid))
53
- assert_equal(nil, ProcTable.ps(999999999))
54
- assert_equal(nil, ProcTable.ps(999999999){})
55
- assert_equal(nil, ProcTable.ps{})
56
- end
57
-
58
- def test_ps_returned_struct_is_frozen
59
- assert_true(ProcTable.ps.first.frozen?)
60
- end
61
-
62
- def test_ps_expected_errors
63
- assert_raises(TypeError){ ProcTable.ps('vim') }
64
- omit_if(@@windows, 'ArgumentError check skipped on MS Windows')
65
- assert_raises(ArgumentError){ ProcTable.ps(0, 'localhost') }
66
- end
67
-
68
- def test_new_not_allowed
69
- assert_raise(NoMethodError){ Sys::ProcTable.new }
70
- end
71
-
72
- def test_error_class_defined
73
- assert_not_nil(Sys::ProcTable::Error)
74
- assert_kind_of(StandardError, Sys::ProcTable::Error.new)
75
- end
76
-
77
- def teardown
78
- @pid = nil
79
- end
80
-
81
- def self.teardown
82
- @@windows = nil
83
- end
84
- end
1
+ #######################################################################
2
+ # test_sys_proctable_all.rb
3
+ #
4
+ # Test suite for methods common to all platforms. Generally speaking
5
+ # you should run this test case using the 'rake test' task.
6
+ #######################################################################
7
+ require 'rubygems'
8
+ gem 'test-unit'
9
+
10
+ require 'test/unit'
11
+ require 'sys/proctable'
12
+ require 'test/test_sys_top'
13
+ include Sys
14
+
15
+ class TC_ProcTable_All < Test::Unit::TestCase
16
+ def self.startup
17
+ @@windows = File::ALT_SEPARATOR
18
+ end
19
+
20
+ def setup
21
+ @pid = @@windows ? 0 : 1
22
+ end
23
+
24
+ def test_version
25
+ assert_equal('0.9.3', ProcTable::VERSION)
26
+ end
27
+
28
+ def test_fields
29
+ assert_respond_to(ProcTable, :fields)
30
+ assert_nothing_raised{ ProcTable.fields }
31
+ assert_kind_of(Array, ProcTable.fields)
32
+ assert_kind_of(String, ProcTable.fields.first)
33
+ end
34
+
35
+ def test_ps
36
+ assert_respond_to(ProcTable, :ps)
37
+ assert_nothing_raised{ ProcTable.ps }
38
+ assert_nothing_raised{ ProcTable.ps{} }
39
+ end
40
+
41
+ def test_ps_with_pid
42
+ assert_nothing_raised{ ProcTable.ps(0) }
43
+ end
44
+
45
+ def test_ps_with_explicit_nil
46
+ assert_nothing_raised{ ProcTable.ps(nil) }
47
+ assert_kind_of(Array, ProcTable.ps(nil))
48
+ end
49
+
50
+ def test_ps_return_value
51
+ assert_kind_of(Array, ProcTable.ps)
52
+ assert_kind_of(Struct::ProcTableStruct, ProcTable.ps(@pid))
53
+ assert_equal(nil, ProcTable.ps(999999999))
54
+ assert_equal(nil, ProcTable.ps(999999999){})
55
+ assert_equal(nil, ProcTable.ps{})
56
+ end
57
+
58
+ def test_ps_returned_struct_is_frozen
59
+ assert_true(ProcTable.ps.first.frozen?)
60
+ end
61
+
62
+ def test_ps_expected_errors
63
+ assert_raises(TypeError){ ProcTable.ps('vim') }
64
+ omit_if(@@windows, 'ArgumentError check skipped on MS Windows')
65
+ assert_raises(ArgumentError){ ProcTable.ps(0, 'localhost') }
66
+ end
67
+
68
+ def test_new_not_allowed
69
+ assert_raise(NoMethodError){ Sys::ProcTable.new }
70
+ end
71
+
72
+ def test_error_class_defined
73
+ assert_not_nil(Sys::ProcTable::Error)
74
+ assert_kind_of(StandardError, Sys::ProcTable::Error.new)
75
+ end
76
+
77
+ def teardown
78
+ @pid = nil
79
+ end
80
+
81
+ def self.teardown
82
+ @@windows = nil
83
+ end
84
+ 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: 0.9.2
4
+ version: 0.9.3
5
5
  prerelease:
6
6
  platform: universal-mingw32
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-28 00:00:00.000000000 Z
12
+ date: 2013-03-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit