Skip to content

Commit

Permalink
release: 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstoik1 committed Aug 23, 2022
2 parents 583c848 + 0f66bff commit 9a9b4f8
Show file tree
Hide file tree
Showing 34 changed files with 223 additions and 140 deletions.
16 changes: 8 additions & 8 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Project Dependencies
Package: fyi
Version: 0.9.15
Generated: 2022-08-11 17:33:39 UTC
Version: 0.10.0
Generated: 2022-08-23 20:18:50 UTC

| Package | Version | Author(s) | License |
| ---- | ---- | ---- | ---- |
| [argyle](https://github.com/Blobfolio/argyle) | 0.6.1 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [argyle](https://github.com/Blobfolio/argyle) | 0.6.2 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [const_fn](https://github.com/taiki-e/const_fn) | 0.4.9 | | Apache-2.0 or MIT |
| [dactyl](https://github.com/Blobfolio/dactyl) | 0.4.1 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.9.15 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [dactyl](https://github.com/Blobfolio/dactyl) | 0.4.2 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [fyi_msg](https://github.com/Blobfolio/fyi) | 0.10.0 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [num-traits](https://github.com/rust-num/num-traits) | 0.2.15 | The Rust Project Developers | Apache-2.0 or MIT |
| [once_cell](https://github.com/matklad/once_cell) | 1.13.0 | [Aleksey Kladov](mailto:aleksey.kladov@gmail.com) | Apache-2.0 or MIT |
| [tz-rs](https://github.com/x-hgg-x/tz-rs) | 0.6.12 | x-hgg-x | Apache-2.0 or MIT |
| [utc2k](https://github.com/Blobfolio/utc2k) | 0.5.5 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [once_cell](https://github.com/matklad/once_cell) | 1.13.1 | [Aleksey Kladov](mailto:aleksey.kladov@gmail.com) | Apache-2.0 or MIT |
| [tz-rs](https://github.com/x-hgg-x/tz-rs) | 0.6.14 | x-hgg-x | Apache-2.0 or MIT |
| [utc2k](https://github.com/Blobfolio/utc2k) | 0.5.7 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
29 changes: 17 additions & 12 deletions fyi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fyi"
version = "0.9.15"
version = "0.10.0"
license = "WTFPL"
authors = ["Blobfolio, LLC. <hello@blobfolio.com>"]
edition = "2021"
Expand All @@ -21,17 +21,18 @@ assets = [
["../target/x86_64-unknown-linux-gnu/release/fyi", "usr/bin/", "755"],
["../release/completions/fyi.bash", "etc/bash_completion.d/", "644"],
["../release/man/fyi.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-blank.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-confirm.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-crunched.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-debug.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-done.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-error.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-info.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-print.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-task.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-blank.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-crunched.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-done.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-notice.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-print.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-review.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-success.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-task.1.gz", "usr/share/man/man1/", "644"],
["../release/man/fyi-warning.1.gz", "usr/share/man/man1/", "644"],
]

Expand Down Expand Up @@ -77,6 +78,10 @@ description="Info: Hello World"
cmd = "notice"
description="Notice: Hello World"

[[package.metadata.bashman.subcommands]]
cmd = "review"
description="Review: Hello World"

[[package.metadata.bashman.subcommands]]
cmd = "success"
description="Success: Hello World"
Expand All @@ -93,24 +98,24 @@ description="Warning: Hello World"
short = "-h"
long = "--help"
description = "Print help information."
subcommands = [ "", "blank", "confirm", "print", "crunched", "debug", "done", "error", "info", "notice", "success", "task", "warning" ]
subcommands = [ "", "blank", "confirm", "print", "crunched", "debug", "done", "error", "info", "notice", "review", "success", "task", "warning" ]

[[package.metadata.bashman.switches]]
short = "-i"
long = "--indent"
description = "Indent the line."
subcommands = [ "confirm", "print", "crunched", "debug", "done", "error", "info", "notice", "success", "task", "warning" ]
subcommands = [ "confirm", "print", "crunched", "debug", "done", "error", "info", "notice", "review", "success", "task", "warning" ]

[[package.metadata.bashman.switches]]
long = "--stderr"
description = "Print to STDERR instead of STDOUT."
subcommands = [ "blank", "print", "crunched", "debug", "done", "error", "info", "notice", "success", "task", "warning" ]
subcommands = [ "blank", "print", "crunched", "debug", "done", "error", "info", "notice", "review", "success", "task", "warning" ]

[[package.metadata.bashman.switches]]
short = "-t"
long = "--timestamp"
description = "Include a timestamp."
subcommands = [ "confirm", "print", "crunched", "debug", "done", "error", "info", "notice", "success", "task", "warning" ]
subcommands = [ "confirm", "print", "crunched", "debug", "done", "error", "info", "notice", "review", "success", "task", "warning" ]

[[package.metadata.bashman.switches]]
short = "-V"
Expand All @@ -131,7 +136,7 @@ long = "--exit"
description = "Exit with this status code after printing. [default: 0]"
label = "<NUM>"
path = false
subcommands = [ "print", "crunched", "debug", "done", "error", "info", "notice", "success", "task", "warning" ]
subcommands = [ "print", "crunched", "debug", "done", "error", "info", "notice", "review", "success", "task", "warning" ]

[[package.metadata.bashman.options]]
short = "-c"
Expand All @@ -152,7 +157,7 @@ subcommands = [ "print" ]
[[package.metadata.bashman.arguments]]
label = "<MSG>"
description = "The message!"
subcommands = [ "confirm", "print", "crunched", "debug", "done", "error", "info", "notice", "success", "task", "warning" ]
subcommands = [ "confirm", "print", "crunched", "debug", "done", "error", "info", "notice", "review", "success", "task", "warning" ]

[build-dependencies.fyi_msg]
path = "../fyi_msg"
Expand Down
1 change: 1 addition & 0 deletions fyi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ pub fn main() {
("Error", MsgKind::Error),
("Info", MsgKind::Info),
("Notice", MsgKind::Notice),
("Review", MsgKind::Review),
("Success", MsgKind::Success),
("Task", MsgKind::Task),
("Warning", MsgKind::Warning),
Expand Down
1 change: 1 addition & 0 deletions fyi/help/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ SUBCOMMANDS:
error Error: Hello World
info Info: Hello World
notice Notice: Hello World
review Review: Hello World
success Success: Hello World
task Task: Hello World
warning Warning: Hello World
1 change: 1 addition & 0 deletions fyi/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ fn helper(cmd: Option<Box<[u8]>>) {
b"info" => write_help!("info", true),
b"notice" => write_help!("notice", true),
b"print" => write_help!("print"),
b"review" => write_help!("review", true),
b"success" => write_help!("success", true),
b"task" => write_help!("task", true),
b"warning" => write_help!("warning", true),
Expand Down
8 changes: 5 additions & 3 deletions fyi_msg/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fyi_msg"
version = "0.9.15"
version = "0.10.0"
authors = ["Blobfolio, LLC. <hello@blobfolio.com>"]
edition = "2021"
rust-version = "1.62"
Expand All @@ -16,7 +16,7 @@ default-target = "x86_64-unknown-linux-gnu"
targets = [ "x86_64-unknown-linux-gnu", "x86_64-apple-darwin" ]

[dependencies]
dactyl = "0.4.*"
dactyl = "0.4.*, >= 0.4.2"

[dependencies.ahash]
version = "=0.8.0"
Expand All @@ -40,7 +40,7 @@ features = [ "local" ]
optional = true

[dev-dependencies]
brunch = "0.2.*"
brunch = "0.3.*"
rayon = "1.5.*"

[[bench]]
Expand Down Expand Up @@ -71,6 +71,8 @@ harness = false
required-features = [ "timestamps" ]

[features]
default = []

# This adds a few additional MsgKinds relevant only to the main FYI binary.
# There is no point enabling this in other crates.
bin_kinds = []
Expand Down
8 changes: 4 additions & 4 deletions fyi_msg/benches/fm_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ adjtime_config.5.gz________deb-old.5.gz_______________devscripts.conf.5.gz______
}

benches!(
Bench::new("fyi_msg::MsgBuffer", "len(2)")
.with(|| test_data().len(2)),
Bench::new("fyi_msg::MsgBuffer::len(2)")
.run(|| test_data().len(2)),

Bench::new("fyi_msg::MsgBuffer", "range(2)")
.with(|| test_data().range(2))
Bench::new("fyi_msg::MsgBuffer::range(2)")
.run(|| test_data().range(2))
);
16 changes: 8 additions & 8 deletions fyi_msg/benches/fm_buffer_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,29 @@ adjtime_config.5.gz________deb-old.5.gz_______________devscripts.conf.5.gz______
}

benches!(
Bench::new("fyi_msg::MsgBuffer", "extend(+6)")
.with(|| {
Bench::new("fyi_msg::MsgBuffer::extend(+6)")
.run(|| {
let mut msg = test_data();
msg.extend(1, b" LOL.");
msg
}),

Bench::new("fyi_msg::MsgBuffer", "replace(bigger)")
.with(|| {
Bench::new("fyi_msg::MsgBuffer::replace(bigger)")
.run(|| {
let mut msg = test_data();
msg.replace(1, b"Hello, my name is Bob.");
msg
}),

Bench::new("fyi_msg::MsgBuffer", "replace(smaller)")
.with(|| {
Bench::new("fyi_msg::MsgBuffer::replace(smaller)")
.run(|| {
let mut msg = test_data();
msg.replace(1, b"!!");
msg
}),

Bench::new("fyi_msg::MsgBuffer", "truncate(0)")
.with(|| {
Bench::new("fyi_msg::MsgBuffer::truncate(0)")
.run(|| {
let mut msg = test_data();
msg.truncate(1, 0);
msg
Expand Down
22 changes: 8 additions & 14 deletions fyi_msg/benches/fm_fitted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ use brunch::{

#[cfg(feature = "fitted")] use fyi_msg::width;

use std::time::Duration;

// "This is an example message."
const PLAIN: &[u8] = &[84, 104, 105, 115, 32, 105, 115, 32, 97, 110, 32, 101, 120, 97, 109, 112, 108, 101, 32, 109, 101, 115, 115, 97, 103, 101, 46];
// "This \x1b[1mis\x1b[0m an example message."
Expand All @@ -22,21 +20,17 @@ const UNICODE_ANSI: &[u8] = &[84, 104, 105, 115, 32, 119, 111, 114, 108, 100, 32

#[cfg(feature = "fitted")]
benches!(
Bench::new("fyi_msg", "width(ASCII)")
.timed(Duration::from_secs(2))
.with(|| width(PLAIN)),
Bench::new("fyi_msg::width(ASCII)")
.run(|| width(PLAIN)),

Bench::new("fyi_msg", "width(ASCII + ANSI)")
.timed(Duration::from_secs(2))
.with(|| width(PLAIN_ANSI)),
Bench::new("fyi_msg::width(ASCII + ANSI)")
.run(|| width(PLAIN_ANSI)),

Bench::new("fyi_msg", "width(UNICODE)")
.timed(Duration::from_secs(2))
.with(|| width(UNICODE)),
Bench::new("fyi_msg::width(UNICODE)")
.run(|| width(UNICODE)),

Bench::new("fyi_msg", "width(UNICODE + ANSI)")
.timed(Duration::from_secs(2))
.with(|| width(UNICODE_ANSI))
Bench::new("fyi_msg::width(UNICODE + ANSI)")
.run(|| width(UNICODE_ANSI))
);

#[cfg(not(feature = "fitted"))]
Expand Down
31 changes: 12 additions & 19 deletions fyi_msg/benches/fm_msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,25 @@ use fyi_msg::{
Msg,
MsgKind,
};
use std::time::Duration;

const TEXT: &str = "This is an example message.";

benches!(
Bench::new("fyi_msg::Msg", "default()")
.timed(Duration::from_secs(2))
.with(|| Msg::default()),
Bench::new("fyi_msg::Msg::default()")
.run(|| Msg::default()),

Bench::new("fyi_msg::Msg", "plain()")
.timed(Duration::from_secs(2))
.with(|| Msg::plain(TEXT)),
Bench::new("fyi_msg::Msg::plain()")
.run(|| Msg::plain(TEXT)),

Bench::new("fyi_msg::Msg", "custom(Prefix, 199)")
.timed(Duration::from_secs(2))
.with(|| Msg::custom("Prefix", 199, TEXT)),
Bench::new("fyi_msg::Msg::custom(Prefix, 199)")
.run(|| Msg::custom("Prefix", 199, TEXT)),

Bench::new("fyi_msg::Msg", "error()")
.timed(Duration::from_secs(2))
.with(|| Msg::error(TEXT)),
Bench::new("fyi_msg::Msg::error()")
.run(|| Msg::error(TEXT)),

Bench::new("fyi_msg::Msg", "new(Error)")
.timed(Duration::from_secs(2))
.with(|| Msg::new(MsgKind::Error, TEXT)),
Bench::new("fyi_msg::Msg::new(Error)")
.run(|| Msg::new(MsgKind::Error, TEXT)),

Bench::new("fyi_msg::MsgKind", "into_msg()")
.timed(Duration::from_secs(2))
.with(|| MsgKind::Error.into_msg(TEXT))
Bench::new("fyi_msg::MsgKind::into_msg()")
.run(|| MsgKind::Error.into_msg(TEXT))
);
16 changes: 6 additions & 10 deletions fyi_msg/benches/fm_msg_fitted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,19 @@ use brunch::{
benches,
};
use fyi_msg::Msg;
use std::time::Duration;

const TEXT: &str = "This is an example message.";

#[cfg(feature = "fitted")]
benches!(
Bench::new("fyi_msg::Msg::error()", "fitted(20)")
.timed(Duration::from_secs(2))
.with_setup(Msg::error(TEXT), |v| v.fitted(20).len()),
Bench::new("fyi_msg::Msg::error()::fitted(20)")
.run_seeded(Msg::error(TEXT), |v| v.fitted(20).len()),

Bench::new("fyi_msg::Msg::error()", "fitted(40)")
.timed(Duration::from_secs(2))
.with_setup(Msg::error(TEXT), |v| v.fitted(40).len()),
Bench::new("fyi_msg::Msg::error()::fitted(40)")
.run_seeded(Msg::error(TEXT), |v| v.fitted(40).len()),

Bench::new("fyi_msg::Msg::error()", "fitted(50)")
.timed(Duration::from_secs(2))
.with_setup(Msg::error(TEXT), |v| v.fitted(50).len())
Bench::new("fyi_msg::Msg::error()::fitted(50)")
.run_seeded(Msg::error(TEXT), |v| v.fitted(50).len())
);

#[cfg(not(feature = "fitted"))]
Expand Down
16 changes: 6 additions & 10 deletions fyi_msg/benches/fm_msg_timestamps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,19 @@ use brunch::{
benches,
};
use fyi_msg::Msg;
use std::time::Duration;

const TEXT: &str = "This is an example message.";

#[cfg(feature = "timestamps")]
benches!(
Bench::new("fyi_msg::Msg::default()", "with_timestamp(true)")
.timed(Duration::from_secs(2))
.with_setup(Msg::default(), |v| v.with_timestamp(true)),
Bench::new("fyi_msg::Msg::default()::with_timestamp(true)")
.run_seeded(Msg::default(), |v| v.with_timestamp(true)),

Bench::new("fyi_msg::Msg::plain()", "with_timestamp(true)")
.timed(Duration::from_secs(2))
.with_setup(Msg::plain(TEXT), |v| v.with_timestamp(true)),
Bench::new("fyi_msg::Msg::plain()::with_timestamp(true)")
.run_seeded(Msg::plain(TEXT), |v| v.with_timestamp(true)),

Bench::new("fyi_msg::Msg::error()", "with_timestamp(true)")
.timed(Duration::from_secs(2))
.with_setup(Msg::error(TEXT), |v| v.with_timestamp(true))
Bench::new("fyi_msg::Msg::error()::with_timestamp(true)")
.run_seeded(Msg::error(TEXT), |v| v.with_timestamp(true))
);

#[cfg(not(feature = "timestamps"))]
Expand Down
1 change: 1 addition & 0 deletions fyi_msg/examples/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ fn main() {

println!();

Msg::review("The total was such-and-such.").print();
Msg::debug("The devil is in the details.").print();
Msg::info("Details without the word 'bug'.").print();
Msg::task("Let's get to work!").print();
Expand Down

0 comments on commit 9a9b4f8

Please sign in to comment.