trident 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG +5 -0
- data/lib/trident/cli.rb +0 -1
- data/lib/trident/signal_handler.rb +2 -0
- data/lib/trident/version.rb +1 -1
- data/test/test_helper.rb +2 -2
- data/test/unit/trident/signal_handler_test.rb +3 -19
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzQ4Zjg1MWU4YjFiMjc2Y2JiZWI0OGJkYzVlODk1NWJlOTdmNmMzNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmQwNjFjMmQ4MzM3MGFhMDM3ZDc3ZmJkMjc5MDhjNzAzZjdlNTYxNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDE0ZmY2MGE1ZWY5NjRiODk4ZTc3M2U0MDRmMWU5NzljNGVkNDFlNGNkMzJj
|
10
|
+
NWY4N2QxN2E2ODI0ODAzZGQzMDdhZTFjZmJjYmY3YTE5NjRjN2E1OWMyMzRi
|
11
|
+
OTUzOThmMTliMmJjM2U0M2FiZWU4MTkxNTM2MzJhNTU0ODE1OWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDk2YWZmYWFlNzMxZjQxOTk4YmMyNjIyMzQ5ZWVlYThiMjRiMWRkZDJkYmNh
|
14
|
+
MzljZjU0NDliNmQ1ZTYyMjA0ZDZiOGFhMTdkMmU3NDgzYWRjNWZmNTExNjM1
|
15
|
+
NjlmODkyNzUxMjhiMDU0NWM5ZDg4OGUyNjEwZTUwYmZjN2ZlZmI=
|
data/CHANGELOG
CHANGED
data/lib/trident/cli.rb
CHANGED
@@ -54,11 +54,13 @@ module Trident
|
|
54
54
|
def start
|
55
55
|
setup_self_pipe
|
56
56
|
setup_signal_handlers
|
57
|
+
target.start if target.respond_to?(:start)
|
57
58
|
|
58
59
|
@main_loop = Thread.new do
|
59
60
|
logger.info "Main loop started"
|
60
61
|
loop do
|
61
62
|
signal_result = handle_signal_queue
|
63
|
+
target.update if target.respond_to?(:update)
|
62
64
|
break if signal_result == :break
|
63
65
|
logger.debug "Snoozing main loop"
|
64
66
|
msg = snooze if signal_queue.empty?
|
data/lib/trident/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -19,24 +19,6 @@ class Trident::SignalHandlerTest < MiniTest::Should::TestCase
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
def do_in_child
|
23
|
-
read_from_child, write_from_child = IO.pipe
|
24
|
-
|
25
|
-
pid = fork do
|
26
|
-
read_from_child.close
|
27
|
-
result = yield
|
28
|
-
Marshal.dump(result, write_from_child)
|
29
|
-
exit!(0) # skips exit handlers.
|
30
|
-
end
|
31
|
-
|
32
|
-
[pid, read_from_child]
|
33
|
-
write_from_child.close
|
34
|
-
result = read_from_child.read
|
35
|
-
Process.wait(pid)
|
36
|
-
raise "child failed" if result.empty?
|
37
|
-
Marshal.load(result)
|
38
|
-
end
|
39
|
-
|
40
22
|
context "#signal_mappings==" do
|
41
23
|
|
42
24
|
should "normalize signal names" do
|
@@ -257,7 +239,9 @@ class Trident::SignalHandlerTest < MiniTest::Should::TestCase
|
|
257
239
|
Process.kill("USR1", fc.pid)
|
258
240
|
|
259
241
|
received = fc.wait
|
260
|
-
|
242
|
+
assert_includes received, [:bar, [], nil]
|
243
|
+
assert_includes received, [:foo, [], nil]
|
244
|
+
assert_includes received, [:action_break, [], nil]
|
261
245
|
end
|
262
246
|
|
263
247
|
should "preserve SIGCHLD behavior" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trident
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Conway
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_logger
|