module Git

Available Git commands

Public Class Methods

check_git_existance() click to toggle source

checks if git is installed

# File lib/git.rb, line 8
def self.check_git_existance
  output = git
  
  unless /\Ausage: git/ =~ output
    raise NoGitInstalledError, 'git was not found. make sure you have it installed'
  end
end
check_repo_existance() click to toggle source

checks if current directory is a git repository

# File lib/git.rb, line 17
def self.check_repo_existance
  output = status
  
  unless /\AOn branch/ =~ output
    raise NoGitRepositoryError, 'you are not in a git repository.'
  end
end
clear_cache() click to toggle source
# File lib/git.rb, line 46
def self.clear_cache
  Git::Lib.clear_cache
end
commit_all(message) click to toggle source
# File lib/git.rb, line 38
def self.commit_all(message)
  Git::Lib.commit_all(message)
end
git() click to toggle source

so Git calls follow the Git.<command> pattern

# File lib/git.rb, line 26
def self.git
  Git::Lib.git
end
init() click to toggle source
# File lib/git.rb, line 30
def self.init
  Git::Lib.init
end
log() click to toggle source
# File lib/git.rb, line 50
def self.log
  Git::Lib.log
end
remove_from_cache(file) click to toggle source
# File lib/git.rb, line 42
def self.remove_from_cache(file)
  Git::Lib.remove_from_cache(file)
end
status() click to toggle source
# File lib/git.rb, line 34
def self.status
  Git::Lib.status
end