rbbt-util 5.17.3 → 5.17.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/util/log.rb +5 -1
- data/lib/rbbt/util/tar.rb +25 -17
- data/lib/rbbt/workflow/accessor.rb +3 -2
- 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: a7fe012a90bd3fda632307cdd2bc21e3020b1814
|
4
|
+
data.tar.gz: c5d10734f03329aa7894c55287e8b2fb796cfa7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dcd0d695669e781a8f6fa009e9db1b603becdbf50c787f46a3cc21813bf4a57e0be11ada30023994e40de48e1b6367227d19081e2343950008e28ab117077ac
|
7
|
+
data.tar.gz: 1a42db795b2f52a78b2bf1fde307f3d5a85bdbb363430eb28b87aabf0becaf45302331d0e5bf05e0698119b8258c37c7f349ef978cf241151255fcce0b154cdf
|
data/lib/rbbt/util/log.rb
CHANGED
@@ -268,7 +268,11 @@ def ppp(message)
|
|
268
268
|
stack = caller
|
269
269
|
puts "#{Log.color :cyan, "PRINT:"} " << stack.first
|
270
270
|
puts ""
|
271
|
-
|
271
|
+
if message.length > 200 or message.include? "\n"
|
272
|
+
puts Log.color(:cyan, "=>|") << "\n" << message.to_s
|
273
|
+
else
|
274
|
+
puts Log.color(:cyan, "=> ") << message.to_s
|
275
|
+
end
|
272
276
|
puts ""
|
273
277
|
end
|
274
278
|
|
data/lib/rbbt/util/tar.rb
CHANGED
@@ -76,31 +76,39 @@ module Misc
|
|
76
76
|
|
77
77
|
# un-gzips the given IO, returning the
|
78
78
|
# decompressed version as a StringIO
|
79
|
-
def ungzip(tarfile)
|
79
|
+
def self.ungzip(tarfile)
|
80
80
|
z = Zlib::GzipReader.new(tarfile)
|
81
81
|
unzipped = StringIO.new(z.read)
|
82
82
|
z.close
|
83
83
|
unzipped
|
84
84
|
end
|
85
85
|
|
86
|
+
def self._untar_cmd(io, destination)
|
87
|
+
FileUtils.mkdir_p destination unless File.exists? destination
|
88
|
+
CMD.cmd("tar xvf - -C '#{destination}'", :in => io)
|
89
|
+
nil
|
90
|
+
end
|
91
|
+
|
86
92
|
# untars the given IO into the specified
|
87
93
|
# directory
|
88
|
-
def untar(io, destination)
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
end
|
103
|
-
end
|
94
|
+
def self.untar(io, destination)
|
95
|
+
return _untar_cmd(io, destination)
|
96
|
+
|
97
|
+
#Gem::Package::TarReader.new io do |tar|
|
98
|
+
# tar.each do |tarfile|
|
99
|
+
# destination_file = File.join destination, tarfile.full_name
|
100
|
+
|
101
|
+
# if tarfile.directory?
|
102
|
+
# FileUtils.mkdir_p destination_file
|
103
|
+
# else
|
104
|
+
# destination_directory = File.dirname(destination_file)
|
105
|
+
# FileUtils.mkdir_p destination_directory unless File.directory?(destination_directory)
|
106
|
+
# File.open destination_file, "wb" do |f|
|
107
|
+
# f.print tarfile.read
|
108
|
+
# end
|
109
|
+
# end
|
110
|
+
# end
|
111
|
+
#end
|
104
112
|
end
|
105
113
|
end
|
106
114
|
|
@@ -518,10 +518,11 @@ module Workflow
|
|
518
518
|
case v
|
519
519
|
when Symbol
|
520
520
|
rec_dependency = real_dependencies.collect{|d| [d, d.rec_dependencies].compact.flatten}.flatten.select{|d| d.task.name == v }.first
|
521
|
-
|
521
|
+
input_options = dependency.first.task_info(dependency[1])[:input_options][i] || {}
|
522
|
+
if input_options[:stream]
|
522
523
|
inputs[i] = rec_dependency.run(true).grace.join.path
|
523
524
|
else
|
524
|
-
inputs[i] = rec_dependency.run
|
525
|
+
inputs[i] = rec_dependency.run
|
525
526
|
end
|
526
527
|
else
|
527
528
|
inputs[i] = v
|
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.17.
|
4
|
+
version: 5.17.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|