Class: Pixiebox::Handlers::StdoutHandler
- Inherits:
-
Object
- Object
- Pixiebox::Handlers::StdoutHandler
show all
- Includes:
- Utils::Output
- Defined in:
- lib/pixiebox/handlers/stdout_handler.rb
Instance Method Summary
collapse
#display_error, #display_info, #display_line, #display_status
Instance Method Details
#add_box_start(type) ⇒ Object
97
98
99
|
# 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) ⇒ Object
17
18
19
|
# 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) ⇒ Object
130
131
132
|
# 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) ⇒ Object
126
127
128
|
# 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) ⇒ Object
101
102
103
|
# 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 ⇒ Object
105
106
107
108
|
# 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 ⇒ Object
174
175
176
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 174
def config_setup_start
display_info("Setting up Config", :green)
end
|
#docker_present(version) ⇒ Object
30
31
32
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 30
def docker_present(version)
display_info("#{version.capitalize} present", :green)
end
|
#download_docker_complete ⇒ Object
43
44
45
|
# 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 ⇒ Object
52
53
54
|
# 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) ⇒ Object
47
48
49
50
|
# 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) ⇒ Object
34
35
36
37
|
# 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) ⇒ Object
39
40
41
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 39
def download_progress(progress)
Utils::ProgressBar.step(progress)
end
|
#install_complete ⇒ Object
12
13
14
15
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 12
def install_complete
display_info 'Install Complete', :green
display_line '-------------------------------'
end
|
#install_docker_complete ⇒ Object
60
61
62
63
|
# 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 ⇒ Object
56
57
58
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 56
def install_docker_start()
Utils::Spinner.new('Installing Docker')
end
|
#install_started ⇒ Object
6
7
8
9
10
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 6
def install_started
display_line ''
display_line 'INSTALL PIXIEBOX'
display_line '-------------------------------'
end
|
#list_boxes(boxes) ⇒ Object
110
111
112
113
114
115
116
|
# 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) ⇒ Object
118
119
120
121
122
123
124
|
# 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) ⇒ Object
160
161
162
163
|
# 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 ⇒ Object
21
22
23
24
25
26
27
28
|
# 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 ⇒ Object
93
94
95
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 93
def project_initialize_complete
display_info('Project Initialized', :green)
end
|
#project_initialize_start ⇒ Object
89
90
91
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 89
def project_initialize_start
display_info('Initializing Project', :green)
end
|
#reload_shell ⇒ Object
69
70
71
72
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 69
def reload_shell
display_status 'opening', 'new shell'
display_line ''
end
|
#remove_service_completed(type) ⇒ Object
138
139
140
|
# 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) ⇒ Object
134
135
136
|
# 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 ⇒ Object
74
75
76
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 74
def remove_shell_setup_start
display_info('Removing shell extentions', :green)
end
|
#shell_setup_start ⇒ Object
65
66
67
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 65
def shell_setup_start
display_info('Setting up Shell', :green)
end
|
#started ⇒ Object
155
156
157
158
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 155
def started
Utils::Spinner.stop
display_info("Pixiebox started!", :green)
end
|
#starting ⇒ Object
151
152
153
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 151
def starting
Utils::Spinner.new('Pixiebox starting')
end
|
#stopped ⇒ Object
146
147
148
149
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 146
def stopped
Utils::Spinner.stop
display_info("Pixiebox stopped!", :green)
end
|
#stopping ⇒ Object
142
143
144
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 142
def stopping
Utils::Spinner.new('Pixiebox stopping')
end
|
#uninstall_complete ⇒ Object
84
85
86
87
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 84
def uninstall_complete
display_info('Uninstall Complete', :green)
display_line '-------------------------------'
end
|
#uninstall_started ⇒ Object
78
79
80
81
82
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 78
def uninstall_started
display_line ''
display_line 'UNINSTALL PIXIEBOX'
display_line '-------------------------------'
end
|
#update_packages_start ⇒ Object
165
166
167
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 165
def update_packages_start
Utils::Spinner.new('Updating packages')
end
|
#update_packages_stop ⇒ Object
169
170
171
172
|
# File 'lib/pixiebox/handlers/stdout_handler.rb', line 169
def update_packages_stop
Utils::Spinner.stop
display_info("Packages updated!", :green)
end
|