Class: Dapp::Dimg::Config::Directive::GitArtifactRemote::Export

Inherits:
Dapp::Dimg::Config::Directive::GitArtifactLocal::Export show all
Defined in:
lib/dapp/dimg/config/directive/git_artifact_remote.rb

Instance Attribute Summary collapse

Attributes inherited from Dapp::Dimg::Config::Directive::GitArtifactLocal::Export

#_as

Attributes inherited from ArtifactBase::Export

#_cwd, #_exclude_paths, #_group, #_include_paths, #_owner, #_to

Instance Method Summary collapse

Methods inherited from Dapp::Dimg::Config::Directive::GitArtifactLocal::Export

#stage_dependencies

Methods inherited from ArtifactBase::Export

#exclude_paths, #group, #include_paths, #initialize, #owner, #to

Methods inherited from Base

#clone_to_artifact

Methods inherited from Config::Directive::Base

#clone, #encode_with, #initialize

Constructor Details

This class inherits a constructor from Dapp::Dimg::Config::Directive::ArtifactBase::Export

Instance Attribute Details

#_branchObject

Returns the value of attribute _branch.



42
43
44
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 42

def _branch
  @_branch
end

#_commitObject

Returns the value of attribute _commit.



42
43
44
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 42

def _commit
  @_commit
end

#_nameObject

Returns the value of attribute _name.



42
43
44
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 42

def _name
  @_name
end

#_tagObject

Returns the value of attribute _tag.



42
43
44
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 42

def _tag
  @_tag
end

#_urlObject

Returns the value of attribute _url.



42
43
44
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 42

def _url
  @_url
end

Instance Method Details

#_artifact_optionsObject



44
45
46
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 44

def _artifact_options
  super.merge(name: _name, branch: _branch, tag: _tag, commit: _commit)
end

#branch(value) ⇒ Object



48
49
50
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 48

def branch(value)
  sub_directive_eval { @_branch = value.to_s }
end

#commit(value) ⇒ Object



56
57
58
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 56

def commit(value)
  sub_directive_eval { @_commit = value.to_s }
end

#tag(value) ⇒ Object



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

def tag(value)
  sub_directive_eval { @_tag = value.to_s }
end

#validate!Object



60
61
62
63
64
# File 'lib/dapp/dimg/config/directive/git_artifact_remote.rb', line 60

def validate!
  super
  refs = [_branch, _tag, _commit].compact
  raise ::Dapp::Error::Config, code: :git_artifact_remote_with_refs if refs.length > 1
end