Class: Server::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/server/cli.rb

Instance Method Summary collapse

Instance Method Details

#buildObject



31
32
33
34
35
36
37
38
39
40
# 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

#configureObject



53
54
55
# File 'lib/server/cli.rb', line 53

def configure
  $Log.info( "Configuring" )
end

#infoObject



73
74
75
76
77
78
79
80
# 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

#installObject



43
44
45
46
47
48
49
50
# 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

#serverObject



58
59
60
# File 'lib/server/cli.rb', line 58

def server
  $Log.info( "Server settings" )
end

#sshObject



63
64
65
# File 'lib/server/cli.rb', line 63

def ssh
  $Log.info( "SSH keys" )
end

#statsObject



68
69
70
# File 'lib/server/cli.rb', line 68

def stats
  $Log.info( "Machine stats" )
end