Class: MonoGitHub

Inherits:
Object
  • Object
show all
Defined in:
lib/mono/base.rb

Overview

todo/fix: ALWAYS assert name format

(rename to mononame and monopath) - why? why not?

Class Method Summary collapse

Class Method Details

.clone(name) ⇒ Object



59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/mono/base.rb', line 59

def self.clone( name )
  path = MonoFile.expand_path( name )

  org_path = File.dirname( path )
  FileUtils.mkdir_p( org_path ) unless Dir.exist?( org_path )   ## make sure path exists


  ### note: use a github clone url (using ssh) like:

  ##     [email protected]:rubycoco/gitti.git

  ssh_clone_url = "[email protected]:#{name}.git"

  Dir.chdir( org_path ) do
    Gitti::Git.clone( ssh_clone_url )
  end
end