class Server::CLI

Public Class Methods

explain() click to toggle source
# File lib/server/cli.rb, line 24
def self.explain
  $Log.info( "Server runtime path: #{Server.runtime_path}" )
  $Log.info( "Server settings: #{Server.settings}" )
end

Public Instance Methods

build() click to toggle source
# File lib/server/cli.rb, line 31
def build
  choose do |menu|

    menu.prompt = "What type of server is this going to be?"

    menu.choice(:web) { Workflows::Web.start! }
    menu.choice(:db) { Workflows::Db.start! }

  end
end
configure() click to toggle source
# File lib/server/cli.rb, line 53
def configure
  $Log.info( "Configuring" )
end
info() click to toggle source
# File lib/server/cli.rb, line 73
def info
  $Log.info( "Nginx path: #{Conf::nginx_path}" )
  $Log.info( "PHP-FPM path: #{Conf::phpfpm_path}" )
  $Log.info( "Yum package manager available" ) if Installed::yum?
  $Log.info( "Brew package manager available" ) if Installed::brew?
  $Log.info( "PHP-FPM installed" ) if Installed::phpfpm?
  $Log.info( "Nginx installed" ) if Installed::nginx?
end
install() click to toggle source
# File lib/server/cli.rb, line 43
def install
  choose do |menu|
    menu.prompt = "What package do you want to install?"

    menu.choice(:nginx) { Server::Packages::Nginx.install! }
    menu.choice(:phpfpm) { Server::Packages::PHPFPM.install! }
  end
end
server() click to toggle source
# File lib/server/cli.rb, line 58
def server
  $Log.info( "Server settings" )
end
ssh() click to toggle source
# File lib/server/cli.rb, line 63
def ssh
  $Log.info( "SSH keys" )
end
stats() click to toggle source
# File lib/server/cli.rb, line 68
def stats
  $Log.info( "Machine stats" )
end