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

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

Overview

Remote

Instance Attribute Summary collapse

Attributes inherited from Artifact::Base

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Remote.



45
46
47
48
49
50
# File 'lib/dapp/config/directive/git_artifact.rb', line 45

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

Instance Attribute Details

#_branchObject

Returns the value of attribute _branch.



43
44
45
# File 'lib/dapp/config/directive/git_artifact.rb', line 43

def _branch
  @_branch
end

#_nameObject

Returns the value of attribute _name.



43
44
45
# File 'lib/dapp/config/directive/git_artifact.rb', line 43

def _name
  @_name
end

#_urlObject

Returns the value of attribute _url.



43
44
45
# File 'lib/dapp/config/directive/git_artifact.rb', line 43

def _url
  @_url
end

Instance Method Details

#_artifact_optionsObject



52
53
54
# File 'lib/dapp/config/directive/git_artifact.rb', line 52

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