Class: DtkCommon::GitRepo::Adapter::Rugged

Inherits:
Object
  • Object
show all
Includes:
CommonMixin
Defined in:
lib/git_repo/adapters/rugged.rb,
lib/git_repo/adapters/rugged/blob.rb,
lib/git_repo/adapters/rugged/tree.rb,
lib/git_repo/adapters/rugged/commit.rb,
lib/git_repo/adapters/rugged/common.rb

Defined Under Namespace

Modules: CommonMixin Classes: Blob, Branch, Commit, Obj, Tree

Instance Method Summary collapse

Constructor Details

#initialize(repo_path, branch = nil) ⇒ Rugged

Returns a new instance of Rugged.



29
30
31
32
33
34
# File 'lib/git_repo/adapters/rugged.rb', line 29

def initialize(repo_path,branch=nil)
  if branch.nil?
    raise Error.new("Not implemented yet creating Rugged adapter w/o a branch")
  end
  @repo_branch = Branch.new(::Rugged::Repository.new(repo_path),branch)
end

Instance Method Details

#get_file_content(path) ⇒ Object



36
37
38
# File 'lib/git_repo/adapters/rugged.rb', line 36

def get_file_content(path)
  get_tree().get_file_content(path)
end

#list_filesObject



40
41
42
# File 'lib/git_repo/adapters/rugged.rb', line 40

def list_files()
   get_tree().list_files()
end