Class: SimpleDeploy::Artifact

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_deploy/artifact.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Artifact

Returns a new instance of Artifact.



8
9
10
11
12
13
14
15
# File 'lib/simple_deploy/artifact.rb', line 8

def initialize(args)
  @region = args[:region]
  @config = args[:config]
  @artifact = Heirloom::Artifact.new :config => @config.artifact_repository

  self. = @artifact.show :name => args[:name],
                                 :id   => args[:id]
end

Instance Attribute Details

#metadataObject

Returns the value of attribute metadata.



6
7
8
# File 'lib/simple_deploy/artifact.rb', line 6

def 
  
end

Instance Method Details

#all_endpointsObject



17
18
19
20
21
22
23
# File 'lib/simple_deploy/artifact.rb', line 17

def all_endpoints
  {
    's3' => s3_url,
    'http' => http_url,
    'https' => https_url
  }
end

#http_urlObject



30
31
32
33
# File 'lib/simple_deploy/artifact.rb', line 30

def http_url
  key = "#{@region}-http-url"
  [key] ? [key].first : nil
end

#https_urlObject



35
36
37
38
# File 'lib/simple_deploy/artifact.rb', line 35

def https_url
  key = "#{@region}-https-url"
  [key] ? [key].first : nil
end

#s3_urlObject



25
26
27
28
# File 'lib/simple_deploy/artifact.rb', line 25

def s3_url
  key = "#{@region}-s3-url"
  [key] ? [key].first : nil
end