Class: UffizziCore::ComposeFile::Builders::DockerRepoBuilderService

Inherits:
Object
  • Object
show all
Defined in:
app/services/uffizzi_core/compose_file/builders/docker_repo_builder_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ DockerRepoBuilderService

Returns a new instance of DockerRepoBuilderService.



6
7
8
# File 'app/services/uffizzi_core/compose_file/builders/docker_repo_builder_service.rb', line 6

def initialize(type)
  @type = type
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



4
5
6
# File 'app/services/uffizzi_core/compose_file/builders/docker_repo_builder_service.rb', line 4

def type
  @type
end

Instance Method Details

#build_attributes(image_data) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/services/uffizzi_core/compose_file/builders/docker_repo_builder_service.rb', line 10

def build_attributes(image_data)
  {
    kind: nil,
    name: image_data[:name],
    slug: image_data[:name],
    type: type,
    branch: nil,
    namespace: image_data[:namespace],
    is_private: nil, # TODO: detect
    description: '',
    repository_id: nil,
    dockerfile_path: '',
    dockerfile_context_path: nil,
  }
end