Class: Gemkeeper::CLI::Commands::Server::Status

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/gemkeeper/cli/commands/server/status.rb

Instance Method Summary collapse

Instance Method Details

#call(**options) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/gemkeeper/cli/commands/server/status.rb', line 12

def call(**options)
  config = Configuration.load(options[:config])
  manager = ServerManager.new(config)
  status = manager.status

  if status[:running]
    puts "Geminabox server is running"
    puts "  PID: #{status[:pid]}"
    puts "  URL: #{status[:url]}"
  else
    puts "Geminabox server is not running"
  end
end