Class: Carson::Adapters::Git

Inherits:
Object
  • Object
show all
Defined in:
lib/carson/adapters/git.rb

Instance Method Summary collapse

Constructor Details

#initialize(repo_root:) ⇒ Git

Returns a new instance of Git.



6
7
8
# File 'lib/carson/adapters/git.rb', line 6

def initialize( repo_root: )
	@repo_root = repo_root
end

Instance Method Details

#run(*args) ⇒ Object



10
11
12
13
# File 'lib/carson/adapters/git.rb', line 10

def run( *args )
	stdout_text, stderr_text, status = Open3.capture3( "git", *args, chdir: repo_root )
	[ stdout_text, stderr_text, status.success?, status.exitstatus ]
end