Class: Dapp::Config::Directive::GitArtifactRemote

Inherits:
GitArtifactLocal show all
Defined in:
lib/dapp/config/directive/git_artifact_remote.rb

Overview

GitArtifactRemote

Defined Under Namespace

Classes: Export

Instance Attribute Summary collapse

Attributes inherited from ArtifactBase

#_group, #_owner

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ GitArtifactRemote

Returns a new instance of GitArtifactRemote.



8
9
10
11
12
13
# File 'lib/dapp/config/directive/git_artifact_remote.rb', line 8

def initialize(url)
  @_url  = url
  @_name = url.gsub(%r{.*?([^\/ ]+)\.git}, '\\1')

  super()
end

Instance Attribute Details

#_branch ⇒ Object (readonly)

Returns the value of attribute _branch.



6
7
8
# File 'lib/dapp/config/directive/git_artifact_remote.rb', line 6

def _branch
  @_branch
end

#_commit ⇒ Object (readonly)

Returns the value of attribute _commit.



6
7
8
# File 'lib/dapp/config/directive/git_artifact_remote.rb', line 6

def _commit
  @_commit
end

#_name ⇒ Object (readonly)

Returns the value of attribute _name.



6
7
8
# File 'lib/dapp/config/directive/git_artifact_remote.rb', line 6

def _name
  @_name
end

#_url ⇒ Object (readonly)

Returns the value of attribute _url.



6
7
8
# File 'lib/dapp/config/directive/git_artifact_remote.rb', line 6

def _url
  @_url
end

Instance Method Details

#_export ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/dapp/config/directive/git_artifact_remote.rb', line 15

def _export
  super do |export|
    export._url    = @_url
    export._name   = @_name
    export._branch ||= @_branch
    export._commit ||= @_commit
  end
end