maestro_shell 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/util/shell.rb +18 -3
- data/lib/util/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: add94bfda2efcc465922fdd8362802d90c2a69bd
|
4
|
+
data.tar.gz: 5307a7c23ffd113b46050ac1736c15e0e4625188
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdedd12799acc1ccd9191f6419df3581956c1d61ba1f5518277f35a09a04da7f52174605495a38f519fd091bb8c314e3c353b3e100a76f1291c07a30e74c6093
|
7
|
+
data.tar.gz: affb611f2827f41a06873ff1c8458dea6413d787c9eafdd4d991d7258b3e205e2d57c8da533d64496551a0ade1cd5116eb58c773ae65b12ec96197f8431768b0
|
data/lib/util/shell.rb
CHANGED
@@ -26,7 +26,7 @@ module Maestro
|
|
26
26
|
end
|
27
27
|
|
28
28
|
# Utility variables
|
29
|
-
IS_WINDOWS =
|
29
|
+
IS_WINDOWS = ChildProcess.windows?
|
30
30
|
SEPARATOR = IS_WINDOWS ? "\\" : "/"
|
31
31
|
MOVE_COMMAND = IS_WINDOWS ? 'move' : 'mv'
|
32
32
|
ENV_EXPORT_COMMAND = IS_WINDOWS ? 'set' : 'export'
|
@@ -78,10 +78,24 @@ module Maestro
|
|
78
78
|
File.open(@output_file.path, 'a') do |out_file|
|
79
79
|
r, w = IO.pipe
|
80
80
|
ChildProcess.posix_spawn = true
|
81
|
-
|
81
|
+
if IS_WINDOWS
|
82
|
+
if ChildProcess.jruby?
|
83
|
+
# Due to https://github.com/jarib/childprocess/issues/26, we
|
84
|
+
# must use a different implementation of ChildProcess on
|
85
|
+
# Windows + JRuby
|
86
|
+
process = ChildProcess::JRuby::Process.new([@command_line])
|
87
|
+
else
|
88
|
+
process = ChildProcess.build(@command_line)
|
89
|
+
end
|
90
|
+
else
|
91
|
+
process = ChildProcess.build(BASH_EXECUTABLE, @command_line)
|
92
|
+
end
|
82
93
|
process.io.stdout = process.io.stderr = w
|
83
94
|
process.start
|
84
|
-
|
95
|
+
# On Windows, can't close the pipe until process has exited or you
|
96
|
+
# get an EOF, see
|
97
|
+
# https://github.com/jarib/childprocess/pull/22#issuecomment-3395687
|
98
|
+
w.close unless IS_WINDOWS
|
85
99
|
|
86
100
|
potential_eof = false
|
87
101
|
begin
|
@@ -113,6 +127,7 @@ module Maestro
|
|
113
127
|
|
114
128
|
r.close
|
115
129
|
process.wait unless process.exited?
|
130
|
+
w.close if IS_WINDOWS
|
116
131
|
@exit_code = ExitCode.new(process.exit_code)
|
117
132
|
end
|
118
133
|
|
data/lib/util/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maestro_shell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug Henderson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: childprocess
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
version: '0'
|
121
121
|
requirements: []
|
122
122
|
rubyforge_project:
|
123
|
-
rubygems_version: 2.
|
123
|
+
rubygems_version: 2.2.2
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: Maestro Shell utility
|