Class: UffizziCore::ComposeFile::Builders::TemplateBuilderService
- Inherits:
-
Object
- Object
- UffizziCore::ComposeFile::Builders::TemplateBuilderService
- Defined in:
- app/services/uffizzi_core/compose_file/builders/template_builder_service.rb
Instance Attribute Summary collapse
-
#credentials ⇒ Object
Returns the value of attribute credentials.
-
#project ⇒ Object
Returns the value of attribute project.
-
#repositories ⇒ Object
Returns the value of attribute repositories.
Instance Method Summary collapse
- #build_attributes(compose_data, compose_dependencies, source) ⇒ Object
-
#initialize(credentials, project, repositories = []) ⇒ TemplateBuilderService
constructor
A new instance of TemplateBuilderService.
Constructor Details
#initialize(credentials, project, repositories = []) ⇒ TemplateBuilderService
Returns a new instance of TemplateBuilderService.
6 7 8 9 10 |
# File 'app/services/uffizzi_core/compose_file/builders/template_builder_service.rb', line 6 def initialize(credentials, project, repositories = []) @credentials = credentials @project = project @repositories = repositories end |
Instance Attribute Details
#credentials ⇒ Object
Returns the value of attribute credentials.
4 5 6 |
# File 'app/services/uffizzi_core/compose_file/builders/template_builder_service.rb', line 4 def credentials @credentials end |
#project ⇒ Object
Returns the value of attribute project.
4 5 6 |
# File 'app/services/uffizzi_core/compose_file/builders/template_builder_service.rb', line 4 def project @project end |
#repositories ⇒ Object
Returns the value of attribute repositories.
4 5 6 |
# File 'app/services/uffizzi_core/compose_file/builders/template_builder_service.rb', line 4 def repositories @repositories end |
Instance Method Details
#build_attributes(compose_data, compose_dependencies, source) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/services/uffizzi_core/compose_file/builders/template_builder_service.rb', line 12 def build_attributes(compose_data, compose_dependencies, source) containers_data = compose_data[:containers] ingress_data = compose_data[:ingress] continuous_preview_global_data = compose_data[:continuous_preview] containers_attributes = build_containers_attributes( containers_data, ingress_data, continuous_preview_global_data, compose_dependencies, ) { name: source, payload: { containers_attributes: containers_attributes, }, } end |