subexec 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -3
- data/lib/subexec.rb +3 -3
- metadata +18 -7
data/README.md
CHANGED
@@ -14,6 +14,9 @@ and never returns control back to the original process. Enter Subexec.
|
|
14
14
|
|
15
15
|
Tested with MRI 1.9.3, 1.9.2, 1.8.7
|
16
16
|
|
17
|
+
Note: Process.spawn seems to be broken with JRuby 1.7.0.dev (as of
|
18
|
+
April 20th, 2012), and so it uses Process.exec instead.
|
19
|
+
|
17
20
|
## Usage
|
18
21
|
|
19
22
|
```ruby
|
@@ -33,8 +36,7 @@ So Ruby 1.8 support is sheerly for backwards compatibility.
|
|
33
36
|
|
34
37
|
## Windows Support
|
35
38
|
|
36
|
-
Limited Windows support is available.
|
37
|
-
|
38
|
-
our tests are run on Unix-like operating systems. Primarily, the intended
|
39
|
+
Limited Windows support is available. We are more than happy to accept patches.
|
40
|
+
However, our tests are run on Unix-like operating systems. Primarily, the intended
|
39
41
|
effect should be that Subexec *works* on Windows, though it may not give
|
40
42
|
many advantages.
|
data/lib/subexec.rb
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
# puts sub.exitstatus # returns:
|
27
27
|
|
28
28
|
class Subexec
|
29
|
-
VERSION = '0.2.
|
29
|
+
VERSION = '0.2.2'
|
30
30
|
|
31
31
|
attr_accessor :pid,
|
32
32
|
:command,
|
@@ -51,7 +51,7 @@ class Subexec
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def run!
|
54
|
-
if RUBY_VERSION >= '1.9'
|
54
|
+
if RUBY_VERSION >= '1.9' && RUBY_ENGINE != 'jruby'
|
55
55
|
spawn
|
56
56
|
else
|
57
57
|
exec
|
@@ -117,7 +117,7 @@ class Subexec
|
|
117
117
|
if !(RUBY_PLATFORM =~ /win32|mswin|mingw/).nil?
|
118
118
|
self.output = `set LANG=#{lang} && #{command} 2>&1`
|
119
119
|
else
|
120
|
-
self.output = `
|
120
|
+
self.output = `LANG=#{lang} && export $LANG && #{command} 2>&1`
|
121
121
|
end
|
122
122
|
self.exitstatus = $?.exitstatus
|
123
123
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subexec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-04-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: rspec
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ~>
|
@@ -32,7 +37,12 @@ dependencies:
|
|
32
37
|
version: 2.7.0
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.7.0
|
36
46
|
description: Subexec spawns a subprocess with an optional timeout
|
37
47
|
email:
|
38
48
|
- peter@nulayer.com
|
@@ -62,8 +72,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
72
|
version: '0'
|
63
73
|
requirements: []
|
64
74
|
rubyforge_project:
|
65
|
-
rubygems_version: 1.8.
|
75
|
+
rubygems_version: 1.8.23
|
66
76
|
signing_key:
|
67
77
|
specification_version: 3
|
68
78
|
summary: Subexec spawns a subprocess with an optional timeout
|
69
79
|
test_files: []
|
80
|
+
has_rdoc:
|