albacore 2.4.1 → 2.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/albacore/cross_platform_cmd.rb +13 -12
- data/lib/albacore/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0a173804828e8fec262da15c11b33854eb576d9
|
4
|
+
data.tar.gz: 947fd7c8917e02c47fd004cb194e2f039f9c9438
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a594f836cf00d4626dbc828dc8bafcd301dfa8d916f1d25e22ea8425fe343cad2acd02555e512d0c8c42b8c9cf78f7141736ada333611a370157f43e82206ed
|
7
|
+
data.tar.gz: 59d3576f7a92a9e984ba47497212a11f1c59ee155befc5b8302cd5b0c36be935839330fec9d1f209b123dbd96c73b08286942dc9251aa229f64c6e6b71f137c6
|
@@ -51,7 +51,7 @@ module Albacore
|
|
51
51
|
#
|
52
52
|
# system(cmd, [args array], Hash(opts), block|ok,status|)
|
53
53
|
# ok => false if bad exit code, or the output otherwise
|
54
|
-
#
|
54
|
+
#
|
55
55
|
# options are passed as the last argument
|
56
56
|
#
|
57
57
|
# options:
|
@@ -110,7 +110,7 @@ module Albacore
|
|
110
110
|
ret_str = inmem.string.encode 'utf-8', invalid: :replace, undef: :replace, replace: ''
|
111
111
|
return block.call(status.success? && ret_str, status, ret_str)
|
112
112
|
end
|
113
|
-
end
|
113
|
+
end
|
114
114
|
|
115
115
|
def stop
|
116
116
|
if pid
|
@@ -162,7 +162,7 @@ module Albacore
|
|
162
162
|
return block.call($? == 0 && lines, $?, lines)
|
163
163
|
end
|
164
164
|
end
|
165
|
-
|
165
|
+
|
166
166
|
# shell ignore exit code
|
167
167
|
# returns:
|
168
168
|
# [ok, status]
|
@@ -193,15 +193,16 @@ module Albacore
|
|
193
193
|
parameters = []
|
194
194
|
parameters << Paths.normalise_slashes(file) if dir == '.'
|
195
195
|
parameters << Paths.normalise_slashes("#{dir}:#{file}") unless dir == '.'
|
196
|
+
parameters << '2> nul' if ::Rake::Win32.windows?
|
196
197
|
cmd, parameters = Paths.normalise cmd, parameters
|
198
|
+
cmd = "#{cmd} #{parameters.join(' ')}"
|
197
199
|
|
198
|
-
trace { "#{cmd}
|
200
|
+
trace { "#{cmd} [cross_platform_cmd #which]" }
|
199
201
|
|
200
|
-
|
201
|
-
res = IO.popen([cmd, *parameters]) do |io|
|
202
|
+
res = IO.popen(cmd) do |io|
|
202
203
|
io.read.chomp
|
203
204
|
end
|
204
|
-
|
205
|
+
|
205
206
|
unless $? == 0
|
206
207
|
nil
|
207
208
|
else
|
@@ -211,7 +212,7 @@ module Albacore
|
|
211
212
|
trace "which/where returned #{$?}: #{e} [cross_platform_cmd #which]"
|
212
213
|
nil
|
213
214
|
end
|
214
|
-
|
215
|
+
|
215
216
|
def chdir wd, &block
|
216
217
|
return block.call if wd.nil?
|
217
218
|
Dir.chdir wd do
|
@@ -221,14 +222,14 @@ module Albacore
|
|
221
222
|
return res
|
222
223
|
end
|
223
224
|
end
|
224
|
-
|
225
|
+
|
225
226
|
private
|
226
227
|
|
227
228
|
def prepare_command cmd, clr_command = false, &block
|
228
229
|
cmd = cmd.unshift 'mono' if clr_command && ! ::Albacore.windows?
|
229
230
|
pars = cmd[1..-1].flatten
|
230
231
|
raise ArgumentError, "arguments 1..-1 must be an array" unless pars.is_a? Array
|
231
|
-
exe, pars = ::Albacore::Paths.normalise cmd[0], pars
|
232
|
+
exe, pars = ::Albacore::Paths.normalise cmd[0], pars
|
232
233
|
printable = %Q{#{exe} #{pars.join(' ')}}
|
233
234
|
handler = block_given? ? block : handler_with_message(printable)
|
234
235
|
[exe, pars, printable, handler]
|
@@ -244,7 +245,7 @@ module Albacore
|
|
244
245
|
rescue Errno::ENOENT => e
|
245
246
|
rescue_block.call(nil, PseudoStatus.new(127), e.to_s)
|
246
247
|
rescue IOError => e # rescue for JRuby
|
247
|
-
rescue_block.call(nil, PseudoStatus.new(127), e.to_s)
|
248
|
+
rescue_block.call(nil, PseudoStatus.new(127), e.to_s)
|
248
249
|
end
|
249
250
|
|
250
251
|
|
@@ -267,7 +268,7 @@ module Albacore
|
|
267
268
|
else
|
268
269
|
%{Command failed with status (#{status.exitstatus}):
|
269
270
|
#{cmd}}
|
270
|
-
end
|
271
|
+
end
|
271
272
|
end
|
272
273
|
|
273
274
|
# shuffle the executable to be a parameter to
|
data/lib/albacore/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: albacore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrik Feldt
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-06-
|
12
|
+
date: 2015-06-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|