rbbt-util 5.21.80 → 5.21.81
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/tsv/accessor.rb +8 -2
- data/lib/rbbt/util/R/eval.rb +4 -2
- data/lib/rbbt/util/misc/development.rb +2 -0
- data/lib/rbbt/util/misc/pipes.rb +11 -4
- 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: 766488431c24999dc06dbf6b06f7541e1ce0c0da
|
4
|
+
data.tar.gz: ef2edb51a1ea3d2591ba43aa3350162a043724ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b902a43f746f2c0eb1b0340b320c149487c8bab0edaff78d21950296e0565955ca342a1624e0d1f38a2065dbe6a9f7e2ccf578dfe6f2043a531154628be35312
|
7
|
+
data.tar.gz: 9cb934bec141ad0870e3644d25bf5c31f19ea26427ce1a74f1991fcc56e0ea7fac3961b2f455ddcb838dac74ad3549f8155ecb5b5fd2576d7139e552624f702a
|
data/lib/rbbt/tsv/accessor.rb
CHANGED
@@ -563,7 +563,13 @@ module TSV
|
|
563
563
|
options[:type] = :list if unmerge
|
564
564
|
|
565
565
|
TSV::Dumper.stream options do |dumper|
|
566
|
-
|
566
|
+
case no_options
|
567
|
+
when FalseClass, nil
|
568
|
+
dumper.init
|
569
|
+
when Hash
|
570
|
+
dumper.init(no_options)
|
571
|
+
end
|
572
|
+
|
567
573
|
begin
|
568
574
|
if keys
|
569
575
|
keys.each do |key|
|
@@ -598,7 +604,7 @@ module TSV
|
|
598
604
|
end
|
599
605
|
|
600
606
|
def to_s(keys = nil, no_options = false, unmerge = false)
|
601
|
-
if FalseClass === keys or TrueClass === keys
|
607
|
+
if FalseClass === keys or TrueClass === keys or Hash === keys
|
602
608
|
no_options = keys
|
603
609
|
keys = nil
|
604
610
|
end
|
data/lib/rbbt/util/R/eval.rb
CHANGED
@@ -90,9 +90,11 @@ module R
|
|
90
90
|
$stdout.reopen File.new('/dev/null', 'w')
|
91
91
|
exec(ENV, cmd)
|
92
92
|
end
|
93
|
-
|
94
|
-
|
93
|
+
|
94
|
+
Misc.insist(10, 0.5, false) do
|
95
|
+
raise "Rserve did not start" unless File.exist? pid_file
|
95
96
|
end
|
97
|
+
|
96
98
|
@@instance_process = Open.read(pid_file).to_i
|
97
99
|
Log.info "New Rserver session stated with PID (#{sh_pid}) #{@@instance_process}: #{SESSION}"
|
98
100
|
end
|
@@ -158,6 +158,8 @@ def self.add_libdir(dir=nil)
|
|
158
158
|
rescue Exception
|
159
159
|
if msg
|
160
160
|
Log.warn("Insisting after exception: #{$!.class} #{$!.message} -- #{msg}")
|
161
|
+
elsif FalseClass === msg
|
162
|
+
nil
|
161
163
|
else
|
162
164
|
Log.warn("Insisting after exception: #{$!.class} #{$!.message}")
|
163
165
|
end
|
data/lib/rbbt/util/misc/pipes.rb
CHANGED
@@ -267,8 +267,12 @@ module Misc
|
|
267
267
|
end
|
268
268
|
|
269
269
|
if in_thread
|
270
|
-
Thread.new do
|
271
|
-
|
270
|
+
Thread.new(Thread.current) do |parent|
|
271
|
+
begin
|
272
|
+
consume_stream(io, false, into, into_close)
|
273
|
+
rescue Exception
|
274
|
+
parent.raise $!
|
275
|
+
end
|
272
276
|
end
|
273
277
|
else
|
274
278
|
if into
|
@@ -279,7 +283,11 @@ module Misc
|
|
279
283
|
|
280
284
|
begin
|
281
285
|
into = into.find if Path === into
|
282
|
-
|
286
|
+
if String === into
|
287
|
+
dir = File.dirname(into)
|
288
|
+
FileUtils.mkdir_p dir unless Open.exists?(dir)
|
289
|
+
into_path, into = into, Open.open(into, :mode => 'w')
|
290
|
+
end
|
283
291
|
into.sync = true if IO === into
|
284
292
|
into_close = false unless into.respond_to? :close
|
285
293
|
io.sync = true
|
@@ -304,7 +312,6 @@ module Misc
|
|
304
312
|
rescue Exception
|
305
313
|
Log.medium "Exception consuming stream: #{Misc.fingerprint io}: #{$!.message}"
|
306
314
|
io.abort $! if io.respond_to? :abort
|
307
|
-
#io.close unless io.closed?
|
308
315
|
FileUtils.rm into_path if into_path and File.exists? into_path
|
309
316
|
raise $!
|
310
317
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.21.
|
4
|
+
version: 5.21.81
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|