summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Wirzenius <liw@sequoia-pgp.org>2022-09-16 08:15:52 +0300
committerLars Wirzenius <liw@sequoia-pgp.org>2022-09-16 08:15:52 +0300
commit68f956426fdef71fe7db0d686edef5b1a2b214be (patch)
treedb739537d0cccd1fa2dd0fc4e3fbe0b06f92e347
parent9b377ffd74a61f6e508b8e3063942b21ddc0b8d2 (diff)
sq: port to new Subplot
Update the dependency on Subplot to 0.5.0. Subplot 0.5.0 requires document metadata (title, bindings files, etc) to be in its own YAML file, where previous versions required it to be embedded in Markdown (still as YAML). Move the metadata to sq.subplot and fix what breaks. Sponsored-by: pep.foundation
-rw-r--r--Cargo.lock44
-rw-r--r--sq/Cargo.toml4
-rw-r--r--sq/build.rs2
-rw-r--r--sq/sq-usage.md40
-rw-r--r--sq/sq.subplot14
-rw-r--r--sq/tests/sq-subplot.rs2
6 files changed, 56 insertions, 50 deletions
diff --git a/Cargo.lock b/Cargo.lock
index ab90c42a..ca9bbfdb 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2551,15 +2551,15 @@ dependencies = [
[[package]]
name = "roadmap"
-version = "0.4.4"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c460d89fa2561bd4eb9f6db252b79b1520dcdd807b2fe75d34c2056d58e39433"
+checksum = "3f0c08002dd427499194cef0e292cfd515281777d5b9cc4c638028d2d3aebda4"
dependencies = [
"anyhow",
"clap 3.2.15",
"serde",
"serde_yaml",
- "textwrap 0.14.2",
+ "textwrap 0.15.0",
"thiserror",
]
@@ -2845,9 +2845,9 @@ dependencies = [
[[package]]
name = "serde-aux"
-version = "3.0.1"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93abf9799c576f004252b2a05168d58527fb7c54de12e94b4d12fe3475ffad24"
+checksum = "c79c1a5a310c28bf9f7a4b9bd848553051120d80a5952f993c7eb62f6ed6e4c5"
dependencies = [
"serde",
"serde_json",
@@ -2887,9 +2887,9 @@ dependencies = [
[[package]]
name = "serde_yaml"
-version = "0.8.23"
+version = "0.8.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4a521f2940385c165a24ee286aa8599633d162077a54bdcae2a6fd5a7bfa7a0"
+checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b"
dependencies = [
"indexmap",
"ryu",
@@ -3081,9 +3081,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "subplot"
-version = "0.4.3"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c826f5e83eb04e7d35ba6e22d0d9a085866933350872d6e515aa0a7f2a4149d"
+checksum = "0b14be17e3a06a320b4d9851ef7f512bcb19e9c931cd2b2493b61b4a7e6aa6d5"
dependencies = [
"anyhow",
"base64",
@@ -3114,9 +3114,9 @@ dependencies = [
[[package]]
name = "subplot-build"
-version = "0.4.3"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b07b0f49a5ba78bae9db8fde58e94ae1bd508d883ff77c07c227c98da6d38ca2"
+checksum = "c65e0385a02e0ee2fbf130b67265402f5554ce7b1af36462e201fb20fb168efb"
dependencies = [
"subplot",
"tempfile",
@@ -3125,9 +3125,9 @@ dependencies = [
[[package]]
name = "subplotlib"
-version = "0.4.3"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2cbc3e6319877b1eaf3e6f0c8ff7a8d36b01f00cca972bd4246d65bad7d004c"
+checksum = "d42a381ce7bcbef67870adc04e9c7340a5aef3aab0633922494220da2179f3c1"
dependencies = [
"base64",
"fehler",
@@ -3148,9 +3148,9 @@ dependencies = [
[[package]]
name = "subplotlib-derive"
-version = "0.4.3"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddff03e508f6ea13b990ad2a038731c24372b06c9b334eeea3d8d08db71d1be0"
+checksum = "ed6c74877ef4d4bb536eacbb057a52c00d5c4ab855df7b8786f5985add2a3d15"
dependencies = [
"fehler",
"proc-macro2",
@@ -3295,22 +3295,14 @@ dependencies = [
[[package]]
name = "textwrap"
-version = "0.14.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80"
-dependencies = [
- "smawk",
- "unicode-linebreak",
- "unicode-width",
-]
-
-[[package]]
-name = "textwrap"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
dependencies = [
+ "smawk",
"terminal_size",
+ "unicode-linebreak",
+ "unicode-width",
]
[[package]]
diff --git a/sq/Cargo.toml b/sq/Cargo.toml
index 613355e1..bfbd0a55 100644
--- a/sq/Cargo.toml
+++ b/sq/Cargo.toml
@@ -48,11 +48,11 @@ clap_complete = "3"
chrono = "0.4.10"
sequoia-openpgp = { path = "../openpgp", version = "1.0.0", default-features = false }
sequoia-net = { path = "../net", version = "0.25", default-features = false }
-subplot-build = "0.4.3"
+subplot-build = "0.5.0"
cfg-if = "1"
[dev-dependencies]
-subplotlib = "0.4.3"
+subplotlib = "0.5.0"
fehler = "1.0.0"
assert_cmd = "2.0.4"
predicates = "2"
diff --git a/sq/build.rs b/sq/build.rs
index 8a743d68..d6dcf539 100644
--- a/sq/build.rs
+++ b/sq/build.rs
@@ -13,7 +13,7 @@ fn main() {
println!("cargo:rerun-if-changed=build.rs");
// Generate subplot tests.
- subplot_build::codegen(Path::new("sq-subplot.md"))
+ subplot_build::codegen(Path::new("sq.subplot"))
.expect("failed to generate code with Subplot");
let mut sq = sq_cli::build();
diff --git a/sq/sq-usage.md b/sq/sq-usage.md
index 41751068..00d2a3ca 100644
--- a/sq/sq-usage.md
+++ b/sq/sq-usage.md
@@ -33,8 +33,8 @@ OPTIONS:
--output-version <VERSION>
Produces output variant VERSION, such as 0.0.0. The default is the
- newest version. The output version is separate from the version of
- the sq program. To see the current supported versions, use
+ newest version. The output version is separate from the version
+ of the sq program. To see the current supported versions, use
output-versions subcommand.
[env: SQ_OUTPUT_VERSION=]
@@ -457,8 +457,8 @@ OPTIONS:
Adds no signing-capable subkey
--creation-time <CREATION_TIME>
- Sets the key's creation time to TIME. TIME is interpreted as an ISO
- 8601 timestamp. To set the creation time to June 9, 2011 at
+ Sets the key's creation time to TIME. TIME is interpreted as an
+ ISO 8601 timestamp. To set the creation time to June 9, 2011 at
midnight UTC, you can do:
$ sq key generate --creation-time 20110609 --export noam.pgp
@@ -1038,8 +1038,8 @@ OPTIONS:
Removes certificate components not matching the filter
--to-cert
- Converts any keys in the input to certificates. Converting a key to
- a certificate removes secret key material from the key thereby
+ Converts any keys in the input to certificates. Converting a key
+ to a certificate removes secret key material from the key thereby
turning it into a certificate.
--userid <USERID>
@@ -1116,8 +1116,8 @@ OPTIONS:
Emits binary data
-d, --depth <TRUST_DEPTH>
- Sets the trust depth (sometimes referred to as the trust level). 0
- means a normal certification of <CERTIFICATE, USERID>. 1 means
+ Sets the trust depth (sometimes referred to as the trust level).
+ 0 means a normal certification of <CERTIFICATE, USERID>. 1 means
CERTIFICATE is also a trusted introducer, 2 means CERTIFICATE is a
meta-trusted introducer, etc.
@@ -1159,9 +1159,9 @@ OPTIONS:
Provides parameters for private key store
-r, --regex <REGEX>
- Adds a regular expression to constrain what a trusted introducer can
- certify. The regular expression must match the certified User ID in
- all intermediate introducers, and the certified certificate.
+ Adds a regular expression to constrain what a trusted introducer
+ can certify. The regular expression must match the certified User
+ ID in all intermediate introducers, and the certified certificate.
Multiple regular expressions may be specified. In that case, at
least one must match.
@@ -1402,9 +1402,9 @@ Generates a Web Key Directory for the given domain and keys
If the WKD exists, the new keys will be inserted and it is updated and existing
ones will be updated.
-A WKD is per domain, and can be queried using the advanced or the direct method.
-The advanced method uses a URL with a subdomain 'openpgpkey'. As per the
-specification, the advanced method is to be preferred. The direct method may
+A WKD is per domain, and can be queried using the advanced or the direct
+method. The advanced method uses a URL with a subdomain 'openpgpkey'. As per
+the specification, the advanced method is to be preferred. The direct method may
only be used if the subdomain doesn't exist. The advanced method allows web key
directories for several domains on one web server.
@@ -1978,8 +1978,8 @@ ARGS:
A short, explanatory text that is shown to a viewer of the
revocation certificate. It explains why the certificate has been
revoked. For instance, if Alice has created a new key, she would
- generate a 'superseded' revocation certificate for her old key, and
- might include the message "I've created a new certificate,
+ generate a 'superseded' revocation certificate for her old key,
+ and might include the message "I've created a new certificate,
FINGERPRINT, please use that in the future."
OPTIONS:
@@ -2132,8 +2132,8 @@ USAGE:
ARGS:
<USERID>
- The User ID to revoke. By default, this must exactly match a
- self-signed User ID. Use --force to generate a revocation
+ The User ID to revoke. By default, this must exactly match
+ a self-signed User ID. Use --force to generate a revocation
certificate for a User ID, which is not self signed.
<REASON>
@@ -2160,8 +2160,8 @@ ARGS:
A short, explanatory text that is shown to a viewer of the
revocation certificate. It explains why the certificate has been
revoked. For instance, if Alice has created a new key, she would
- generate a 'superseded' revocation certificate for her old key, and
- might include the message "I've created a new certificate,
+ generate a 'superseded' revocation certificate for her old key,
+ and might include the message "I've created a new certificate,
FINGERPRINT, please use that in the future."
OPTIONS:
diff --git a/sq/sq.subplot b/sq/sq.subplot
new file mode 100644
index 00000000..034ed8f2
--- /dev/null
+++ b/sq/sq.subplot
@@ -0,0 +1,14 @@
+title: "Sequoia-PGP sq"
+subtitle: "integration tests, requirements, acceptance criteria"
+author: "The Sequoia-PGP project"
+markdowns:
+- sq-subplot.md
+bindings:
+- subplot/sq-subplot.yaml
+- lib/files.yaml
+- lib/runcmd.yaml
+impls:
+ rust:
+ - subplot/sq-subplot.rs
+classes:
+- json
diff --git a/sq/tests/sq-subplot.rs b/sq/tests/sq-subplot.rs
index c40d6225..83dc5274 100644
--- a/sq/tests/sq-subplot.rs
+++ b/sq/tests/sq-subplot.rs
@@ -1 +1 @@
-include!(concat!(env!("OUT_DIR"), "/sq-subplot.rs"));
+include!(concat!(env!("OUT_DIR"), "/sq.rs"));