class Roadshow::Scenario

Overview

A class describing a scenario.

TODO Split into ScenarioFragment (with nullable fields) and Scenario (with non-nullable fields).

Extended Modules

Defined in:

roadshow/scenario.cr

Constructors

Instance Method Summary

Constructor Detail

def self.load(project_name : String, name : String | Nil, data : Hash(String, YAML::Type)) : Scenario #

[View source]
def self.new(project_name : String, name : String | Nil, from : String | Nil, cmd : String | Nil, service : Service | Nil, volumes : Array(String)) #

[View source]

Instance Method Detail

def cmd : String? #

[View source]
def docker_compose_name : String #

[View source]
def dockerfile_name : String #

[View source]
def from : String? #

[View source]
def image_name : String #

[View source]
def merge(other : Scenario) #

Merge the other scenario into this one, overwriting or appending to fields as appropriate.


[View source]
def name : String? #

[View source]
def project_name : String #

[View source]

[View source]
def to_docker_compose_yml : String #

Generate a docker-compose.yml for this scenario.


[View source]
def to_dockerfile : String #

Generate a Dockerfile for this scenario.


[View source]
def validate! #

Make sure that all required fields are present. If any are missing, raise an InvalidConfig error. We can't do this at the type level because config can be split between the shared and scenarios sections.


[View source]
def volume_names : Array(String) #

[View source]
def volumes : Array(String) #

[View source]