class Roadshow::Scenario
- Roadshow::Scenario
- Reference
- Object
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.crConstructors
- .load(project_name : String, name : String | Nil, data : Hash(String, YAML::Type)) : Scenario
- .new(project_name : String, name : String | Nil, from : String | Nil, cmd : String | Nil, service : Service | Nil, volumes : Array(String))
Instance Method Summary
- #cmd : String?
- #docker_compose_name : String
- #dockerfile_name : String
- #from : String?
- #image_name : String
-
#merge(other : Scenario)
Merge the other scenario into this one, overwriting or appending to fields as appropriate.
- #name : String?
- #project_name : String
- #service : Roadshow::Scenario::Service?
-
#to_docker_compose_yml : String
Generate a docker-compose.yml for this scenario.
-
#to_dockerfile : String
Generate a Dockerfile for this scenario.
-
#validate!
Make sure that all required fields are present.
- #volume_names : Array(String)
- #volumes : Array(String)
Constructor Detail
def self.load(project_name : String, name : String | Nil, data : Hash(String, YAML::Type)) : Scenario
#
def self.new(project_name : String, name : String | Nil, from : String | Nil, cmd : String | Nil, service : Service | Nil, volumes : Array(String))
#
Instance Method Detail
Merge the other scenario into this one, overwriting or appending to fields as appropriate.
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.