Class: Avm::Git::Scms::GitSubrepo
- Inherits:
-
GitSubBase
- Object
- Scms::Base
- GitSubBase
- Avm::Git::Scms::GitSubrepo
- Defined in:
- lib/avm/git/scms/git_subrepo.rb
Instance Method Summary collapse
- #git_repo ⇒ EacGit::Local
- #git_subrepo ⇒ EacGit::Local::Subrepo
- #subpath ⇒ Pathname
- #update ⇒ Object
- #valid? ⇒ Boolean
Methods inherited from GitSubBase
Instance Method Details
#git_repo ⇒ EacGit::Local
17 18 19 |
# File 'lib/avm/git/scms/git_subrepo.rb', line 17 def git_repo @git_repo ||= ::EacGit::Local.find(path) end |
#git_subrepo ⇒ EacGit::Local::Subrepo
22 23 24 |
# File 'lib/avm/git/scms/git_subrepo.rb', line 22 def git_subrepo @git_subrepo ||= git_repo.subrepo(subpath) end |
#subpath ⇒ Pathname
27 28 29 |
# File 'lib/avm/git/scms/git_subrepo.rb', line 27 def subpath path..relative_path_from(git_repo.root_path.) end |
#update ⇒ Object
11 12 13 14 |
# File 'lib/avm/git/scms/git_subrepo.rb', line 11 def update git_subrepo.command('clean').execute! git_subrepo.command('pull').execute! end |
#valid? ⇒ Boolean
31 32 33 |
# File 'lib/avm/git/scms/git_subrepo.rb', line 31 def valid? path.join('.gitrepo').file? end |