Class: Dapp::GitRepo::Own

Inherits:
Base
  • Object
show all
Defined in:
lib/dapp/git_repo/own.rb

Overview

Own Git repo

Instance Attribute Summary

Attributes inherited from Base

#application, #name

Instance Method Summary collapse

Methods inherited from Base

#branch, #cleanup!, #commit_at, #exist_in_commit?, #git_bare

Constructor Details

#initialize(application) ⇒ Own

Returns a new instance of Own.



5
6
7
# File 'lib/dapp/git_repo/own.rb', line 5

def initialize(application)
  super(application, 'own')
end

Instance Method Details

#container_pathObject



9
10
11
# File 'lib/dapp/git_repo/own.rb', line 9

def container_path
  application.container_dapp_path('own', "#{name}.git")
end

#latest_commit(branch = nil) ⇒ Object



17
18
19
# File 'lib/dapp/git_repo/own.rb', line 17

def latest_commit(branch = nil)
  super(branch || 'HEAD')
end

#pathObject



13
14
15
# File 'lib/dapp/git_repo/own.rb', line 13

def path
  @path ||= Pathname(git("-C #{application.home_path} rev-parse --git-dir").stdout.strip).expand_path
end