Class: VimSitter::Gitter

Inherits:
Object
  • Object
show all
Defined in:
lib/vim_sitter/gitter.rb

Class Method Summary collapse

Class Method Details

.get(author, repo_name) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/vim_sitter/gitter.rb', line 6

def self.get author, repo_name
  if VimDir.repo_exists? repo_name
    puts "Pulling #{repo_name}"
    VimDir.cd_to_bundle repo_name
    system "git pull origin master"
  else
    puts "Cloning #{repo_name}"
    VimDir.cd_to_bundle
    system "git clone git://github.com/#{author}/#{repo_name}.git"
  end
end