Class: DtkCommon::GitRepo::Adapter::Rugged
- Inherits:
-
Object
- Object
- DtkCommon::GitRepo::Adapter::Rugged
- 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
- #get_file_content(path) ⇒ Object
-
#initialize(repo_path, branch = nil) ⇒ Rugged
constructor
A new instance of Rugged.
- #list_files ⇒ Object
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_files ⇒ Object
40 41 42 |
# File 'lib/git_repo/adapters/rugged.rb', line 40 def list_files() get_tree().list_files() end |