mirror of
https://github.com/narrrl/narl-workspace.git
synced 2026-11-04 17:07:00 +01:00
docs, help, checks: the README and the help say what the app does
README: the API table lists every route, twelve of which were missing; an SFTP section says how to turn the mount on and register a key; the keys table and the command list cover what was only in the code (digits, Tab, w, f, Alt-h/l, Ctrl-D/U, m/p, :today, :edit, :next and the rest, :search!, :set clipboard, :logout!). Three claims that were wrong are fixed: there is no board button above the list, R does not rename a space, and Esc/q close the document. Help gains the agenda keys and the board's gg/G and r. :t no longer means :today, which read as the agenda's key. make check runs cargo fmt --check, after the one formatting commit before this, which .git-blame-ignore-revs names (git config blame.ignoreRevsFile .git-blame-ignore-revs). Cargo.toml states rust-version 1.96, the floor the Proton crates set, and the build is checked on it. make build installs the frontend from the lockfile. A test reads the route table out of routes/mod.rs and asks every route without a cookie: all but the login, the health check and the share links must answer 401, including any route added later.
This commit is contained in:
1 parent
e0f0ebb646
commit
9749c500cf
9 files changed
+229
-40
No files matched your search
@@ -311,6 +311,42 @@ impl Config {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
impl Config {
|
||||
/// A configuration with nothing switched on, for tests.
|
||||
pub fn for_tests(session_days: i64) -> Self {
|
||||
Self {
|
||||
username: "narl".into(),
|
||||
password: "hunter2".into(),
|
||||
secret: b"a-secret-of-at-least-16-bytes".to_vec(),
|
||||
bind: "127.0.0.1:0".parse().unwrap(),
|
||||
data_dir: ".".into(),
|
||||
session_days,
|
||||
max_upload_bytes: 1,
|
||||
secure_cookie: false,
|
||||
vault_idle: std::time::Duration::from_secs(60),
|
||||
backup: BackupConfig {
|
||||
device_name: "narl-diary".into(),
|
||||
interval: None,
|
||||
debounce: std::time::Duration::from_secs(0),
|
||||
prune: false,
|
||||
session_key_file: None,
|
||||
},
|
||||
mail: MailConfig {
|
||||
url: None,
|
||||
from: String::new(),
|
||||
to: String::new(),
|
||||
timezone: chrono_tz::UTC,
|
||||
reminder_at: None,
|
||||
card_due_at: None,
|
||||
digest_at: None,
|
||||
kinds: Vec::new(),
|
||||
},
|
||||
sftp: SftpConfig { bind: None },
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl MailConfig {
|
||||
fn from_env() -> Result<Self> {
|
||||
let url = var("SMTP_URL");
|
||||
|
||||
Reference in new issue
Block a user