Module: Conjur::Debify::Utils
- Defined in:
- lib/conjur/debify/utils.rb
Class Method Summary collapse
-
.copy_from_container(container, path) ⇒ Object
copy a file from container to the current working directory.
Class Method Details
.copy_from_container(container, path) ⇒ Object
copy a file from container to the current working directory
7 8 9 10 11 12 13 14 |
# File 'lib/conjur/debify/utils.rb', line 7 def copy_from_container container, path tar = StringIO.new container.archive_out(path) { |chunk| tar.write chunk } tar.rewind Gem::Package::TarReader.new(tar).each do |entry| File.write entry.full_name, entry.read end end |