From a7183731c740fbcefac9ac81b6503006b2675f8c Mon Sep 17 00:00:00 2001 From: Xyon Date: Wed, 30 Aug 2023 16:54:43 +0100 Subject: [PATCH] Update config and move to v3 manifold --- Cargo.lock | 37 +++++++++++++++++----------------- Cargo.toml | 4 ++-- config/badgey.json | 12 ----------- config/development.badgey.json | 32 +++++++++++++++++++++++++++++ config/production.badgey.json | 32 +++++++++++++++++++++++++++++ 5 files changed, 85 insertions(+), 32 deletions(-) delete mode 100644 config/badgey.json create mode 100644 config/development.badgey.json create mode 100644 config/production.badgey.json diff --git a/Cargo.lock b/Cargo.lock index 844593a..a1ee6ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] @@ -445,9 +445,9 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.5.2" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b101bb8960ab42ada6ae98eb82afcea4452294294c45b681295af26610d6d28" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", "hashbrown 0.14.0", @@ -1095,8 +1095,8 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "manifold" -version = "2.0.0" -source = "git+ssh://git@code.orbiter-radio.uk/source/mfold.git?branch=feature/weather-forecasting#4f9171d96a7423016613234d3be0fdaa048e875e" +version = "3.0.0" +source = "git+ssh://git@code.orbiter-radio.uk/source/mfold.git#57b79e7a5e9a8b04259dd618a5a48ada4b41ccac" dependencies = [ "built", "chrono", @@ -1122,9 +1122,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.1" +version = "2.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f478948fd84d9f8e86967bf432640e46adfb5a4bd4f14ef7e864ab38220534ae" +checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e" [[package]] name = "migrations_internals" @@ -1433,19 +1433,20 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.2" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" +checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33" dependencies = [ + "memchr", "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.2" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" +checksum = "a2bee7be22ce7918f641a33f08e3f43388c7656772244e2bbb2477f44cc9021a" dependencies = [ "pest", "pest_generator", @@ -1453,9 +1454,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.2" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" +checksum = "d1511785c5e98d79a05e8a6bc34b4ac2168a0e3e92161862030ad84daa223141" dependencies = [ "pest", "pest_meta", @@ -1466,9 +1467,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.7.2" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" +checksum = "b42f0394d3123e33353ca5e1e89092e533d2cc490389f2bd6131c43c634ebc5f" dependencies = [ "once_cell", "pest", @@ -1722,7 +1723,7 @@ version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" dependencies = [ - "aho-corasick 1.0.4", + "aho-corasick 1.0.5", "memchr", "regex-automata", "regex-syntax 0.7.5", @@ -1734,7 +1735,7 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" dependencies = [ - "aho-corasick 1.0.4", + "aho-corasick 1.0.5", "memchr", "regex-syntax 0.7.5", ] diff --git a/Cargo.toml b/Cargo.toml index 4fc976a..cb25432 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ diesel = { version = "2.1.0", features = ["sqlite", "r2d2", "chrono"] } diesel_migrations = "2.1.0" env_logger = "0.10.0" log = "0.4.20" -manifold = { git = "ssh://git@code.orbiter-radio.uk/source/mfold.git", branch = "feature/weather-forecasting" } -# manifold = { path = "/home/xyon/Workspace/manifold/" } +manifold = { git = "ssh://git@code.orbiter-radio.uk/source/mfold.git" } +#manifold = { path = "/home/xyon/Workspace/manifold/" } poise = "0.5.5" tokio = { version = "1.16.1", features = ["sync", "macros", "rt-multi-thread"] } diff --git a/config/badgey.json b/config/badgey.json deleted file mode 100644 index 3839ee0..0000000 --- a/config/badgey.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "ProductionBotPrefix": ".", - "ProductionWeatherApiKey": "70aacb9af931438a957215406211210", - "ProductionWeatherBaseUrl": "https://api.weatherapi.com/v1", - "ProductionLogChannel": "1143479696886087801", - "ProductionBotNickname": "Badgey", - "DevelopmentBotPrefix": "-", - "DevelopmentWeatherApiKey": "70aacb9af931438a957215406211210", - "DevelopmentWeatherBaseUrl": "https://api.weatherapi.com/v1", - "DevelopmentLogChannel": "648260641626390528", - "DevelopmentBotNickname": "Badgey (Development Edition)" -} \ No newline at end of file diff --git a/config/development.badgey.json b/config/development.badgey.json new file mode 100644 index 0000000..4ffb7e6 --- /dev/null +++ b/config/development.badgey.json @@ -0,0 +1,32 @@ +{ + "prefix": "-", + "nickname": "Badgey (Development Edition)", + "channels": { + "log": 648260641626390528 + }, + "responses_file_path": "txt/responses.txt", + "services": { + "weather": { + "source_uri": "https://api.weatherapi.com/v1", + "cache_mode": "NoCache", + "api_key": "70aacb9af931438a957215406211210" + }, + "frog_tips": { + "source_uri": "https://frog.tips/api/1/tips/", + "cache_name": "frog_tips", + "cache_mode": "Cache" + }, + "dog_pics": { + "source_uri": "https://api.thedogapi.com/v1/images/search?limit=100&order=RAND", + "cache_name": "dog_pics", + "cache_mode": "Cache", + "api_key": "live_RRrRUsdmRIpKUefuwOwuAV1nab7Gt8GqyvIqPGCgLAbpLHGdyStbGj9Xc67inYMt" + }, + "cat_pics": { + "source_uri": "https://api.thecatapi.com/v1/images/search?limit=100&order=RAND", + "cache_name": "cat_pics", + "cache_mode": "Cache", + "api_key": "live_nvupPQbrXjHy8jsZJ1stp72fzsRLR8jQby8IR3l9yMngqAU9gcTEV8RA0OOiK8zP" + } + } +} diff --git a/config/production.badgey.json b/config/production.badgey.json new file mode 100644 index 0000000..7542caa --- /dev/null +++ b/config/production.badgey.json @@ -0,0 +1,32 @@ +{ + "prefix": ".", + "nickname": "Badgey", + "channels": { + "log": 1143479696886087801 + }, + "responses_file_path": "txt/responses.txt", + "services": { + "weather": { + "source_uri": "https://api.weatherapi.com/v1", + "cache_mode": "NoCache", + "api_key": "70aacb9af931438a957215406211210" + }, + "frog_tips": { + "source_uri": "https://frog.tips/api/1/tips/", + "cache_name": "frog_tips", + "cache_mode": "Cache" + }, + "dog_pics": { + "source_uri": "https://api.thedogapi.com/v1/images/search?limit=100&order=RAND", + "cache_name": "dog_pics", + "cache_mode": "Cache", + "api_key": "live_RRrRUsdmRIpKUefuwOwuAV1nab7Gt8GqyvIqPGCgLAbpLHGdyStbGj9Xc67inYMt" + }, + "cat_pics": { + "source_uri": "https://api.thecatapi.com/v1/images/search?limit=100&order=RAND", + "cache_name": "cat_pics", + "cache_mode": "Cache", + "api_key": "live_nvupPQbrXjHy8jsZJ1stp72fzsRLR8jQby8IR3l9yMngqAU9gcTEV8RA0OOiK8zP" + } + } +}