nutcracker 0.2.4.11 → 0.2.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/nutcracker.rb +5 -3
- data/lib/nutcracker/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjMwZTc4ZGQ3NmQ1MTk5YzViYTAwMDJkZWJmOWU4YWE5NTQ4MWQ1OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjJmMWRiODY4YWRhN2I2NjdlMjk1MjBhMGRmMGVjNGNhZWRmYWY0Mg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjRkNDE0MTZmMmRlNmYyNWQxYmEyNjExNmU5Y2M1ODkwZGYwYmVjMWE0NTU3
|
10
|
+
MTI5OGVmODRkNGU2MjY1Zjg0ZmZiYTg5ZGE1Mzg1MDczODA4OTJkMGIzYzcw
|
11
|
+
NjQzNzAyODczYjdhOTkwOGM3YmFkMmU3NWFmY2MxODE4ZjdkN2U=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDY2MWExOThjZjQxYTM0ZjBhZmMwMjI5YzI1NzViMTlkNmRiNjNhY2VlN2Ri
|
14
|
+
MGFmMWQ3ZGVhZDM3Mjg3MWY3ZDYwYjUwZGYzMTJiMjRjMzY3NTgzZjg5OTg1
|
15
|
+
MTViODBjN2JhMjJmNDFjYzUxZGNiMzNjYjU5MTJjMTZiNDViNGE=
|
data/lib/nutcracker.rb
CHANGED
@@ -48,14 +48,16 @@ module Nutcracker
|
|
48
48
|
def start *args
|
49
49
|
return self if attached? or running?
|
50
50
|
@pid = ::Process.spawn Nutcracker.executable, *command
|
51
|
-
|
51
|
+
Process.detach(@pid)
|
52
|
+
sleep 2
|
53
|
+
abort "Nutcracker failed to start" unless running?
|
52
54
|
Kernel.at_exit { kill if running? }
|
53
55
|
self
|
54
56
|
end
|
55
57
|
|
56
58
|
# Returns the current running status
|
57
59
|
def running?
|
58
|
-
stats.any?
|
60
|
+
attached? ? stats.any? : !!(pid and ::Process.getpgid pid rescue nil)
|
59
61
|
end
|
60
62
|
|
61
63
|
# Returns true if the current instance was initialize with the attached flag
|
@@ -75,7 +77,7 @@ module Nutcracker
|
|
75
77
|
|
76
78
|
# Wait for the process to exit
|
77
79
|
def join
|
78
|
-
attached? ? sleep : (running! and ::Process.waitpid2 pid)
|
80
|
+
attached? ? sleep : (running! and ::Process.waitpid2 pid rescue nil)
|
79
81
|
end
|
80
82
|
|
81
83
|
# Returns Nutcracker's configuration hash
|
data/lib/nutcracker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nutcracker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.4.
|
4
|
+
version: 0.2.4.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eran Barak Levi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -213,8 +213,7 @@ homepage: http://www.kontera.com
|
|
213
213
|
licenses: []
|
214
214
|
metadata: {}
|
215
215
|
post_install_message:
|
216
|
-
rdoc_options:
|
217
|
-
- --no-private --protected lib/**/*.rb - README.md
|
216
|
+
rdoc_options: []
|
218
217
|
require_paths:
|
219
218
|
- lib
|
220
219
|
required_ruby_version: !ruby/object:Gem::Requirement
|