From 0956fa9a482481becacf271c447c8a3a528befd3 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Thu, 16 Jul 2020 08:43:04 -0400 Subject: [PATCH] integrate kankyo --- Cargo.lock | 158 +++++++++++++++++++++++++++++++++++++++++++++++----- Cargo.toml | 5 +- src/main.rs | 1 + 3 files changed, 148 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5061ed8..29464a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,6 +42,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567b077b825e468cc974f0020d4082ee6e03132512f207ef1a02fd5d00d1f32d" +[[package]] +name = "aho-corasick" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" +dependencies = [ + "memchr", +] + [[package]] name = "aho-corasick" version = "0.7.13" @@ -288,7 +297,7 @@ dependencies = [ "lazy_static", "pest", "pest_derive", - "regex", + "regex 1.3.9", "twoway 0.2.1", "typed-arena", "unicode_categories", @@ -392,7 +401,7 @@ dependencies = [ "itertools", "lazy_static", "once_cell", - "percent-encoding", + "percent-encoding 2.1.0", "pest", "pest_consume", "pest_generator", @@ -402,7 +411,7 @@ dependencies = [ "serde_cbor", "sha2", "smallvec", - "url", + "url 2.1.1", "walkdir", ] @@ -478,7 +487,7 @@ dependencies = [ "atty", "humantime", "log 0.4.8", - "regex", + "regex 1.3.9", "termcolor", ] @@ -830,6 +839,17 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +[[package]] +name = "idna" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "idna" version = "0.2.0" @@ -892,6 +912,20 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jsonapi" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "814fe35a3361c079fbed80fee6901a041c077c9ffe1a7cb13a31de064e1e97b5" +dependencies = [ + "error-chain", + "log 0.4.8", + "queryst", + "serde", + "serde_derive", + "serde_json", +] + [[package]] name = "jsonfeed" version = "0.3.0" @@ -902,6 +936,12 @@ dependencies = [ "serde_json", ] +[[package]] +name = "kankyo" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "325a11231fa70c1d1b562655db757cefb6022876d62f173831f35bd670ae0c40" + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -1224,6 +1264,24 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efcee3c6d23b94012e240525f131c6abaa9e5eeb8f211002d93beec3b7be350" +[[package]] +name = "patreon" +version = "0.1.0" +dependencies = [ + "chrono", + "jsonapi", + "reqwest", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "percent-encoding" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" + [[package]] name = "percent-encoding" version = "2.1.0" @@ -1449,6 +1507,19 @@ dependencies = [ "thiserror", ] +[[package]] +name = "queryst" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee648fdfde06a88a03a225276e2d52c9243439fba1af36362ad6bbe5ea4658b0" +dependencies = [ + "lazy_static", + "regex 0.2.11", + "serde", + "serde_json", + "url 1.7.2", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -1646,16 +1717,38 @@ version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +[[package]] +name = "regex" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" +dependencies = [ + "aho-corasick 0.6.10", + "memchr", + "regex-syntax 0.5.6", + "thread_local 0.3.6", + "utf8-ranges", +] + [[package]] name = "regex" version = "1.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" dependencies = [ - "aho-corasick", + "aho-corasick 0.7.13", "memchr", - "regex-syntax", - "thread_local", + "regex-syntax 0.6.18", + "thread_local 1.0.1", +] + +[[package]] +name = "regex-syntax" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" +dependencies = [ + "ucd-util", ] [[package]] @@ -1694,13 +1787,14 @@ dependencies = [ "mime 0.3.16", "mime_guess 2.0.3", "native-tls", - "percent-encoding", + "percent-encoding 2.1.0", "pin-project-lite", "serde", + "serde_json", "serde_urlencoded", "tokio", "tokio-tls", - "url", + "url 2.1.1", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -1844,7 +1938,7 @@ dependencies = [ "dhall_proc_macros", "doc-comment", "serde", - "url", + "url 2.1.1", ] [[package]] @@ -1867,7 +1961,7 @@ dependencies = [ "dtoa", "itoa", "serde", - "url", + "url 2.1.1", ] [[package]] @@ -1920,7 +2014,7 @@ checksum = "5c95c7e58b4461fec85bdd58f271bcd416ecc4d630c3ac280b60efa3421016b7" dependencies = [ "chrono", "chrono_utils", - "url", + "url 2.1.1", "xml-rs", ] @@ -2035,6 +2129,15 @@ dependencies = [ "syn", ] +[[package]] +name = "thread_local" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +dependencies = [ + "lazy_static", +] + [[package]] name = "thread_local" version = "1.0.1" @@ -2174,7 +2277,7 @@ dependencies = [ "log 0.4.8", "rand 0.7.3", "sha-1", - "url", + "url 2.1.1", "utf-8", ] @@ -2215,6 +2318,12 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" +[[package]] +name = "ucd-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c85f514e095d348c279b1e5cd76795082cf15bd59b93207832abe0b1d8fed236" + [[package]] name = "unchecked-index" version = "0.2.2" @@ -2275,15 +2384,26 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" +[[package]] +name = "url" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" +dependencies = [ + "idna 0.1.5", + "matches", + "percent-encoding 1.0.1", +] + [[package]] name = "url" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" dependencies = [ - "idna", + "idna 0.2.0", "matches", - "percent-encoding", + "percent-encoding 2.1.0", ] [[package]] @@ -2298,6 +2418,12 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" +[[package]] +name = "utf8-ranges" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ae116fef2b7fea257ed6440d3cfcff7f190865f170cdad00bb6465bf18ecba" + [[package]] name = "vcpkg" version = "0.2.10" @@ -2534,9 +2660,11 @@ dependencies = [ "go_vanity", "hyper", "jsonfeed", + "kankyo", "lazy_static", "log 0.4.8", "mime 0.3.16", + "patreon", "pretty_env_logger", "prometheus", "rand 0.7.3", diff --git a/Cargo.toml b/Cargo.toml index d1cb0de..7424817 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,7 @@ comrak = "0.8" envy = "0.4" glob = "0.3" hyper = "0.13" +kankyo = "0.3" lazy_static = "1.4" log = "0" mime = "0.3.0" @@ -35,6 +36,7 @@ xml-rs = "0.8" # workspace dependencies go_vanity = { path = "./lib/go_vanity" } jsonfeed = { path = "./lib/jsonfeed" } +patreon = { path = "./lib/patreon" } [build-dependencies] ructe = { version = "0.11", features = ["warp02"] } @@ -42,5 +44,6 @@ ructe = { version = "0.11", features = ["warp02"] } [workspace] members = [ "./lib/go_vanity", - "./lib/jsonfeed" + "./lib/jsonfeed", + "./lib/patreon" ] diff --git a/src/main.rs b/src/main.rs index 1743db7..51075c7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,6 +21,7 @@ fn with_state( #[tokio::main] async fn main() -> Result<()> { + let _ = kankyo::init(); pretty_env_logger::init(); log::info!("starting up commit {}", env!("GITHUB_SHA"));