Class: Appifier::Actors::Retrivers::Git

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

Class Method Summary collapse

Class Method Details

.get(origin:, destination:) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/appifier/actors/retriever.rb', line 8

def self.get(origin:, destination:)
  uri = URI.parse(origin)
  path = uri.path
  name = File.basename(path, ".git") 
  raise "Git URL format failed (only http bare git format)" if name.include?('.')
  ::Git.clone(origin, nil, path: destination)
  return name
end