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

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

Overview

Remote

Instance Attribute Summary collapse

Attributes inherited from Local

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

Instance Method Summary collapse

Methods inherited from Local

#clone

Constructor Details

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

Returns a new instance of Remote.



64
65
66
67
68
69
70
# File 'lib/dapp/config/git_artifact.rb', line 64

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.



62
63
64
# File 'lib/dapp/config/git_artifact.rb', line 62

def _branch
  @_branch
end

#_name ⇒ Object

Returns the value of attribute _name.



62
63
64
# File 'lib/dapp/config/git_artifact.rb', line 62

def _name
  @_name
end

#_ssh_key_path ⇒ Object

Returns the value of attribute _ssh_key_path.



62
63
64
# File 'lib/dapp/config/git_artifact.rb', line 62

def _ssh_key_path
  @_ssh_key_path
end

#_url ⇒ Object

Returns the value of attribute _url.



62
63
64
# File 'lib/dapp/config/git_artifact.rb', line 62

def _url
  @_url
end

Instance Method Details

#_artifact_options ⇒ Object



72
73
74
# File 'lib/dapp/config/git_artifact.rb', line 72

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