Module: CaptainHoog::Cli::Pull

Included in:
Hoog, Treasury
Defined in:
lib/captain_hoog/cli/pull.rb

Class Method Summary collapse

Class Method Details

.pull_and_clone(repository_url, path) ⇒ Object



6
7
8
9
10
11
# File 'lib/captain_hoog/cli/pull.rb', line 6

def pull_and_clone(repository_url, path)
  target_name = File.basename(repository_url.split('/').last, '.git')
  ::Git.clone(repository_url, target_name, path: path)
rescue
  puts "Default hookin treasury already exists. Skipping.".yellow
end