class ToposPlayground::Command::Start

Defined in:

topos-playground/command/start.cr

Constant Summary

DOCKER_COMPOSE_VERSION_REGEXP = /Docker Compose version v([0-9]+\.[0-9]+\.[0-9]+)/m
DOCKER_VERSION_REGEXP = /Docker version ([0-9]+\.[0-9]+\.[0-9]+)/m
GIT_REPOS = { {org: "topos-protocol", repo: "local-erc20-messaging-infra", branch: "v0.1.8"}, {org: "topos-protocol", repo: "dapp-frontend-erc20-messaging", branch: "v0.1.6"}, {org: "topos-protocol", repo: "executor-service", branch: "v0.2.1"} }
GIT_VERSION_REGEXP = /git version ([0-9]+\.[0-9]+\.[0-9]+)/m
MIN_VERSION_DOCKER = SemanticVersion.parse("17.06.0")
MIN_VERSION_DOCKER_COMPOSE = SemanticVersion.parse("2.0.0")
MIN_VERSION_GIT = SemanticVersion.parse("2.0.0")
MIN_VERSION_NODEJS = SemanticVersion.parse("16.0.0")
NODEJS_VERSION_REGEXP = /v([0-9]+\.[0-9]+\.[0-9]+)/m
REDIS_CONTAINER_NAME = "redis-stack-server"

Class Method Summary

Instance Method Summary

Instance methods inherited from class ToposPlayground::Command

config : Config config, config=(config : Config) config=, run run, run_process(command, chdir = ".", env : Process::Env = nil, shell : Bool = true)
run_process(command, chdir = ".", background : Bool = false, env : Process::Env = nil)
run_process

Constructor methods inherited from class ToposPlayground::Command

new(config : Config) new

Class methods inherited from class ToposPlayground::Command

config : Config config, config=(config : Config) config=, levenshtein_options levenshtein_options, log_to_file?(config) log_to_file?, options(parser, config) options, run_process(command, chdir = ".", background : Bool = false, env : Process::Env = nil)
run_process(command, chdir = ".", env : Process::Env = nil, shell : Bool = true)
run_process

Class Method Detail

def self.levenshtein_options #

[View source]
def self.log_to_file?(config) #

[View source]
def self.options(parser, config) #

[View source]

Instance Method Detail

def build_dapp_frontend_service(secrets_path, dapp_frontend_service_path) #

[View source]
def clone_git_repositories #

[View source]
def completion_banner #

Everything is done; display some final information to the user.


[View source]
def copy_env_files #

[View source]
def copy_git_repositories_from_cache #

[View source]
def do_npm_install(path) #

[View source]
def parse_contract_addresses_to_hash(filename) #

[View source]
def retrieve_and_write_contract_addresses_to_env #

[View source]
def run #
Description copied from class ToposPlayground::Command

All subclasses must implement #run, which is responsible for carrying out the logic of the command.


[View source]
def run_dapp_frontend_service #

[View source]
def run_executor_service #

[View source]
def run_local_erc20_messaging_infra #

[View source]
def run_redis #

[View source]
def setup_io_handlers_for_background_process(background_process) #

Setup an at_exit handler to ensure that the started processes are cleaned up upon topos-playground exiting. Also spawn a fiber to monitor the processes and print any IO sent to the monitor channel.


[View source]
def shell #

[View source]
def start_dapp_frontend_service(secrets_path, dapp_frontend_service_path) : Tuple(Channel(Bool), Channel(String), Process) #

[View source]
def start_executor_service(secrets_path, executor_service_path) : Tuple(Channel(Bool), Channel(String), Process) #

[View source]
def sub_working_dir(path) #

[View source]
def update_repository(repo_path) #

[View source]
def validate_git_cache #

[View source]
def verify_dependency_installation #

[View source]
def verify_docker_compose_installation #

[View source]
def verify_docker_installation #

[View source]
def verify_git_installation #

[View source]
def verify_nodejs_installation #

[View source]
def version_check(command, version, version_regexp, formal_label, inline_label = nil) #

[View source]
def wait_for(background_processes) #

Block, waiting for the watched processes to die. They may be killed manually, or via the at_exit handler that was created when they were started, and which is triggered by the topos-playground process exiting, such as when ctrl-c is pressed.


[View source]