Class: Appifier::Actors::Retrivers::Archive

Inherits:
Object
  • Object
show all
Defined in:
lib/appifier/actors/retriever.rb

Class Method Summary collapse

Class Method Details

.get(origin:, destination:) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/appifier/actors/retriever.rb', line 19

def self.get(origin:, destination:)
  raise "Archive : #{origin} not found" unless File::exist? origin
  name = File.basename(origin, ".tgz") 
  raise "Template name format failed : must be .tgz file" if name.include?('.')
  untar_gz archive: origin, destination: destination
  return name
end