childprocess 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13d6fa4c53bfc8bced81226a842c321cd1f9efd6
4
- data.tar.gz: a3d8088d705d267bc4705ce7c5943c947da24904
3
+ metadata.gz: 2813e2328e6a671cf7a9fd9770c54ca6dffadbf3
4
+ data.tar.gz: 3fa9a43aca0f20bc3e8311095c89be609e5ca1f0
5
5
  SHA512:
6
- metadata.gz: 14f144cceccd0b92c3ef4b6380a2769c0243440c8458ae71df738b621ac0075e0efd1eeaba13111cdd267e362abcc6462364f6227e3dedbf819665c10559aaaf
7
- data.tar.gz: c23654e897ac4d32bba1383fa20f89a792c58a42b1bed1e69afa8c5da031b43fa171d915e9bfe043e2da4f58f46cebfdf633e84fb479da949a31848f64388f08
6
+ metadata.gz: e1df90b735c6dfb745b8d6d4e692ad77cc3a65a183d7780d565583f7b6110d5e5f6f3fcb442205a52be23719f06b194b530dd4ff21e900f584bb72cdbc23a7a7
7
+ data.tar.gz: f16cc8c838a59f683d8242fe31382e7577a17263f9a001e79b961b4d6a36ebbde32198025f3edbb872e81951bf3a8c295c4219a78e7bf0acbad950f35400258c
data/README.md CHANGED
@@ -153,6 +153,10 @@ ChildProcess.build("cmd.exe", "/c", "bundle")
153
153
  ChildProcess.build("ruby", "-S", "bundle")
154
154
  ```
155
155
 
156
+ ## Caveats
157
+
158
+ * With JRuby on Unix, modifying `ENV["PATH"]` before using childprocess could lead to 'Command not found' errors, since JRuby is unable to modify the environemnt used for PATH searches in `java.lang.ProcessBuilder`. This can be avoided by setting `ChildProcess.posix_spawn = true`.
159
+
156
160
  # Implementation
157
161
 
158
162
  How the process is launched and killed depends on the platform:
@@ -14,20 +14,20 @@ module ChildProcess
14
14
  attrs = Lib::Attrs.new
15
15
 
16
16
  if io.stdout
17
- actions.add_dup fileno_for(io.stdout), fileno_for($stdout)
17
+ actions.add_dup fileno_for(io.stdout), fileno_for(STDOUT)
18
18
  else
19
- actions.add_open fileno_for($stdout), "/dev/null", File::WRONLY, 0644
19
+ actions.add_open fileno_for(STDOUT), "/dev/null", File::WRONLY, 0644
20
20
  end
21
21
 
22
22
  if io.stderr
23
- actions.add_dup fileno_for(io.stderr), fileno_for($stderr)
23
+ actions.add_dup fileno_for(io.stderr), fileno_for(STDERR)
24
24
  else
25
- actions.add_open fileno_for($stderr), "/dev/null", File::WRONLY, 0644
25
+ actions.add_open fileno_for(STDERR), "/dev/null", File::WRONLY, 0644
26
26
  end
27
27
 
28
28
  if duplex?
29
29
  reader, writer = ::IO.pipe
30
- actions.add_dup fileno_for(reader), fileno_for($stdin)
30
+ actions.add_dup fileno_for(reader), fileno_for(STDIN)
31
31
  actions.add_close fileno_for(writer)
32
32
  end
33
33
 
@@ -1,3 +1,3 @@
1
1
  module ChildProcess
2
- VERSION = "0.5.6"
2
+ VERSION = "0.5.7"
3
3
  end
@@ -1,7 +1,17 @@
1
1
  require File.expand_path('../spec_helper', __FILE__)
2
2
 
3
3
  describe ChildProcess do
4
- it "can redirect stdout, stderr" do
4
+ it "can run even when $stdout is a StringIO" do
5
+ begin
6
+ stdout = $stdout
7
+ $stdout = StringIO.new
8
+ expect { sleeping_ruby.start }.to_not raise_error
9
+ ensure
10
+ $stdout = stdout
11
+ end
12
+ end
13
+
14
+ it "can redirect stdout, stderr" do
5
15
  process = ruby(<<-CODE)
6
16
  [STDOUT, STDERR].each_with_index do |io, idx|
7
17
  io.sync = true
metadata CHANGED
@@ -1,89 +1,89 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: childprocess
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jari Bakken
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-08 00:00:00.000000000 Z
11
+ date: 2015-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.0.0
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: yard
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.9.2
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.9.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: coveralls
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: ffi
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.0'
76
- - - ">="
76
+ - - '>='
77
77
  - !ruby/object:Gem::Version
78
78
  version: 1.0.11
79
79
  type: :runtime
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - "~>"
83
+ - - ~>
84
84
  - !ruby/object:Gem::Version
85
85
  version: '1.0'
86
- - - ">="
86
+ - - '>='
87
87
  - !ruby/object:Gem::Version
88
88
  version: 1.0.11
89
89
  description: This gem aims at being a simple and reliable solution for controlling
@@ -94,10 +94,10 @@ executables: []
94
94
  extensions: []
95
95
  extra_rdoc_files: []
96
96
  files:
97
- - ".document"
98
- - ".gitignore"
99
- - ".rspec"
100
- - ".travis.yml"
97
+ - .document
98
+ - .gitignore
99
+ - .rspec
100
+ - .travis.yml
101
101
  - Gemfile
102
102
  - LICENSE
103
103
  - README.md
@@ -148,17 +148,17 @@ require_paths:
148
148
  - lib
149
149
  required_ruby_version: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - ">="
151
+ - - '>='
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  requirements:
156
- - - ">="
156
+ - - '>='
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
159
  requirements: []
160
160
  rubyforge_project: childprocess
161
- rubygems_version: 2.2.0
161
+ rubygems_version: 2.0.14
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: This gem aims at being a simple and reliable solution for controlling external
@@ -172,4 +172,3 @@ test_files:
172
172
  - spec/spec_helper.rb
173
173
  - spec/unix_spec.rb
174
174
  - spec/windows_spec.rb
175
- has_rdoc: