class Pixiebox::Handlers::StdoutHandler

Public Instance Methods

add_box_start(type) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 97
def add_box_start(type)
  display_info("Adding #{type} box", :green)
end
add_post_install_message(message) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 17
def add_post_install_message(message)
  @post_install_messages = (@post_install_messages || Array.new).push message
end
add_service_completed(type) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 130
def add_service_completed(type)
  display_info("Service #{type} added", :green)
end
add_service_start(type) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 126
def add_service_start(type)
  display_info("Adding #{type} service", :green)
end
build_service_start(service) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 101
def build_service_start(service)
  Utils::Spinner.new("Building Service #{service} (5-10min)")
end
build_service_stop() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 105
def build_service_stop
  Utils::Spinner.stop
  display_info("Service built", :green)
end
config_setup_start() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 174
def config_setup_start
  display_info("Setting up Config", :green)
end
docker_present(version) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 30
def docker_present(version)
  display_info("#{version.capitalize} present", :green)
end
download_docker_complete() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 43
def download_docker_complete()
  display_info('Preparing to install Docker', :green)
end
download_docker_compose_complete() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 52
def download_docker_compose_complete()
  display_info('Preparing to install Docker Compose', :green)
end
download_docker_compose_start(size) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 47
def download_docker_compose_start(size)
  display_info('Downloading Docker Compose', :green)
  Utils::ProgressBar.new(size)
end
download_docker_start(size) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 34
def download_docker_start(size)
  display_info('Downloading Docker', :green)
  Utils::ProgressBar.new(size)
end
download_progress(progress) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 39
def download_progress(progress)
  Utils::ProgressBar.step(progress)
end
install_complete() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 12
def install_complete
  display_info   'Install Complete', :green
  display_line   '-------------------------------'
end
install_docker_complete() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 60
def install_docker_complete()
  Utils::Spinner.stop
  display_info('Installed Docker', :green)
end
install_docker_start() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 56
def install_docker_start()
  Utils::Spinner.new('Installing Docker')
end
install_started() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 6
def install_started
  display_line ''
  display_line 'INSTALL PIXIEBOX'
  display_line '-------------------------------'
end
list_boxes(boxes) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 110
def list_boxes(boxes)
  display_info("Available boxes:", :green)

  boxes.each do |box|
    display_info("  #{box}")
  end
end
list_services(services) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 118
def list_services(services)
  display_info("Available services:", :green)

  services.each do |service|
    display_info("  #{service}")
  end
end
opening_shell(service) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 160
def opening_shell(service)
  display_info("Getting shell", :green)
  display_status('open', "Running \e[33m#{service}\e[0m shell", :green)
end
post_install_messages() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 21
def post_install_messages
  display_line   ''

  @post_install_messages.each do |message|
    display_line message
    display_line   ''
  end
end
project_initialize_complete() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 93
def project_initialize_complete
  display_info('Project Initialized', :green)
end
project_initialize_start() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 89
def project_initialize_start
  display_info('Initializing Project', :green)
end
reload_shell() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 69
def reload_shell
  display_status 'opening', 'new shell'
  display_line   ''
end
remove_service_completed(type) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 138
def remove_service_completed(type)
  display_info("Service #{type} removed", :green)
end
remove_service_start(type) click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 134
def remove_service_start(type)
  display_info("Removing #{type} service", :green)
end
remove_shell_setup_start() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 74
def remove_shell_setup_start
  display_info('Removing shell extentions', :green)
end
shell_setup_start() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 65
def shell_setup_start
  display_info('Setting up Shell', :green)
end
started() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 155
def started
  Utils::Spinner.stop
  display_info("Pixiebox started!", :green)
end
starting() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 151
def starting
  Utils::Spinner.new('Pixiebox starting')
end
stopped() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 146
def stopped
  Utils::Spinner.stop
  display_info("Pixiebox stopped!", :green)
end
stopping() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 142
def stopping
  Utils::Spinner.new('Pixiebox stopping')
end
uninstall_complete() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 84
def uninstall_complete
  display_info('Uninstall Complete', :green)
  display_line '-------------------------------'
end
uninstall_started() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 78
def uninstall_started
  display_line ''
  display_line 'UNINSTALL PIXIEBOX'
  display_line '-------------------------------'
end
update_packages_start() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 165
def update_packages_start
  Utils::Spinner.new('Updating packages')
end
update_packages_stop() click to toggle source
# File lib/pixiebox/handlers/stdout_handler.rb, line 169
def update_packages_stop
  Utils::Spinner.stop
  display_info("Packages updated!", :green)
end