Class: Minke::Config::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/minke/config/config.rb

Overview

Config represents project level configuration for minke builds

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#application_nameObject

the name of the application

Required


16
17
18
# File 'lib/minke/config/config.rb', line 16

def application_name
  @application_name
end

#buildObject

Settings for the build image phase instance of Minke::Config::Task

Optional

if not provided the build commands will not be executed



50
51
52
# File 'lib/minke/config/config.rb', line 50

def build
  @build
end

#cucumberObject

Settings for the cuccumber functional test phase instance of Minke::Config::Task

Optional

if not provided the cucumber commands will not be executed



71
72
73
# File 'lib/minke/config/config.rb', line 71

def cucumber
  @cucumber
end

#dockerObject

Docker settings for tasks, any items defined in this section will override the defaults provided inside the generator. instance of Minke::Config::DockerSettings

Required


36
37
38
# File 'lib/minke/config/config.rb', line 36

def docker
  @docker
end

#docker_registryObject

Docker registry settings instance of Minke::Config::DockerRegistrySettings

Optional


28
29
30
# File 'lib/minke/config/config.rb', line 28

def docker_registry
  @docker_registry
end

#fetchObject

Settings for the fetch packages phase instance of Minke::Config::Task

Optional

if not provided the fetch commands will not be executed



43
44
45
# File 'lib/minke/config/config.rb', line 43

def fetch
  @fetch
end

#generator_nameObject

the name of the generator to use

Required


22
23
24
# File 'lib/minke/config/config.rb', line 22

def generator_name
  @generator_name
end

#namespaceObject

the namespace for the application

Required


10
11
12
# File 'lib/minke/config/config.rb', line 10

def namespace
  @namespace
end

#runObject

Settings for the run application phase instance of Minke::Config::Task

Optional

if not provided the run commands will not be executed



57
58
59
# File 'lib/minke/config/config.rb', line 57

def run
  @run
end

#testObject

Settings for the run application phase instance of Minke::Config::Task

Optional

if not provided the test commands will not be executed



64
65
66
# File 'lib/minke/config/config.rb', line 64

def test
  @test
end

Instance Method Details

#build_docker_file_for(section) ⇒ Object

Returns the docker_compose file for the given section,  if the section overrides application_compose_file then this is returned otherwise the global file is returned Parameters

  • :fetch

  • :build

  • :run

  • :test

  • :cucumber



125
126
127
128
129
130
131
132
133
134
# File 'lib/minke/config/config.rb', line 125

def build_docker_file_for section
  file = docker.build_docker_file unless docker.build_docker_file == nil

  if self.send(section) != nil &&
     self.send(section).docker != nil &&
     self.send(section).docker.build_docker_file != nil
      file = self.send(section).docker.build_docker_file
  end
  return file
end

#build_image_for(section) ⇒ Object

Returns the build_image file for the given section,  if the section overrides build_image then this is returned otherwise the global build_image is returned Parameters

  • :fetch

  • :build

  • :run

  • :test

  • :cucumber



104
105
106
107
108
109
110
111
112
113
# File 'lib/minke/config/config.rb', line 104

def build_image_for section
  file = docker.build_image unless docker.build_image == nil

  if self.send(section) != nil &&
     self.send(section).docker != nil &&
     self.send(section).docker.build_image != nil
      file = self.send(section).docker.build_image
  end
  return file
end

#compose_file_for(section) ⇒ Object

Returns the docker_compose file for the given section,  if the section overrides application_compose_file then this is returned otherwise the global file is returned Parameters

  • :fetch

  • :build

  • :run

  • :test

  • :cucumber



83
84
85
86
87
88
89
90
91
92
# File 'lib/minke/config/config.rb', line 83

def compose_file_for section
  file = docker.application_compose_file unless docker.application_compose_file == nil

  if self.send(section) != nil &&
     self.send(section).docker != nil &&
     self.send(section).docker.application_compose_file != nil
      file = self.send(section).docker.application_compose_file
  end
  return file
end