Module: RoRoSupport::Git

Defined in:
lib/roro_support/git.rb

Instance Method Summary collapse

Instance Method Details

#git(bash, repo_path = Dir.pwd) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/roro_support/git.rb', line 5

def git(bash, repo_path=Dir.pwd)
  repo = Grit::Repo.new repo_path
  ::Grit::Git.git_timeout = 30
  args = handle(bash)
  command = args.shift
  result = eval(bash_format(command, args))
  print result.join if result.respond_to?(:join)
end

#git_commit_all(msg) ⇒ Object



14
15
16
17
# File 'lib/roro_support/git.rb', line 14

def git_commit_all(msg)
  repo = Grit::Repo.new Dir.pwd
  repo.commit_all(msg)
end