spork 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/spork.rb +4 -0
- data/lib/spork/run_strategy/forking.rb +1 -0
- data/lib/spork/server.rb +2 -1
- data/spec/spork_spec.rb +8 -0
- metadata +2 -2
data/lib/spork.rb
CHANGED
data/lib/spork/server.rb
CHANGED
@@ -25,7 +25,8 @@ class Spork::Server
|
|
25
25
|
trap("SIGINT") { sig_int_received }
|
26
26
|
trap("SIGTERM") { abort; exit!(0) }
|
27
27
|
trap("USR2") { abort; restart } if Signal.list.has_key?("USR2")
|
28
|
-
DRb.start_service("druby://127.0.0.1:#{port}", self)
|
28
|
+
@drb_service = DRb.start_service("druby://127.0.0.1:#{port}", self)
|
29
|
+
Spork.each_run { @drb_service.stop_service }
|
29
30
|
stderr.puts "Spork is ready and listening on #{port}!"
|
30
31
|
stderr.flush
|
31
32
|
DRb.thread.join
|
data/spec/spork_spec.rb
CHANGED
@@ -60,6 +60,14 @@ describe Spork do
|
|
60
60
|
Spork.send(:expanded_caller, "/boo/../yah.rb:31").should == "/yah.rb:31"
|
61
61
|
end
|
62
62
|
|
63
|
+
describe "#using_spork?" do
|
64
|
+
it "returns true if Spork is being used" do
|
65
|
+
Spork.using_spork?.should be_false
|
66
|
+
Spork.using_spork!
|
67
|
+
Spork.using_spork?.should be_true
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
63
71
|
describe "#trap_method" do
|
64
72
|
before(:each) do
|
65
73
|
Spork.using_spork!
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Harper
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-17 00:00:00 -04:00
|
13
13
|
default_executable: spork
|
14
14
|
dependencies: []
|
15
15
|
|