Class: Hippo::BuildSpec
- Inherits:
-
Object
- Object
- Hippo::BuildSpec
- Defined in:
- lib/hippo/build_spec.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #dockerfile ⇒ Object
- #image_name ⇒ Object
- #image_name_for_commit(commit_ref) ⇒ Object
-
#initialize(recipe, name, options) ⇒ BuildSpec
constructor
A new instance of BuildSpec.
- #template_vars ⇒ Object
Constructor Details
#initialize(recipe, name, options) ⇒ BuildSpec
Returns a new instance of BuildSpec.
7 8 9 10 11 |
# File 'lib/hippo/build_spec.rb', line 7 def initialize(recipe, name, ) @recipe = recipe @name = name @options = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/hippo/build_spec.rb', line 5 def name @name end |
Instance Method Details
#dockerfile ⇒ Object
13 14 15 |
# File 'lib/hippo/build_spec.rb', line 13 def dockerfile @options['dockerfile'] || 'Dockerfile' end |
#image_name ⇒ Object
17 18 19 |
# File 'lib/hippo/build_spec.rb', line 17 def image_name @options['image-name'] end |
#image_name_for_commit(commit_ref) ⇒ Object
21 22 23 |
# File 'lib/hippo/build_spec.rb', line 21 def image_name_for_commit(commit_ref) "#{image_name}:#{commit_ref}" end |
#template_vars ⇒ Object
25 26 27 28 29 30 |
# File 'lib/hippo/build_spec.rb', line 25 def template_vars { 'dockerfile' => dockerfile, 'image-name' => image_name } end |