childprocess 0.8.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.document +6 -6
- data/.gitignore +28 -28
- data/.rspec +1 -1
- data/.travis.yml +42 -36
- data/CHANGELOG.md +67 -44
- data/Gemfile +18 -15
- data/LICENSE +20 -20
- data/README.md +216 -192
- data/Rakefile +61 -61
- data/appveyor.yml +42 -43
- data/childprocess.gemspec +32 -30
- data/ext/mkrf_conf.rb +24 -0
- data/lib/childprocess/abstract_io.rb +36 -36
- data/lib/childprocess/abstract_process.rb +192 -192
- data/lib/childprocess/errors.rb +37 -26
- data/lib/childprocess/jruby/io.rb +16 -16
- data/lib/childprocess/jruby/process.rb +184 -159
- data/lib/childprocess/jruby/pump.rb +53 -53
- data/lib/childprocess/jruby.rb +56 -56
- data/lib/childprocess/tools/generator.rb +145 -145
- data/lib/childprocess/unix/fork_exec_process.rb +78 -70
- data/lib/childprocess/unix/io.rb +21 -21
- data/lib/childprocess/unix/lib.rb +186 -186
- data/lib/childprocess/unix/platform/i386-linux.rb +12 -12
- data/lib/childprocess/unix/platform/i386-solaris.rb +11 -11
- data/lib/childprocess/unix/platform/x86_64-linux.rb +12 -12
- data/lib/childprocess/unix/platform/x86_64-macosx.rb +11 -11
- data/lib/childprocess/unix/posix_spawn_process.rb +134 -134
- data/lib/childprocess/unix/process.rb +90 -89
- data/lib/childprocess/unix.rb +9 -9
- data/lib/childprocess/version.rb +3 -3
- data/lib/childprocess/windows/handle.rb +91 -91
- data/lib/childprocess/windows/io.rb +25 -25
- data/lib/childprocess/windows/lib.rb +416 -416
- data/lib/childprocess/windows/process.rb +130 -130
- data/lib/childprocess/windows/process_builder.rb +178 -175
- data/lib/childprocess/windows/structs.rb +148 -148
- data/lib/childprocess/windows.rb +33 -33
- data/lib/childprocess.rb +210 -205
- data/spec/abstract_io_spec.rb +12 -12
- data/spec/childprocess_spec.rb +447 -391
- data/spec/get_env.ps1 +13 -0
- data/spec/io_spec.rb +228 -228
- data/spec/jruby_spec.rb +24 -24
- data/spec/pid_behavior.rb +12 -12
- data/spec/platform_detection_spec.rb +86 -86
- data/spec/spec_helper.rb +270 -261
- data/spec/unix_spec.rb +57 -57
- data/spec/windows_spec.rb +23 -23
- metadata +18 -33
@@ -1,25 +1,25 @@
|
|
1
|
-
module ChildProcess
|
2
|
-
module Windows
|
3
|
-
class IO < AbstractIO
|
4
|
-
private
|
5
|
-
|
6
|
-
def check_type(io)
|
7
|
-
return if has_fileno?(io)
|
8
|
-
return if has_to_io?(io)
|
9
|
-
|
10
|
-
raise ArgumentError, "#{io.inspect}:#{io.class} must have :fileno or :to_io"
|
11
|
-
end
|
12
|
-
|
13
|
-
def has_fileno?(io)
|
14
|
-
io.respond_to?(:fileno) && io.fileno
|
15
|
-
end
|
16
|
-
|
17
|
-
def has_to_io?(io)
|
18
|
-
io.respond_to?(:to_io) && io.to_io.kind_of?(::IO)
|
19
|
-
end
|
20
|
-
|
21
|
-
end # IO
|
22
|
-
end # Windows
|
23
|
-
end # ChildProcess
|
24
|
-
|
25
|
-
|
1
|
+
module ChildProcess
|
2
|
+
module Windows
|
3
|
+
class IO < AbstractIO
|
4
|
+
private
|
5
|
+
|
6
|
+
def check_type(io)
|
7
|
+
return if has_fileno?(io)
|
8
|
+
return if has_to_io?(io)
|
9
|
+
|
10
|
+
raise ArgumentError, "#{io.inspect}:#{io.class} must have :fileno or :to_io"
|
11
|
+
end
|
12
|
+
|
13
|
+
def has_fileno?(io)
|
14
|
+
io.respond_to?(:fileno) && io.fileno
|
15
|
+
end
|
16
|
+
|
17
|
+
def has_to_io?(io)
|
18
|
+
io.respond_to?(:to_io) && io.to_io.kind_of?(::IO)
|
19
|
+
end
|
20
|
+
|
21
|
+
end # IO
|
22
|
+
end # Windows
|
23
|
+
end # ChildProcess
|
24
|
+
|
25
|
+
|