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.
12 13 14 15 16 17 |
# File 'lib/git_repo/adapters/rugged.rb', line 12 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
19 20 21 |
# File 'lib/git_repo/adapters/rugged.rb', line 19 def get_file_content(path) get_tree().get_file_content(path) end |
#list_files ⇒ Object
23 24 25 |
# File 'lib/git_repo/adapters/rugged.rb', line 23 def list_files() get_tree().list_files() end |