Class: Minke::Generators::GenerateSettings

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

Overview

This class encapsulates the settings required to generate a new template.

Instance Attribute Summary collapse

Instance Attribute Details

#commandObject

OPTIONAL

A command to execute when generating a new template.

Using this attribute it is possible to delegate reponsibility for generation of part of the codebase to an external command. For example you could execute rails new… to generate a new rails project as part of the template generation.



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

def command
  @command
end

#docker_fileObject

The folder location of a docker file from which an image will be build before running commands inside it.

This option can be used as an alternative to providing a docker image, Dockerfiles can be bundled with the template. Minke will attempt to create an image from this Dockerfile before executing the generate commands.



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

def docker_file
  @docker_file
end

#docker_imageObject

The name of a docker image to run the commands inside.

All commands are run inside a docker container to remove the dependency on installed software on the build machine.



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

def docker_image
  @docker_image
end