snailgun 1.1.0 → 1.1.1
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.
- data/lib/snailgun/server.rb +4 -1
- metadata +17 -5
data/lib/snailgun/server.rb
CHANGED
|
@@ -27,6 +27,7 @@ module Snailgun
|
|
|
27
27
|
def run
|
|
28
28
|
while client = @socket.accept
|
|
29
29
|
pid = fork do
|
|
30
|
+
rubylib = nil
|
|
30
31
|
begin
|
|
31
32
|
STDIN.reopen(client.recv_io)
|
|
32
33
|
STDOUT.reopen(client.recv_io)
|
|
@@ -34,7 +35,7 @@ module Snailgun
|
|
|
34
35
|
nbytes = client.read(4).unpack("N").first
|
|
35
36
|
args, env, cwd, pgid = Marshal.load(client.read(nbytes))
|
|
36
37
|
Dir.chdir(cwd)
|
|
37
|
-
$LOAD_PATH
|
|
38
|
+
$LOAD_PATH.unshift rubylib if (rubylib = env['RUBYLIB'])
|
|
38
39
|
begin
|
|
39
40
|
Process.setpgid(0, pgid)
|
|
40
41
|
rescue Errno::EPERM
|
|
@@ -56,6 +57,8 @@ module Snailgun
|
|
|
56
57
|
rescue Exception => e
|
|
57
58
|
STDERR.puts "#{e}\n\t#{e.backtrace.join("\n\t")}"
|
|
58
59
|
exit 1
|
|
60
|
+
ensure
|
|
61
|
+
$LOAD_PATH.shift if rubylib
|
|
59
62
|
end
|
|
60
63
|
end
|
|
61
64
|
Process.detach(pid) if pid && pid > 0
|
metadata
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: snailgun
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
4
|
+
hash: 17
|
|
5
|
+
prerelease: false
|
|
6
|
+
segments:
|
|
7
|
+
- 1
|
|
8
|
+
- 1
|
|
9
|
+
- 1
|
|
10
|
+
version: 1.1.1
|
|
5
11
|
platform: ruby
|
|
6
12
|
authors:
|
|
7
13
|
- Brian Candler
|
|
@@ -9,7 +15,7 @@ autorequire:
|
|
|
9
15
|
bindir: bin
|
|
10
16
|
cert_chain: []
|
|
11
17
|
|
|
12
|
-
date: 2010-10-24 00:00:00 +
|
|
18
|
+
date: 2010-10-24 00:00:00 +01:00
|
|
13
19
|
default_executable:
|
|
14
20
|
dependencies: []
|
|
15
21
|
|
|
@@ -50,21 +56,27 @@ rdoc_options:
|
|
|
50
56
|
require_paths:
|
|
51
57
|
- lib
|
|
52
58
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
59
|
+
none: false
|
|
53
60
|
requirements:
|
|
54
61
|
- - ">="
|
|
55
62
|
- !ruby/object:Gem::Version
|
|
63
|
+
hash: 3
|
|
64
|
+
segments:
|
|
65
|
+
- 0
|
|
56
66
|
version: "0"
|
|
57
|
-
version:
|
|
58
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
|
+
none: false
|
|
59
69
|
requirements:
|
|
60
70
|
- - ">="
|
|
61
71
|
- !ruby/object:Gem::Version
|
|
72
|
+
hash: 3
|
|
73
|
+
segments:
|
|
74
|
+
- 0
|
|
62
75
|
version: "0"
|
|
63
|
-
version:
|
|
64
76
|
requirements: []
|
|
65
77
|
|
|
66
78
|
rubyforge_project: snailgun
|
|
67
|
-
rubygems_version: 1.3.
|
|
79
|
+
rubygems_version: 1.3.7
|
|
68
80
|
signing_key:
|
|
69
81
|
specification_version: 2
|
|
70
82
|
summary: Command-line startup accelerator
|