refactor(tools): rename rhema-tools-contract to rhema-claw-tools-contract
The crate binds the claw to its client tools, not tools at large, so it carries the claw's name: package, lib and dep names, the mock's binary, and the conformance suite's use paths. Specs and README follow. The tools/contract directory keeps its name, and no reference to the old name remains.
This commit is contained in:
1 parent
9e132fdf71
commit
d067f4632f
11 files changed
+91
-76
No files matched your search
@@ -14,7 +14,7 @@ path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
rhema-tools-common = { path = "../common" }
|
||||
rhema-tools-contract = { path = "../contract" }
|
||||
rhema-claw-tools-contract = { path = "../contract" }
|
||||
clap.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
use clap::{Parser, Subcommand};
|
||||
use rhema_tools_common::{Client, Config, fail, print};
|
||||
use rhema_tools_contract::NotificationPush;
|
||||
use rhema_claw_tools_contract::NotificationPush;
|
||||
|
||||
/// Push a notification to the user's devices.
|
||||
#[derive(Parser)]
|
||||
@@ -49,7 +49,7 @@ fn main() {
|
||||
body,
|
||||
device,
|
||||
};
|
||||
match client.call("POST", rhema_tools_contract::NOTIFICATIONS, Some(&push)) {
|
||||
match client.call("POST", rhema_claw_tools_contract::NOTIFICATIONS, Some(&push)) {
|
||||
Ok(record) => print(&record),
|
||||
Err(error) => fail(error),
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ use axum::extract::State;
|
||||
use axum::http::{HeaderMap, StatusCode};
|
||||
use axum::routing::get;
|
||||
use rhema_tools_common::{Client, Config, ToolError};
|
||||
use rhema_tools_contract::NotificationPush;
|
||||
use rhema_claw_tools_contract::NotificationPush;
|
||||
use serde_json::{Value, json};
|
||||
|
||||
/// What the fake daemon recorded, for the test to assert on.
|
||||
@@ -82,7 +82,7 @@ async fn a_push_rides_the_contract_and_prints_the_row() {
|
||||
let row = client
|
||||
.call(
|
||||
"POST",
|
||||
rhema_tools_contract::NOTIFICATIONS,
|
||||
rhema_claw_tools_contract::NOTIFICATIONS,
|
||||
Some(&NotificationPush {
|
||||
title: "CI is red".into(),
|
||||
body: "main failed".into(),
|
||||
@@ -111,7 +111,7 @@ async fn a_refused_call_maps_to_denied() {
|
||||
let error = client
|
||||
.call(
|
||||
"POST",
|
||||
rhema_tools_contract::NOTIFICATIONS,
|
||||
rhema_claw_tools_contract::NOTIFICATIONS,
|
||||
Some(&NotificationPush {
|
||||
title: "x".into(),
|
||||
body: "y".into(),
|
||||
|
||||
Reference in new issue
Block a user