Files
Christian Nennemann 2e081ead8e chore: rename quicproquo → quicprochat in docs, Docker, CI, and packaging
Rename all project references from quicproquo/qpq to quicprochat/qpc
across documentation, Docker configuration, CI workflows, packaging
scripts, operational configs, and build tooling.

- Docker: crate paths, binary names, user/group, data dirs, env vars
- CI: workflow crate references, binary names, artifact names
- Docs: all markdown files under docs/, SDK READMEs, book.toml
- Packaging: OpenWrt Makefile, init script, UCI config (file renames)
- Scripts: justfile, dev-shell, screenshot, cross-compile, ai_team
- Operations: Prometheus config, alert rules, Grafana dashboard
- Config: .env.example (QPQ_* → QPC_*), CODEOWNERS paths
- Top-level: README, CONTRIBUTING, ROADMAP, CLAUDE.md
2026-03-21 19:14:06 +01:00

44 lines
1.3 KiB
Ruby

#!/usr/bin/env ruby
# frozen_string_literal: true
# Example: quicprochat Ruby SDK demo.
#
# Usage:
# ruby demo.rb --server 127.0.0.1:5001 --ca-cert ca.pem \
# --user alice --pass secret --recipient bob --message "hello"
require "optparse"
require_relative "../lib/quicprochat"
options = {
server: "127.0.0.1:5001",
ca_cert: "ca.pem",
message: "hello from Ruby SDK!",
}
OptionParser.new do |opts|
opts.banner = "Usage: demo.rb [options]"
opts.on("--server ADDR", "Server address") { |v| options[:server] = v }
opts.on("--ca-cert PATH", "CA certificate") { |v| options[:ca_cert] = v }
opts.on("--user NAME", "Username") { |v| options[:user] = v }
opts.on("--pass PASSWORD", "Password") { |v| options[:pass] = v }
opts.on("--recipient NAME", "Recipient") { |v| options[:recipient] = v }
opts.on("--message TEXT", "Message") { |v| options[:message] = v }
end.parse!
QuicProChat::Client.open(options[:server], ca_cert: options[:ca_cert]) do |client|
puts "Connected to #{options[:server]}"
client.login(options[:user], options[:pass])
puts "Logged in as #{options[:user]}"
client.send(options[:recipient], options[:message])
puts "Sent message to #{options[:recipient]}"
puts "Waiting for messages (5s)..."
messages = client.receive(timeout_ms: 5000)
messages.each { |msg| puts " received: #{msg}" }
puts "Done."
end