From 7f103a2435d13a0a400a3033794a64d99ed970ef Mon Sep 17 00:00:00 2001 From: TotallyNot <44345987+TotallyNot@users.noreply.github.com> Date: Thu, 8 Sep 2022 14:38:05 +0200 Subject: [PATCH] prepare for publishing --- Cargo.toml | 2 +- macros/Cargo.toml | 12 ------------ torn-api-macros/Cargo.toml | 17 +++++++++++++++++ {macros => torn-api-macros}/src/lib.rs | 0 torn-api/Cargo.toml | 11 ++++++++--- torn-api/src/faction.rs | 2 +- torn-api/src/user.rs | 2 +- torn-key-pool/Cargo.toml | 12 ++++++++---- 8 files changed, 36 insertions(+), 22 deletions(-) delete mode 100644 macros/Cargo.toml create mode 100644 torn-api-macros/Cargo.toml rename {macros => torn-api-macros}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index be8bcb1..085cd49 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,3 @@ [workspace] resolver = "2" -members = [ "macros", "torn-api", "torn-key-pool" ] +members = [ "torn-api-macros", "torn-api", "torn-key-pool" ] diff --git a/macros/Cargo.toml b/macros/Cargo.toml deleted file mode 100644 index 79584de..0000000 --- a/macros/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "macros" -version = "0.1.0" -edition = "2021" - -[lib] -proc-macro = true - -[dependencies] -syn = { version = "1.0", features = [ "extra-traits" ] } -quote = "1.0" -convert_case = "0.5" diff --git a/torn-api-macros/Cargo.toml b/torn-api-macros/Cargo.toml new file mode 100644 index 0000000..6278c55 --- /dev/null +++ b/torn-api-macros/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "torn-api-macros" +version = "0.1.0" +edition = "2021" +authors = ["Pyrit [2111649]"] +license = "MIT" +repository = "https://github.com/TotallyNot/torn-api.rs.git" +homepage = "https://github.com/TotallyNot/torn-api.rs.git" +description = "Macros implementation of #[derive(ApiCategory)]" + +[lib] +proc-macro = true + +[dependencies] +syn = { version = "1.0", features = [ "extra-traits" ] } +quote = "1.0" +convert_case = "0.5" diff --git a/macros/src/lib.rs b/torn-api-macros/src/lib.rs similarity index 100% rename from macros/src/lib.rs rename to torn-api-macros/src/lib.rs diff --git a/torn-api/Cargo.toml b/torn-api/Cargo.toml index 0f97121..a979bcc 100644 --- a/torn-api/Cargo.toml +++ b/torn-api/Cargo.toml @@ -2,6 +2,11 @@ name = "torn-api" version = "0.3.2" edition = "2021" +authors = ["Pyrit [2111649]"] +license = "MIT" +repository = "https://github.com/TotallyNot/torn-api.rs.git" +homepage = "https://github.com/TotallyNot/torn-api.rs.git" +description = "Torn API bindings for rust" [features] default = [ "reqwest" ] @@ -19,12 +24,12 @@ num-traits = "0.2" reqwest = { version = "0.11", default-features = false, features = [ "json" ], optional = true } awc = { version = "3", default-features = false, optional = true } -macros = { path = "../macros" } +torn-api-macros = { path = "../torn-api-macros", version = "0.1" } [dev-dependencies] actix-rt = { version = "2.7.0" } dotenv = "0.15.0" tokio = { version = "1.20.1", features = ["test-util", "rt", "macros"] } tokio-test = "0.4.2" -reqwest = { version = "*", default-features = true } -awc = { version = "*", features = [ "rustls" ] } +reqwest = { version = "0.11", default-features = true } +awc = { version = "3", features = [ "rustls" ] } diff --git a/torn-api/src/faction.rs b/torn-api/src/faction.rs index ff5753f..028cab5 100644 --- a/torn-api/src/faction.rs +++ b/torn-api/src/faction.rs @@ -2,7 +2,7 @@ use std::collections::BTreeMap; use serde::Deserialize; -use macros::ApiCategory; +use torn_api_macros::ApiCategory; #[derive(Debug, Clone, Copy, ApiCategory)] #[api(category = "faction")] diff --git a/torn-api/src/user.rs b/torn-api/src/user.rs index 2fd0907..d719184 100644 --- a/torn-api/src/user.rs +++ b/torn-api/src/user.rs @@ -4,7 +4,7 @@ use serde::{ Deserialize, Deserializer, }; -use macros::ApiCategory; +use torn_api_macros::ApiCategory; use super::de_util; diff --git a/torn-key-pool/Cargo.toml b/torn-key-pool/Cargo.toml index fc3cba9..66b45d2 100644 --- a/torn-key-pool/Cargo.toml +++ b/torn-key-pool/Cargo.toml @@ -2,6 +2,10 @@ name = "torn-key-pool" version = "0.2.1" edition = "2021" +license = "MIT" +repository = "https://github.com/TotallyNot/torn-api.rs.git" +homepage = "https://github.com/TotallyNot/torn-api.rs.git" +description = "A generalizes API key pool for torn-api" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -12,7 +16,7 @@ reqwest = [ "dep:reqwest", "torn-api/reqwest" ] awc = [ "dep:awc", "torn-api/awc" ] [dependencies] -torn-api = { path = "../torn-api", default-features = false } +torn-api = { path = "../torn-api", default-features = false, version = "0.3" } async-trait = "0.1" thiserror = "1" @@ -25,9 +29,9 @@ awc = { version = "3", default-features = false, optional = true } [dev-dependencies] torn-api = { path = "../torn-api", features = [ "reqwest" ] } -sqlx = { version = "*", features = [ "runtime-tokio-rustls" ] } +sqlx = { version = "0.6", features = [ "runtime-tokio-rustls" ] } dotenv = "0.15.0" tokio = { version = "1.20.1", features = ["test-util", "rt", "macros"] } tokio-test = "0.4.2" -reqwest = { version = "*", default-features = true } -awc = { version = "*", features = [ "rustls" ] } +reqwest = { version = "0.11", default-features = true } +awc = { version = "3", features = [ "rustls" ] }