subexec 0.2.0 → 0.2.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/README.md +8 -0
- data/lib/subexec.rb +7 -2
- metadata +7 -8
data/README.md
CHANGED
@@ -30,3 +30,11 @@ puts sub.exitstatus # returns:`
|
|
30
30
|
|
31
31
|
Only Ruby 1.9 can spawn non-blocking subprocesses, via Process.spawn.
|
32
32
|
So Ruby 1.8 support is sheerly for backwards compatibility.
|
33
|
+
|
34
|
+
## Windows Support
|
35
|
+
|
36
|
+
Limited Windows support is available. If someone would like to sponsor
|
37
|
+
windows compatibility, we are more than happy to accept patches. However,
|
38
|
+
our tests are run on Unix-like operating systems. Primarily, the intended
|
39
|
+
effect should be that Subexec *works* on Windows, though it may not give
|
40
|
+
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.1'
|
30
30
|
|
31
31
|
attr_accessor :pid,
|
32
32
|
:command,
|
@@ -114,7 +114,12 @@ class Subexec
|
|
114
114
|
end
|
115
115
|
|
116
116
|
def exec
|
117
|
-
|
117
|
+
if !(RUBY_PLATFORM =~ /win32|mswin|mingw/).nil?
|
118
|
+
self.output = `set LANG=#{lang} && #{command} 2>&1`
|
119
|
+
else
|
120
|
+
self.output = `export LANG=#{lang} && #{command} 2>&1`
|
121
|
+
end
|
122
|
+
self.exitstatus = $?.exitstatus
|
118
123
|
end
|
119
124
|
|
120
125
|
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.1
|
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: 2011-
|
12
|
+
date: 2011-12-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70319524706220 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70319524706220
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &70319524705620 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 2.7.0
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70319524705620
|
36
36
|
description: Subexec spawns a subprocess with an optional timeout
|
37
37
|
email:
|
38
38
|
- peter@nulayer.com
|
@@ -62,9 +62,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
64
|
rubyforge_project:
|
65
|
-
rubygems_version: 1.8.
|
65
|
+
rubygems_version: 1.8.13
|
66
66
|
signing_key:
|
67
67
|
specification_version: 3
|
68
68
|
summary: Subexec spawns a subprocess with an optional timeout
|
69
69
|
test_files: []
|
70
|
-
has_rdoc:
|