Class: SimpleDeploy::Artifact
- Inherits:
-
Object
- Object
- SimpleDeploy::Artifact
- Defined in:
- lib/simple_deploy/artifact.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
Returns the value of attribute metadata.
Instance Method Summary collapse
- #all_endpoints ⇒ Object
- #http_url ⇒ Object
- #https_url ⇒ Object
-
#initialize(args) ⇒ Artifact
constructor
A new instance of Artifact.
- #s3_url ⇒ Object
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
#metadata ⇒ Object
Returns the value of attribute metadata.
6 7 8 |
# File 'lib/simple_deploy/artifact.rb', line 6 def end |
Instance Method Details
#all_endpoints ⇒ Object
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_url ⇒ Object
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_url ⇒ Object
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_url ⇒ Object
25 26 27 28 |
# File 'lib/simple_deploy/artifact.rb', line 25 def s3_url key = "#{@region}-s3-url" [key] ? [key].first : nil end |