childprocess 0.1.8 → 0.1.9
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/childprocess.gemspec +1 -2
- data/lib/childprocess/jruby/process.rb +1 -1
- data/lib/childprocess/version.rb +1 -1
- data/spec/childprocess_spec.rb +29 -0
- metadata +28 -4
data/childprocess.gemspec
CHANGED
@@ -15,8 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.rubyforge_project = "childprocess"
|
16
16
|
|
17
17
|
s.files = `git ls-files`.split("\n")
|
18
|
-
s.test_files = `git ls-files --
|
19
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
|
+
s.test_files = `git ls-files -- spec/*`.split("\n")
|
20
19
|
s.require_paths = ["lib"]
|
21
20
|
|
22
21
|
s.add_development_dependency "rspec", [">= 2.0.0"]
|
data/lib/childprocess/version.rb
CHANGED
data/spec/childprocess_spec.rb
CHANGED
@@ -136,4 +136,33 @@ describe ChildProcess do
|
|
136
136
|
lambda { TCPServer.new("localhost", 4433).close }.should_not raise_error
|
137
137
|
end
|
138
138
|
|
139
|
+
it "preserves Dir.pwd in the child" do
|
140
|
+
require 'pathname'
|
141
|
+
begin
|
142
|
+
path = nil
|
143
|
+
Tempfile.open("dir-spec") {|tf| path = tf.path }
|
144
|
+
path = Pathname.new(path).realpath.to_s
|
145
|
+
File.unlink(path)
|
146
|
+
Dir.mkdir(path)
|
147
|
+
Dir.chdir(path) do
|
148
|
+
process = ruby("puts Dir.pwd")
|
149
|
+
begin
|
150
|
+
out = Tempfile.new("dir-spec-out")
|
151
|
+
|
152
|
+
process.io.stdout = out
|
153
|
+
process.io.stderr = out
|
154
|
+
|
155
|
+
process.start
|
156
|
+
process.poll_for_exit(EXIT_TIMEOUT)
|
157
|
+
|
158
|
+
out.rewind
|
159
|
+
out.read.should == "#{path}\n"
|
160
|
+
ensure
|
161
|
+
out.close
|
162
|
+
end
|
163
|
+
end
|
164
|
+
ensure
|
165
|
+
Dir.rmdir(path) if File.exist?(path)
|
166
|
+
end
|
167
|
+
end
|
139
168
|
end
|
metadata
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: childprocess
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
4
|
+
hash: 9
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 9
|
10
|
+
version: 0.1.9
|
6
11
|
platform: ruby
|
7
12
|
authors:
|
8
13
|
- Jari Bakken
|
@@ -10,7 +15,7 @@ autorequire:
|
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
17
|
|
13
|
-
date: 2011-
|
18
|
+
date: 2011-05-13 00:00:00 +02:00
|
14
19
|
default_executable:
|
15
20
|
dependencies:
|
16
21
|
- !ruby/object:Gem::Dependency
|
@@ -21,6 +26,11 @@ dependencies:
|
|
21
26
|
requirements:
|
22
27
|
- - ">="
|
23
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 15
|
30
|
+
segments:
|
31
|
+
- 2
|
32
|
+
- 0
|
33
|
+
- 0
|
24
34
|
version: 2.0.0
|
25
35
|
type: :development
|
26
36
|
version_requirements: *id001
|
@@ -32,6 +42,9 @@ dependencies:
|
|
32
42
|
requirements:
|
33
43
|
- - ">="
|
34
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
46
|
+
segments:
|
47
|
+
- 0
|
35
48
|
version: "0"
|
36
49
|
type: :development
|
37
50
|
version_requirements: *id002
|
@@ -43,6 +56,11 @@ dependencies:
|
|
43
56
|
requirements:
|
44
57
|
- - ~>
|
45
58
|
- !ruby/object:Gem::Version
|
59
|
+
hash: 27
|
60
|
+
segments:
|
61
|
+
- 1
|
62
|
+
- 0
|
63
|
+
- 6
|
46
64
|
version: 1.0.6
|
47
65
|
type: :runtime
|
48
66
|
version_requirements: *id003
|
@@ -107,17 +125,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
107
125
|
requirements:
|
108
126
|
- - ">="
|
109
127
|
- !ruby/object:Gem::Version
|
128
|
+
hash: 3
|
129
|
+
segments:
|
130
|
+
- 0
|
110
131
|
version: "0"
|
111
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
133
|
none: false
|
113
134
|
requirements:
|
114
135
|
- - ">="
|
115
136
|
- !ruby/object:Gem::Version
|
137
|
+
hash: 3
|
138
|
+
segments:
|
139
|
+
- 0
|
116
140
|
version: "0"
|
117
141
|
requirements: []
|
118
142
|
|
119
143
|
rubyforge_project: childprocess
|
120
|
-
rubygems_version: 1.
|
144
|
+
rubygems_version: 1.3.7
|
121
145
|
signing_key:
|
122
146
|
specification_version: 3
|
123
147
|
summary: This gem aims at being a simple and reliable solution for controlling external programs running in the background on any Ruby / OS combination.
|