sys-proctree 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0ab9a1f86c3fb77f2ce69bbeaa71eb0cf1ef5bb7
4
- data.tar.gz: 9609fc754377e52b6d06e5fb08a8411527b4bb91
2
+ SHA256:
3
+ metadata.gz: 26f2c537b70ade322d1d957348d46345c227f5ff41f3425bf86cb0d7acb5c7c3
4
+ data.tar.gz: 24daca6679f89fb0bbf12d7a3d96e1f9e3a72fe70e0a21b69d933a9fb6b94796
5
5
  SHA512:
6
- metadata.gz: 04acaa2b48f3190782151632a428ff84dcca65b8acbca5a772f7e0d2f404d7138341e678cfd9cc18b6766db8d492466953610cc79ce75793c228736b99e68224
7
- data.tar.gz: a97493edc79c2eeeac10967b74067884b76f45fd5edfae1d9a6562fef5eae495f63a1033b9213d2ab194f45a217dced6092bc121c741ec7757fd2c3401020b7c
6
+ metadata.gz: 2384bf99b88be69f486d674ea3362aa7e6c465d1d8a3846ae241c8880c108140143338ad32639aa53e581a0a613ca58f7333dd4fb74c511ab01e8bca15e74565
7
+ data.tar.gz: 02ae687c2f60a22bdba0c5de39eb22bba20b200b36fb67bfcf3fb4bf5c01644b78f9623d27e68a38fdcad0084a2758c7a6888f8cccc22001beafe18663cf64d8
@@ -9,7 +9,7 @@ module Sys
9
9
  begin
10
10
  ::Process.kill(signal, pid_in_tree)
11
11
  ::Process.wait(pid_in_tree)
12
- rescue
12
+ rescue StandardError
13
13
  [ pid_in_tree, nil ]
14
14
  end
15
15
  end
@@ -1,5 +1,5 @@
1
1
  module Sys
2
2
  module ProcTree
3
- VERSION = "0.0.10".freeze
3
+ VERSION = "0.0.11".freeze
4
4
  end
5
5
  end
@@ -15,28 +15,30 @@ describe ::Sys::ProcTree::Process do
15
15
  allow(::Process).to receive(:wait)
16
16
  end
17
17
 
18
- it "should discover the pids of the process tree" do
18
+ it "discovers the pids of the process tree" do
19
19
  expect(::Sys::ProcTree::Tree).to receive(:find).with(8).and_return(tree_pids)
20
20
 
21
21
  TestableProcess.kill_tree(kill_signal, 8)
22
22
  end
23
23
 
24
- it "should attempt to kill each process with the provided kill signal in tree order" do
24
+ it "attempts to kill each process with the provided kill signal in tree order" do
25
25
  tree_pids.each { |pid| expect(::Process).to receive(:kill).with(kill_signal, pid) }
26
26
 
27
27
  TestableProcess.kill_tree(kill_signal, 8)
28
28
  end
29
29
 
30
30
 
31
- it "should wait for all processes to complete" do
31
+ it "waits for all processes to complete" do
32
32
  tree_pids.each { |pid| expect(::Process).to receive(:wait).with(pid) }
33
33
 
34
34
  TestableProcess.kill_tree(kill_signal, 8)
35
35
  end
36
36
 
37
- it "should return the exit status of all killed processes" do
37
+ it "returns the exit status of all killed processes" do
38
38
  wait_results = tree_pids.map do |pid|
39
- [pid, double(::Process::Status)].tap { |result| allow(::Process).to receive(:wait).with(pid).and_return(result) }
39
+ [ pid, double(::Process::Status) ].tap do |result|
40
+ allow(::Process).to receive(:wait).with(pid).and_return(result)
41
+ end
40
42
  end
41
43
 
42
44
  expect(TestableProcess.kill_tree(kill_signal, 8)).to eql(wait_results)
@@ -48,13 +50,13 @@ describe ::Sys::ProcTree::Process do
48
50
 
49
51
  before(:example) { allow(::Process).to receive(:kill).with(kill_signal, 6).and_raise("No such process") }
50
52
 
51
- it "should continue to kill subsequent processes" do
53
+ it "continues to kill subsequent processes" do
52
54
  [2, 8].each { |pid| expect(::Process).to receive(:kill).with(kill_signal, pid) }
53
55
 
54
56
  TestableProcess.kill_tree(kill_signal, 8)
55
57
  end
56
58
 
