class Kitsune::Kit::Commands::Bootstrap

def fetch_droplet_ip

def fetch_droplet_ip
  out = StringIO.new
  $stdout = out
  begin
    Kitsune::Kit::CLI.start(["provision", "create"])
  ensure
    $stdout = STDOUT
  end

  ip = out.string[/(\d{1,3}\.){3}\d{1,3}/]
  abort "❌ Could not detect droplet IP!" if ip.nil? || ip.empty?
  ip
end