Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.

Commit 3b59c01

Browse files
committed
Rename to 'convey'
1 parent 3946991 commit 3b59c01

File tree

15 files changed

+100
-96
lines changed

15 files changed

+100
-96
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[package]
2-
name = "output"
2+
name = "convey"
33
version = "0.1.0"
44
authors = ["Pascal Hertleif <[email protected]>"]
55
description = "A Rust create for outputting information and log messages for humans and machines"
66
license = "Apache-2.0 OR MIT"
77
readme = "README.md"
8-
repository = "https://github.com/killercup/output-rs"
8+
repository = "https://github.com/killercup/convey"
99

1010
[workspace]
1111
members = [
12-
"output_derive"
12+
"convey_derive"
1313
]
1414

1515
[dependencies]
@@ -25,5 +25,5 @@ crossbeam-channel = "0.2.6"
2525
proptest = "0.8.7"
2626
assert_fs = "0.9.0"
2727
predicates = "0.9.0"
28-
output_derive = { version = "0.1", path = "output_derive" }
28+
convey_derive = { version = "0.1", path = "convey_derive" }
2929
rand = "0.5.5"

LICENSE-MIT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2018 Pascal Hertleif
1+
Copyright (c) 2018 convey developers
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Output – Easily Output Your Data for Humans and Machines Alike
1+
# Convey
2+
3+
> **Easily Output Your Data for Humans and Machines Alike**
24
35
[![Build Status](https://travis-ci.com/killercup/output-rs.svg?branch=master)](https://travis-ci.com/killercup/output-rs)
46

convey_derive/Cargo.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[package]
2+
name = "convey_derive"
3+
version = "0.1.0"
4+
authors = ["Katharina Fey <[email protected]>", "Pascal Hertleif <[email protected]>"]
5+
repository = "https://github.com/killercup/convey"
6+
license = "Apache-2.0 OR MIT"
7+
8+
[lib]
9+
proc-macro = true
10+
11+
[dependencies]
12+
syn = "0.15"
13+
quote = "0.6"
14+
15+
[dev-dependencies]
16+
convey = { version = "0.1", path = ".." }
17+
serde = "1.0.79"
18+
serde_derive = "1.0.79"

output_derive/src/lib.rs renamed to convey_derive/src/lib.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
//! # Examples
44
//!
55
//! ```rust
6-
//! extern crate output;
7-
//! #[macro_use] extern crate output_derive;
6+
//! extern crate convey;
7+
//! #[macro_use] extern crate convey_derive;
88
//! #[macro_use] extern crate serde_derive;
99
//!
1010
//! #[derive(Serialize, RenderOutput)]
@@ -13,10 +13,10 @@
1313
//! message: String,
1414
//! }
1515
//!
16-
//! # fn main() -> Result<(), output::Error> {
17-
//! # use output::human;
16+
//! # fn main() -> Result<(), convey::Error> {
17+
//! # use convey::human;
1818
//! # let test_target = human::test();
19-
//! let mut out = output::new().add_target(test_target.target());
19+
//! let mut out = convey::new().add_target(test_target.target());
2020
//! out.print(&Message {
2121
//! code: 42,
2222
//! message: String::from("Derive works"),
@@ -54,11 +54,11 @@ pub fn render_output(input: TokenStream) -> TokenStream {
5454
.iter()
5555
.map(|f| f.ident.clone().unwrap().to_string());
5656
quote! {
57-
let mut span = output::components::span();
57+
let mut span = convey::components::span();
5858
#(
5959
span = span.add_item(#names);
6060
span = span.add_item(": ");
61-
span = span.add_item(output::components::text(&self.#fields.to_string()));
61+
span = span.add_item(convey::components::text(&self.#fields.to_string()));
6262
span = span.add_item("\n");
6363
)*
6464
span.render_for_humans(fmt)?;
@@ -68,15 +68,15 @@ pub fn render_output(input: TokenStream) -> TokenStream {
6868
let field_count = s.fields.iter().count();
6969
let fields = (0..field_count)
7070
.fold(Vec::new(), |mut res, i| {
71-
res.push(quote! { span = span.add_item(output::components::text(&self.#i.to_string())); });
71+
res.push(quote! { span = span.add_item(convey::components::text(&self.#i.to_string())); });
7272
if i < field_count - 1 {
7373
res.push(quote! { span = span.add_item(", "); });
7474
}
7575
res
7676
});
7777

7878
quote! {
79-
let mut span = output::components::span();
79+
let mut span = convey::components::span();
8080
span = span.add_item("(");
8181
#(#fields)*
8282
span = span.add_item(")");
@@ -88,13 +88,13 @@ pub fn render_output(input: TokenStream) -> TokenStream {
8888
_ => panic!("Only structs supported for now, sorry."),
8989
};
9090
let exp = quote! {
91-
impl output::Render for #name {
92-
fn render_for_humans(&self, fmt: &mut output::human::Formatter) -> Result<(), output::Error> {
91+
impl convey::Render for #name {
92+
fn render_for_humans(&self, fmt: &mut convey::human::Formatter) -> Result<(), convey::Error> {
9393
#render_span
9494
Ok(())
9595
}
9696

97-
fn render_json(&self, fmt: &mut output::json::Formatter) -> Result<(), output::Error> {
97+
fn render_json(&self, fmt: &mut convey::json::Formatter) -> Result<(), convey::Error> {
9898
fmt.write(self)?;
9999
Ok(())
100100
}

output_derive/tests/structs.rs renamed to convey_derive/tests/structs.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
extern crate output;
1+
extern crate convey;
22
#[macro_use]
3-
extern crate output_derive;
3+
extern crate convey_derive;
44
#[macro_use]
55
extern crate serde_derive;
66

77
#[test]
8-
fn struct_with_named_fields_of_primitive_types() -> Result<(), output::Error> {
8+
fn struct_with_named_fields_of_primitive_types() -> Result<(), convey::Error> {
99
#[derive(Serialize, RenderOutput)]
1010
struct ErrorMessage {
1111
code: i32,
1212
name: String,
1313
message: String,
1414
}
1515

16-
let human = output::human::test();
17-
let json = output::json::test();
18-
let mut out = output::new()
16+
let human = convey::human::test();
17+
let json = convey::json::test();
18+
let mut out = convey::new()
1919
.add_target(human.target())
2020
.add_target(json.target());
2121

@@ -42,13 +42,13 @@ fn struct_with_named_fields_of_primitive_types() -> Result<(), output::Error> {
4242
}
4343

4444
#[test]
45-
fn tuple_struct_of_primitive_types() -> Result<(), output::Error> {
45+
fn tuple_struct_of_primitive_types() -> Result<(), convey::Error> {
4646
#[derive(Serialize, RenderOutput)]
4747
struct ErrorMessage(i32, String);
4848

49-
let human = output::human::test();
50-
let json = output::json::test();
51-
let mut out = output::new()
49+
let human = convey::human::test();
50+
let json = convey::json::test();
51+
let mut out = convey::new()
5252
.add_target(human.target())
5353
.add_target(json.target());
5454

examples/cli.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
extern crate failure;
22
#[macro_use]
3-
extern crate output;
3+
extern crate convey;
44

5-
use output::{
5+
use convey::{
66
components::{newline, text},
77
human, json,
88
};
99

1010
fn main() -> Result<(), failure::Error> {
11-
let mut out = output::new()
11+
let mut out = convey::new()
1212
.add_target(json::file("target/foo.log")?)
1313
.add_target(human::stdout()?);
1414

examples/concurrent.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1+
extern crate convey;
12
extern crate failure;
2-
extern crate output;
33
extern crate rand;
44

5-
use output::{human, json};
5+
use convey::{human, json};
66
use rand::distributions::Distribution;
77
use rand::distributions::Range;
88
use rand::thread_rng;
99
use std::thread;
1010
use std::time::Duration;
1111

1212
fn main() -> Result<(), failure::Error> {
13-
let out = output::new()
13+
let out = convey::new()
1414
.add_target(json::file("target/foo.log")?)
1515
.add_target(human::stdout()?);
1616

examples/custom.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
extern crate failure;
22
#[macro_use]
3-
extern crate output;
3+
extern crate convey;
44
#[macro_use]
55
extern crate serde_derive;
66

7-
use output::{
7+
use convey::{
88
components::{newline, text},
99
human, json,
1010
};
1111

1212
fn main() -> Result<(), failure::Error> {
13-
let mut out = output::new()
13+
let mut out = convey::new()
1414
.add_target(json::file("target/foo.log")?)
1515
.add_target(human::stdout()?);
1616

@@ -21,7 +21,7 @@ fn main() -> Result<(), failure::Error> {
2121
message: String,
2222
}
2323

24-
impl output::Render for ErrorMessage {
24+
impl convey::Render for ErrorMessage {
2525
render_for_humans!(self -> [
2626
span!(fg = "white", bg = "black", [text(self.code.to_string()), text(" "),]),
2727
span!(fg = "red", bg = "black", [text(&self.name),]),

examples/derive.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
extern crate convey;
12
extern crate failure;
2-
extern crate output;
33
#[macro_use]
4-
extern crate output_derive;
4+
extern crate convey_derive;
55
#[macro_use]
66
extern crate serde_derive;
77

8-
use output::{human, json};
8+
use convey::{human, json};
99

1010
fn main() -> Result<(), failure::Error> {
11-
let mut out = output::new()
11+
let mut out = convey::new()
1212
.add_target(json::file("target/foo.log")?)
1313
.add_target(human::stdout()?);
1414

0 commit comments

Comments
 (0)