Module: Git
- Defined in:
- lib/git/lib.rb,
lib/git.rb,
lib/git/base.rb
Overview
Available Git commands
Defined Under Namespace
Class Method Summary collapse
-
.check_git_existance ⇒ Object
checks if git is installed.
-
.check_repo_existance ⇒ Object
checks if current directory is a git repository.
- .clear_cache ⇒ Object
- .commit_all(message) ⇒ Object
-
.git ⇒ Object
so Git calls follow the Git.<command> pattern.
- .init ⇒ Object
- .log ⇒ Object
- .status ⇒ Object
Class Method Details
.check_git_existance ⇒ Object
checks if git is installed
8 9 10 11 12 13 14 |
# 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 ⇒ Object
checks if current directory is a git repository
17 18 19 20 21 22 23 |
# 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 ⇒ Object
42 43 44 |
# File 'lib/git.rb', line 42 def self.clear_cache Git::Lib.clear_cache end |
.commit_all(message) ⇒ Object
38 39 40 |
# File 'lib/git.rb', line 38 def self.commit_all() Git::Lib.commit_all() end |