Class: Repokeeper::RepoProxy
- Inherits:
-
Object
- Object
- Repokeeper::RepoProxy
- Defined in:
- lib/repokeeper/repo_proxy.rb
Defined Under Namespace
Classes: BoundedWalker
Instance Method Summary collapse
- #commits(rev_range = nil) ⇒ Object
-
#initialize(repo_path) ⇒ RepoProxy
constructor
A new instance of RepoProxy.
- #local_branches ⇒ Object
- #remote_branches ⇒ Object
Constructor Details
#initialize(repo_path) ⇒ RepoProxy
Returns a new instance of RepoProxy.
23 24 25 |
# File 'lib/repokeeper/repo_proxy.rb', line 23 def initialize(repo_path) @repo = open_repo(repo_path) end |
Instance Method Details
#commits(rev_range = nil) ⇒ Object
27 28 29 30 31 |
# File 'lib/repokeeper/repo_proxy.rb', line 27 def commits(rev_range = nil) rev_range ||= RevParser::RevRange.new rev_range = check_rev_range(rev_range) create_walker(rev_range).to_a end |
#local_branches ⇒ Object
33 34 35 |
# File 'lib/repokeeper/repo_proxy.rb', line 33 def local_branches @repo.branches.each_name(:local).sort end |
#remote_branches ⇒ Object
37 38 39 |
# File 'lib/repokeeper/repo_proxy.rb', line 37 def remote_branches @repo.branches.each_name(:remote).sort end |