class Picobox::CLI
Public Instance Methods
boxes()
click to toggle source
# File lib/picobox/cli.rb, line 181 def boxes() Box.new(Os::CurrentOs.get).list rescue SignalException exit 1 end
init(box)
click to toggle source
# File lib/picobox/cli.rb, line 121 def init(box) Picobox.set_verbosity !options[:silent] os = Os::CurrentOs.get Project.new(os).init Box.new(os).install box Service.new(os).build System.new(os).start rescue SignalException exit 1 end
install()
click to toggle source
# File lib/picobox/cli.rb, line 88 def install Picobox.set_verbosity !options[:silent] System.new(Os::CurrentOs.get).install rescue SignalException exit 1 end
reset()
click to toggle source
# File lib/picobox/cli.rb, line 201 def reset() display_info('Cleaning stopped containers', :green) display_status('execute', 'container prune') system "docker container prune" system "docker volume prune" rescue SignalException exit 1 end
restart()
click to toggle source
# File lib/picobox/cli.rb, line 160 def restart() Picobox.set_verbosity !options[:silent] System.new(Os::CurrentOs.get).restart rescue SignalException exit 1 end
ssh(service)
click to toggle source
# File lib/picobox/cli.rb, line 171 def ssh(service) System.new(Os::CurrentOs.get).ssh service rescue SignalException exit 1 end
start()
click to toggle source
# File lib/picobox/cli.rb, line 138 def start() Picobox.set_verbosity !options[:silent] System.new(Os::CurrentOs.get).start rescue SignalException exit 1 end
status()
click to toggle source
# File lib/picobox/cli.rb, line 191 def status() system "docker-compose ps" rescue SignalException exit 1 end
stop()
click to toggle source
# File lib/picobox/cli.rb, line 149 def stop() Picobox.set_verbosity !options[:silent] System.new(Os::CurrentOs.get).stop rescue SignalException exit 1 end
uninstall()
click to toggle source
# File lib/picobox/cli.rb, line 110 def uninstall Picobox.set_verbosity !options[:silent] System.new(Os::CurrentOs.get).uninstall rescue SignalException exit 1 end
update()
click to toggle source
# File lib/picobox/cli.rb, line 99 def update Picobox.set_verbosity !options[:silent] System.new(Os::CurrentOs.get).install rescue SignalException exit 1 end
version()
click to toggle source
# File lib/picobox/cli.rb, line 77 def version say "Picobox: #{Picobox::VERSION}" say "Packages: #{Picobox::Utils::Packages.new(Os::CurrentOs.get).installed_version[1..-1]}" rescue SignalException exit 1 end