right_popen 1.0.18-x86-mswin32-60 → 1.0.19-x86-mswin32-60
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/right_popen/version.rb +1 -1
- data/lib/win32/right_popen.so +0 -0
- data/spec/right_popen_spec.rb +15 -0
- metadata +4 -4
data/lib/right_popen/version.rb
CHANGED
data/lib/win32/right_popen.so
CHANGED
Binary file
|
data/spec/right_popen_spec.rb
CHANGED
@@ -58,6 +58,21 @@ module RightScale
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
it 'should close all IO handlers, except STDIN, STDOUT and STDERR' do
|
62
|
+
GC.start
|
63
|
+
command = "\"#{RUBY_CMD}\" \"#{File.expand_path(File.join(File.dirname(__FILE__), 'produce_status.rb'))}\" #{EXIT_STATUS}"
|
64
|
+
runner = Runner.new
|
65
|
+
status = runner.run_right_popen(command)
|
66
|
+
status.status.exitstatus.should == EXIT_STATUS
|
67
|
+
useless_handlers = 0
|
68
|
+
ObjectSpace.each_object(IO) do |io|
|
69
|
+
if ![STDIN, STDOUT, STDERR].include?(io)
|
70
|
+
useless_handlers += 1 unless io.closed?
|
71
|
+
end
|
72
|
+
end
|
73
|
+
useless_handlers.should == 0
|
74
|
+
end
|
75
|
+
|
61
76
|
it 'should preserve the integrity of stdout when stderr is unavailable' do
|
62
77
|
count = LARGE_OUTPUT_COUNTER
|
63
78
|
command = "\"#{RUBY_CMD}\" \"#{File.expand_path(File.join(File.dirname(__FILE__), 'produce_stdout_only.rb'))}\" #{count}"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: right_popen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 49
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 19
|
10
|
+
version: 1.0.19
|
11
11
|
platform: x86-mswin32-60
|
12
12
|
authors:
|
13
13
|
- Scott Messier
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date:
|
20
|
+
date: 2012-03-01 00:00:00 -08:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|