Class: Cangrejo::Modes::Git

Inherits:
Local
  • Object
show all
Defined in:
lib/cangrejo/modes/git.rb

Instance Attribute Summary

Attributes inherited from Local

#path, #process

Instance Method Summary collapse

Methods inherited from Local

#release

Constructor Details

#initialize(_url, _commit, _relative_path, _name = nil) ⇒ Git

Returns a new instance of Git.



8
9
10
11
12
13
14
15
# File 'lib/cangrejo/modes/git.rb', line 8

def initialize(_url, _commit, _relative_path, _name=nil)
  @url = _url
  @commit = _commit
  @relative_path = _relative_path
  @needs_bundle = false
  @name = _name || Digest::MD5.hexdigest(@url)
  super deploy_path
end

Instance Method Details

#setupObject



17
18
19
20
21
22
# File 'lib/cangrejo/modes/git.rb', line 17

def setup
  ensure_repo_clone
  ensure_repo_commit
  ensure_deps
  super
end