57
- it "should return an exit status of nil" do
59
+ it "returns an exit status of nil" do
58
60
  wait_results = [[2, double(::Process::Status)], [6, nil], [8, double(::Process::Status)]]
59
61
  allow(::Process).to receive(:wait).with(2).and_return(wait_results[0])
60
62
  allow(::Process).to receive(:wait).with(8).and_return(wait_results[2])
@@ -10,11 +10,11 @@ describe ::Sys::ProcTree::ProcessStatusList do
10
10
 
11
11
  let(:list) { ::Sys::ProcTree::ProcessStatusList.new }
12
12
 
13
- it "should be an array" do
13
+ it "is an array" do
14
14
  expect(list).to be_an(Array)
15
15
  end
16
16
 
17
- it "should contain proc table process status results" do
17
+ it "contains proc table process status results" do
18
18
  expect(::Sys::ProcTable).to receive(:ps).and_return(proc_list)
19
19
 
20
20
  expect(list).to eql(proc_list)
@@ -26,7 +26,7 @@ describe ::Sys::ProcTree::ProcessStatusList do
26
26
 
27
27
  let(:pid) { 2 }
28
28
 
29
- it "should return true" do
29
+ it "returns true" do
30
30
  expect(list.exists?(pid)).to be(true)
31
31
  end
32
32
 
@@ -36,7 +36,7 @@ describe ::Sys::ProcTree::ProcessStatusList do
36
36
 
37
37
  let(:pid) { -1 }
38
38
 
39
- it "should return false" do
39
+ it "returns false" do
40
40
  expect(list.exists?(pid)).to be(false)
41
41
  end
42
42
 
metadata CHANGED
@@ -1,57 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sys-proctree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Ueckerman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-18 00:00:00.000000000 Z
11
+ date: 2019-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sys-proctable
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0
19
+ version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '='
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '12.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
25
39
  - !ruby/object:Gem::Version
26
- version: 1.0.0
40
+ version: '12.3'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rubocop
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: '0.41'
47
+ version: '0.71'
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
52
  - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: '0.41'
54
+ version: '0.71'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rspec
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
59
  - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '3.5'
61
+ version: '3.8'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '3.5'
68
+ version: '3.8'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: os
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -67,33 +81,33 @@ dependencies:
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0.9'
69
83
  - !ruby/object:Gem::Dependency
70
- name: rake
84
+ name: irb
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '11.2'
89
+ version: '1.0'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '11.2'
96
+ version: '1.0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: simplecov
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '0.12'
103
+ version: 0.13.0
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '0.12'
110
+ version: 0.13.0
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: travis-lint
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -142,27 +156,26 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
156
  requirements:
143
157
  - - ">="
144
158
  - !ruby/object:Gem::Version
145
- version: '2.0'
159
+ version: '2.3'
146
160
  required_rubygems_version: !ruby/object:Gem::Requirement
147
161
  requirements:
148
162
  - - ">="
149
163
  - !ruby/object:Gem::Version
150
164
  version: '0'
151
165
  requirements: []
152
- rubyforge_project: sys-proctree
153
- rubygems_version: 2.5.1
166
+ rubygems_version: 3.0.4
154
167
  signing_key:
155
168
  specification_version: 4
156
169
  summary: Discovers and can attempt to lay waste to a process tree
157
170
  test_files:
171
+ - "./spec/spec_helper.rb"
172
+ - "./spec/resources/start_parent.sh"
173
+ - "./spec/resources/start_parent.bat"
174
+ - "./spec/resources/start_child.bat"
175
+ - "./spec/resources/start_child.sh"
176
+ - "./spec/lib/sys/proctree_spec.rb"
177
+ - "./spec/lib/sys/proctree/tree_spec.rb"
158
178
  - "./spec/lib/sys/proctree/process_spec.rb"
159
179
  - "./spec/lib/sys/proctree/process_status_list_spec.rb"
160
- - "./spec/lib/sys/proctree/tree_spec.rb"
161
- - "./spec/lib/sys/proctree_spec.rb"
162
- - "./spec/process_integration_spec.rb"
163
180
  - "./spec/process_spec.rb"
164
- - "./spec/resources/start_child.bat"
165
- - "./spec/resources/start_child.sh"
166
- - "./spec/resources/start_parent.bat"
167
- - "./spec/resources/start_parent.sh"
168
- - "./spec/spec_helper.rb"
181
+ - "./spec/process_integration_spec.rb"