module CaptainHoog::Cli::Git

Public Instance Methods

check_if_git_present() click to toggle source
# File lib/captain_hoog/cli/git.rb, line 18
def check_if_git_present
  if not is_git_repository?
    puts "I can't detect a Git repository".red
    raise Thor::Error
  end
end
git_dir() click to toggle source
# File lib/captain_hoog/cli/git.rb, line 14
def git_dir
  Pathname.new(Dir.getwd)
end
hooks_dir() click to toggle source
# File lib/captain_hoog/cli/git.rb, line 10
def hooks_dir
  git_dir.join(".git", "hooks")
end
is_git_repository?() click to toggle source
# File lib/captain_hoog/cli/git.rb, line 6
def is_git_repository?
 File.exist?(File.join(Dir.getwd, ".git"))
end