Class: Server::CLI
- Inherits:
-
Thor
- Object
- Thor
- Server::CLI
- Defined in:
- lib/server/cli.rb
Instance Method Summary collapse
- #build ⇒ Object
- #configure ⇒ Object
- #info ⇒ Object
- #install ⇒ Object
- #server ⇒ Object
- #ssh ⇒ Object
- #stats ⇒ Object
Instance Method Details
#build ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/server/cli.rb', line 31 def build choose do || .prompt = "What type of server is this going to be?" .choice(:web) { Workflows::Web.start! } .choice(:db) { Workflows::Db.start! } end end |
#configure ⇒ Object
53 54 55 |
# File 'lib/server/cli.rb', line 53 def configure $Log.info( "Configuring" ) end |
#info ⇒ Object
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 |
#install ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'lib/server/cli.rb', line 43 def install choose do || .prompt = "What package do you want to install?" .choice(:nginx) { Server::Packages::Nginx.install! } .choice(:phpfpm) { Server::Packages::PHPFPM.install! } end end |
#server ⇒ Object
58 59 60 |
# File 'lib/server/cli.rb', line 58 def server $Log.info( "Server settings" ) end |
#ssh ⇒ Object
63 64 65 |
# File 'lib/server/cli.rb', line 63 def ssh $Log.info( "SSH keys" ) end |
#stats ⇒ Object
68 69 70 |
# File 'lib/server/cli.rb', line 68 def stats $Log.info( "Machine stats" ) end |