Class: Dapp::Config::GitArtifact::Remote

Inherits:
Local show all
Defined in:
lib/dapp/config/git_artifact.rb

Overview

Remote

Instance Attribute Summary collapse

Attributes inherited from Artifact::Base

#_cwd, #_group, #_owner, #_paths, #_where_to_add

Instance Method Summary collapse

Methods inherited from Artifact::Base

#clone

Constructor Details

#initialize(url, where_to_add, **options) ⇒ Remote

Returns a new instance of Remote.



38
39
40
41
42
43
44
# File 'lib/dapp/config/git_artifact.rb', line 38

def initialize(url, where_to_add, **options)
  @_url          = url
  @_name         = url.gsub(%r{.*?([^\/ ]+)\.git}, '\\1')
  @_branch       = options.delete(:branch)
  @_ssg_key_path = options.delete(:ssg_key_path)
  super(where_to_add, **options)
end

Instance Attribute Details

#_branch ⇒ Object

Returns the value of attribute _branch.



36
37
38
# File 'lib/dapp/config/git_artifact.rb', line 36

def _branch
  @_branch
end

#_name ⇒ Object

Returns the value of attribute _name.



36
37
38
# File 'lib/dapp/config/git_artifact.rb', line 36

def _name
  @_name
end

#_ssh_key_path ⇒ Object

Returns the value of attribute _ssh_key_path.



36
37
38
# File 'lib/dapp/config/git_artifact.rb', line 36

def _ssh_key_path
  @_ssh_key_path
end

#_url ⇒ Object

Returns the value of attribute _url.



36
37
38
# File 'lib/dapp/config/git_artifact.rb', line 36

def _url
  @_url
end

Instance Method Details

#_artifact_options ⇒ Object



46
47
48
# File 'lib/dapp/config/git_artifact.rb', line 46

def _artifact_options
  super.merge(name: _name, branch: _branch)
end