rbbt-util 5.17.3 → 5.17.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41386b64d3172f2e311677030c785d23a7c95e94
4
- data.tar.gz: 6b2b16bf4cdba436b26e7642284ace59e6ee1be5
3
+ metadata.gz: a7fe012a90bd3fda632307cdd2bc21e3020b1814
4
+ data.tar.gz: c5d10734f03329aa7894c55287e8b2fb796cfa7f
5
5
  SHA512:
6
- metadata.gz: 9733e02ad94fe5a33800f0b3a08401bab49ee1424c3c2227c4ff95761e495aad5f4962a70eda8fe0b02b5300c4a24ea87495fd35b37345ab507fd2d621fca02c
7
- data.tar.gz: 6b1f42fe6470073932eb269989ac434fe75efbe0ffbea8ad04a6fcd015b99190e164564e90d759158cf07743f197234581e71cf66526bbc7aefa8332993fdd82
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
- puts Log.color(:cyan, "=> ") << message.to_s
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
- Gem::Package::TarReader.new io do |tar|
90
- tar.each do |tarfile|
91
- destination_file = File.join destination, tarfile.full_name
92
-
93
- if tarfile.directory?
94
- FileUtils.mkdir_p destination_file
95
- else
96
- destination_directory = File.dirname(destination_file)
97
- FileUtils.mkdir_p destination_directory unless File.directory?(destination_directory)
98
- File.open destination_file, "wb" do |f|
99
- f.print tarfile.read
100
- end
101
- end
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
- if (dependency.first.tasks[dependency[1]].input_options[i] || {})[:stream]
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(true).join.load
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.3
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-05 00:00:00.000000000 Z
11
+ date: 2015-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake