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
This commit is contained in:
@@ -1,39 +1,39 @@
|
||||
# QuicProQuo Ruby SDK
|
||||
# QuicProChat Ruby SDK
|
||||
|
||||
Ruby FFI gem wrapping `libquicproquo_ffi` for the quicproquo E2E encrypted messenger.
|
||||
Ruby FFI gem wrapping `libquicprochat_ffi` for the quicprochat E2E encrypted messenger.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Ruby 3.1+
|
||||
- `libquicproquo_ffi` built for the target platform
|
||||
- `libquicprochat_ffi` built for the target platform
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
gem install quicproquo
|
||||
gem install quicprochat
|
||||
```
|
||||
|
||||
Or add to your Gemfile:
|
||||
|
||||
```ruby
|
||||
gem "quicproquo"
|
||||
gem "quicprochat"
|
||||
```
|
||||
|
||||
## Building the Native Library
|
||||
|
||||
```sh
|
||||
cargo build --release -p quicproquo-ffi
|
||||
cargo build --release -p quicprochat-ffi
|
||||
```
|
||||
|
||||
Set `QPQ_LIB_PATH` if the library is not in the default search path.
|
||||
Set `QPC_LIB_PATH` if the library is not in the default search path.
|
||||
|
||||
## Usage
|
||||
|
||||
```ruby
|
||||
require "quicproquo"
|
||||
require "quicprochat"
|
||||
|
||||
# Block form (auto-disconnect)
|
||||
QuicProQuo::Client.open("127.0.0.1:5001", ca_cert: "ca.pem") do |client|
|
||||
QuicProChat::Client.open("127.0.0.1:5001", ca_cert: "ca.pem") do |client|
|
||||
client.login("alice", "secret")
|
||||
client.send("bob", "hello from Ruby!")
|
||||
|
||||
@@ -42,7 +42,7 @@ QuicProQuo::Client.open("127.0.0.1:5001", ca_cert: "ca.pem") do |client|
|
||||
end
|
||||
|
||||
# Manual lifecycle
|
||||
client = QuicProQuo::Client.new("127.0.0.1:5001", ca_cert: "ca.pem")
|
||||
client = QuicProChat::Client.new("127.0.0.1:5001", ca_cert: "ca.pem")
|
||||
client.login("alice", "secret")
|
||||
client.send("bob", "hello")
|
||||
client.disconnect
|
||||
@@ -65,18 +65,18 @@ client.disconnect
|
||||
```ruby
|
||||
begin
|
||||
client.login("alice", "wrong")
|
||||
rescue QuicProQuo::AuthError => e
|
||||
rescue QuicProChat::AuthError => e
|
||||
puts "Auth failed: #{e.message}"
|
||||
rescue QuicProQuo::TimeoutError => e
|
||||
rescue QuicProChat::TimeoutError => e
|
||||
puts "Timeout: #{e.message}"
|
||||
rescue QuicProQuo::Error => e
|
||||
rescue QuicProChat::Error => e
|
||||
puts "Error: #{e.message}"
|
||||
end
|
||||
```
|
||||
|
||||
## Structure
|
||||
|
||||
- `lib/quicproquo/client.rb` -- High-level client
|
||||
- `lib/quicproquo/ffi_bindings.rb` -- FFI function declarations
|
||||
- `lib/quicproquo/errors.rb` -- Exception classes
|
||||
- `lib/quicprochat/client.rb` -- High-level client
|
||||
- `lib/quicprochat/ffi_bindings.rb` -- FFI function declarations
|
||||
- `lib/quicprochat/errors.rb` -- Exception classes
|
||||
- `examples/demo.rb` -- Usage example
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Example: quicproquo Ruby SDK demo.
|
||||
# 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/quicproquo"
|
||||
require_relative "../lib/quicprochat"
|
||||
|
||||
options = {
|
||||
server: "127.0.0.1:5001",
|
||||
@@ -26,7 +26,7 @@ OptionParser.new do |opts|
|
||||
opts.on("--message TEXT", "Message") { |v| options[:message] = v }
|
||||
end.parse!
|
||||
|
||||
QuicProQuo::Client.open(options[:server], ca_cert: options[:ca_cert]) do |client|
|
||||
QuicProChat::Client.open(options[:server], ca_cert: options[:ca_cert]) do |client|
|
||||
puts "Connected to #{options[:server]}"
|
||||
|
||||
client.login(options[:user], options[:pass])
|
||||
|
||||
23
sdks/ruby/lib/quicprochat.rb
Normal file
23
sdks/ruby/lib/quicprochat.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative "quicprochat/ffi_bindings"
|
||||
require_relative "quicprochat/client"
|
||||
require_relative "quicprochat/errors"
|
||||
require_relative "quicprochat/version"
|
||||
|
||||
# Ruby SDK for the quicprochat E2E encrypted messenger.
|
||||
#
|
||||
# Two usage patterns:
|
||||
#
|
||||
# # Block form (auto-disconnect)
|
||||
# QuicProChat::Client.open("127.0.0.1:5001", ca_cert: "ca.pem") do |client|
|
||||
# client.login("alice", "secret")
|
||||
# client.send("bob", "hello")
|
||||
# end
|
||||
#
|
||||
# # Manual lifecycle
|
||||
# client = QuicProChat::Client.new("127.0.0.1:5001", ca_cert: "ca.pem")
|
||||
# client.login("alice", "secret")
|
||||
# client.disconnect
|
||||
module QuicProChat
|
||||
end
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
require "json"
|
||||
|
||||
module QuicProQuo
|
||||
# High-level quicproquo client for Ruby.
|
||||
module QuicProChat
|
||||
# High-level quicprochat client for Ruby.
|
||||
#
|
||||
# Wraps +libquicproquo_ffi+ via the +ffi+ gem.
|
||||
# Wraps +libquicprochat_ffi+ via the +ffi+ gem.
|
||||
#
|
||||
# client = QuicProQuo::Client.new("127.0.0.1:5001", ca_cert: "ca.pem")
|
||||
# client = QuicProChat::Client.new("127.0.0.1:5001", ca_cert: "ca.pem")
|
||||
# client.login("alice", "secret")
|
||||
# client.send("bob", "hello")
|
||||
# messages = client.receive(timeout_ms: 5000)
|
||||
@@ -15,12 +15,12 @@ module QuicProQuo
|
||||
#
|
||||
# Or use the block form for automatic cleanup:
|
||||
#
|
||||
# QuicProQuo::Client.open("127.0.0.1:5001", ca_cert: "ca.pem") do |c|
|
||||
# QuicProChat::Client.open("127.0.0.1:5001", ca_cert: "ca.pem") do |c|
|
||||
# c.login("alice", "secret")
|
||||
# c.send("bob", "hello")
|
||||
# end
|
||||
class Client
|
||||
# Connect to a quicproquo server.
|
||||
# Connect to a quicprochat server.
|
||||
#
|
||||
# @param server [String] Server address as +host:port+.
|
||||
# @param ca_cert [String] Path to PEM-encoded CA certificate.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module QuicProQuo
|
||||
# Base error for quicproquo SDK.
|
||||
module QuicProChat
|
||||
# Base error for quicprochat SDK.
|
||||
class Error < StandardError; end
|
||||
|
||||
# OPAQUE authentication failed (bad credentials).
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
require "ffi"
|
||||
|
||||
module QuicProQuo
|
||||
# Low-level FFI bindings to libquicproquo_ffi.
|
||||
module QuicProChat
|
||||
# Low-level FFI bindings to libquicprochat_ffi.
|
||||
#
|
||||
# The library is located via:
|
||||
# 1. QPQ_LIB_PATH environment variable
|
||||
@@ -12,7 +12,7 @@ module QuicProQuo
|
||||
module FFIBindings
|
||||
extend FFI::Library
|
||||
|
||||
# Status codes (mirrors crates/quicproquo-ffi/src/lib.rs).
|
||||
# Status codes (mirrors crates/quicprochat-ffi/src/lib.rs).
|
||||
QPQ_OK = 0
|
||||
QPQ_ERROR = 1
|
||||
QPQ_AUTH_FAILED = 2
|
||||
@@ -22,14 +22,14 @@ module QuicProQuo
|
||||
# Locate and load the shared library.
|
||||
LIB_SEARCH_PATHS = [
|
||||
ENV.fetch("QPQ_LIB_PATH", nil),
|
||||
File.expand_path("../../../../target/release/libquicproquo_ffi.so", __dir__),
|
||||
File.expand_path("../../../../target/debug/libquicproquo_ffi.so", __dir__),
|
||||
File.expand_path("../../../../target/release/libquicproquo_ffi.dylib", __dir__),
|
||||
File.expand_path("../../../../target/debug/libquicproquo_ffi.dylib", __dir__),
|
||||
"quicproquo_ffi",
|
||||
File.expand_path("../../../../target/release/libquicprochat_ffi.so", __dir__),
|
||||
File.expand_path("../../../../target/debug/libquicprochat_ffi.so", __dir__),
|
||||
File.expand_path("../../../../target/release/libquicprochat_ffi.dylib", __dir__),
|
||||
File.expand_path("../../../../target/debug/libquicprochat_ffi.dylib", __dir__),
|
||||
"quicprochat_ffi",
|
||||
].compact.freeze
|
||||
|
||||
lib_path = LIB_SEARCH_PATHS.find { |p| File.exist?(p) } || "quicproquo_ffi"
|
||||
lib_path = LIB_SEARCH_PATHS.find { |p| File.exist?(p) } || "quicprochat_ffi"
|
||||
ffi_lib lib_path
|
||||
|
||||
# QpqHandle* qpq_connect(const char*, const char*, const char*)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module QuicProQuo
|
||||
module QuicProChat
|
||||
VERSION = "0.1.0"
|
||||
end
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative "quicproquo/ffi_bindings"
|
||||
require_relative "quicproquo/client"
|
||||
require_relative "quicproquo/errors"
|
||||
require_relative "quicproquo/version"
|
||||
|
||||
# Ruby SDK for the quicproquo E2E encrypted messenger.
|
||||
#
|
||||
# Two usage patterns:
|
||||
#
|
||||
# # Block form (auto-disconnect)
|
||||
# QuicProQuo::Client.open("127.0.0.1:5001", ca_cert: "ca.pem") do |client|
|
||||
# client.login("alice", "secret")
|
||||
# client.send("bob", "hello")
|
||||
# end
|
||||
#
|
||||
# # Manual lifecycle
|
||||
# client = QuicProQuo::Client.new("127.0.0.1:5001", ca_cert: "ca.pem")
|
||||
# client.login("alice", "secret")
|
||||
# client.disconnect
|
||||
module QuicProQuo
|
||||
end
|
||||
@@ -1,12 +1,12 @@
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "quicproquo"
|
||||
s.name = "quicprochat"
|
||||
s.version = "0.1.0"
|
||||
s.summary = "Ruby SDK for quicproquo E2E encrypted messenger"
|
||||
s.description = "Ruby FFI bindings to libquicproquo_ffi for the quicproquo " \
|
||||
s.summary = "Ruby SDK for quicprochat E2E encrypted messenger"
|
||||
s.description = "Ruby FFI bindings to libquicprochat_ffi for the quicprochat " \
|
||||
"end-to-end encrypted messaging system."
|
||||
s.authors = ["quicproquo contributors"]
|
||||
s.authors = ["quicprochat contributors"]
|
||||
s.license = "MIT"
|
||||
s.homepage = "https://github.com/nicholasgasior/quicproquo"
|
||||
s.homepage = "https://github.com/nicholasgasior/quicprochat"
|
||||
|
||||
s.required_ruby_version = ">= 3.1"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user