Compare commits
94 Commits
dependabot
...
fix/clippy
Author | SHA1 | Date | |
---|---|---|---|
c0648c2b3c
|
|||
|
bfa9ac5621 | ||
|
7ad2ce62ce | ||
|
4eded27928 | ||
|
b1c6f6ddcb | ||
|
71a7948795 | ||
|
65be7b7182 | ||
|
800a57dea2 | ||
|
ef77138915 | ||
|
6e51f3068b | ||
|
9fb5cd83bb | ||
|
f6efaf5425 | ||
|
24bd6f0c57 | ||
|
a2eb11aa4f | ||
|
cfa484dd18 | ||
|
f3eaa83786 | ||
|
0281aa3100 | ||
|
ebfd779ac6 | ||
|
5a6a200dfc | ||
|
cafe5667e2 | ||
|
c8bd205e01 | ||
|
cc98174b5b | ||
|
3d84199cfb | ||
|
3888c8fbb1 | ||
|
620db7d074 | ||
|
eaec42be89 | ||
|
8e22814b4d | ||
|
e8cbbf6db8 | ||
|
24ca8b0bbc | ||
|
8df821536b | ||
|
751d52b640 | ||
|
5be61a3682 | ||
|
e88f058240 | ||
|
3e21b8342f | ||
|
77f6030b06 | ||
|
c993d9551e | ||
|
a6657a9f01 | ||
|
34d4bbcbf6 | ||
|
eda109e63a | ||
|
a4e8abfe70 | ||
|
43bca353d5 | ||
|
a9810ae704 | ||
|
d72eea53f0 | ||
|
3dd6d70371 | ||
|
81f99dba3d | ||
|
2d17185a39 | ||
|
88a3b3611b | ||
|
4b8730d6e0 | ||
|
25aea0f04d | ||
|
410a602638 | ||
|
894afaa75d | ||
|
29710d9263 | ||
|
d49a8d330b | ||
|
cb746c949b | ||
|
f4a83aad2c | ||
|
5765016163 | ||
|
8ded2da3ee | ||
|
a5c99fa7f5 | ||
|
caee48f4a4 | ||
|
18af42ed58 | ||
|
5505331599 | ||
|
deec0a0fa6 | ||
|
514960324c | ||
|
f86c59fe41 | ||
|
f7366f8939 | ||
|
0c0c2331b1 | ||
|
92f3a15384 | ||
|
93de768362 | ||
|
ebee3bb272 | ||
|
23587a7099 | ||
|
648e2b47ba | ||
|
6f58f1f769 | ||
|
b4bd8d2176 | ||
|
19bc8126a8 | ||
|
a790b6cca6 | ||
|
ae22e0f385 | ||
|
c9ccb2891c | ||
|
9fbbad7157 | ||
|
3789ddd152 | ||
|
f25e883fd1 | ||
|
a684341cd3 | ||
|
3f42a03fa8 | ||
|
8a71b308df | ||
|
37f8a1d32e | ||
|
84686aecdb | ||
|
208a6db95c | ||
|
d43ef2402e | ||
|
14e353fd26 | ||
|
0735399ff9 | ||
|
ef1e53637e | ||
|
453963193f | ||
|
7ebc300d6f | ||
|
0520679022 | ||
|
7b50187daa |
8
.github/workflows/rust.yml
vendored
8
.github/workflows/rust.yml
vendored
@@ -42,13 +42,9 @@ jobs:
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Clippy Linting
|
||||
run: cargo clippy --all-features -- -Dclippy::all
|
||||
# TODO
|
||||
# run: cargo clippy --all-features -- -Dclippy::all -Dclippy::pedantic
|
||||
run: cargo clippy --all-features -- -Dclippy::all -Dclippy::pedantic
|
||||
- name: Clippy Test Linting
|
||||
run: cargo clippy --tests -- -Dclippy::all
|
||||
# TODO
|
||||
# run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
|
||||
run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
|
||||
|
||||
|
||||
test:
|
||||
|
15
CHANGELOG.md
15
CHANGELOG.md
@@ -5,16 +5,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
### Dependencies
|
||||
- Bump `serde` from 1.0.160 to 1.0.166 (#613, #617, #627, #636)
|
||||
- Bump `serde` from 1.0.160 to 1.0.183 (#613, #617, #627, #636, #639, #640, #645, [#648](https://github.com/vbrandl/hoc/pull/648), [#650](https://github.com/vbrandl/hoc/pull/650), [#652](https://github.com/vbrandl/hoc/pull/652), [#653](https://github.com/vbrandl/hoc/pull/653), [#654](https://github.com/vbrandl/hoc/pull/654), [#655](https://github.com/vbrandl/hoc/pull/655), [#657](https://github.com/vbrandl/hoc/pull/657))
|
||||
- Bump `actions/cache` from 2 to 3 (#616)
|
||||
- Bump `tokio` from 1.28.0 to 1.29.1 (#618, #625, #633, #634)
|
||||
- Bump `tokio` from 1.28.0 to 1.32.0 (#618, #625, #633, #634, [#659](https://github.com/vbrandl/hoc/pull/659), [#660](https://github.com/vbrandl/hoc/pull/660), [#665](https://github.com/vbrandl/hoc/pull/665))
|
||||
- Bump `reqwest` from 0.11.17 to 0.11.18 (#619)
|
||||
- Bump `vergen` from 8.1.3 to 8.2.3 (#621, #622, #635)
|
||||
- Bump `tracing-actix-web` from 0.7.4 to 0.7.5 (#623)
|
||||
- Bump `vergen` from 8.1.3 to 8.2.4 (#621, #622, #635, #638)
|
||||
- Bump `tracing-actix-web` from 0.7.4 to 0.7.6 (#623, [#656](https://github.com/vbrandl/hoc/pull/656))
|
||||
- Bump `git2` from 0.17.1 to 0.17.2 (#624)
|
||||
- Bump `tempfile` from 3.5.0 to 3.6.0 (#626)
|
||||
- Bump `serde_json` from 1.0.96 to 1.0.99 (#630, #632)
|
||||
- Bump `tempfile` from 3.5.0 to 3.8.0 (#626, [#646](https://github.com/vbrandl/hoc/pull/646), [#658](https://github.com/vbrandl/hoc/pull/658), [#667](https://github.com/vbrandl/hoc/pull/667))
|
||||
- Bump `serde_json` from 1.0.96 to 1.0.105 (#630, #632, #637, #641, #644, [#649](https://github.com/vbrandl/hoc/pull/649), [#663](https://github.com/vbrandl/hoc/pull/663))
|
||||
- Bump `openssl` from 0.10.50 to 0.10.55 (#631)
|
||||
- Bump `tracing-bunyan-formatter` from 0.3.7 to 0.3.9 (#642, [#661](https://github.com/vbrandl/hoc/pull/661))
|
||||
- Bump `anyhow` from 1.0.71 to 1.0.75 (#643, [#662](https://github.com/vbrandl/hoc/pull/662), [#664](https://github.com/vbrandl/hoc/pull/664))
|
||||
- Bump `ructe` from 0.16.1 to 0.17.0 ([#647](https://github.com/vbrandl/hoc/pull/647))
|
||||
|
||||
|
||||
## [0.35.0] 2023-05-04
|
||||
|
139
Cargo.lock
generated
139
Cargo.lock
generated
@@ -121,7 +121,7 @@ dependencies = [
|
||||
"futures-util",
|
||||
"mio",
|
||||
"num_cpus",
|
||||
"socket2",
|
||||
"socket2 0.4.9",
|
||||
"tokio",
|
||||
"tracing",
|
||||
]
|
||||
@@ -200,7 +200,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
"smallvec",
|
||||
"socket2",
|
||||
"socket2 0.4.9",
|
||||
"time",
|
||||
"url",
|
||||
]
|
||||
@@ -281,9 +281,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.71"
|
||||
version = "1.0.75"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8"
|
||||
checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
|
||||
|
||||
[[package]]
|
||||
name = "arc-swap"
|
||||
@@ -299,7 +299,7 @@ checksum = "7b2d0f03b3640e3a630367e40c468cb7f309529c708ed1d88597047b0e7c6ef7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.23",
|
||||
"syn 2.0.28",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -648,15 +648,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "1.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
|
||||
dependencies = [
|
||||
"instant",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "2.0.0"
|
||||
@@ -771,7 +762,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.23",
|
||||
"syn 2.0.28",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1282,7 +1273,7 @@ dependencies = [
|
||||
"gix-command",
|
||||
"gix-config-value",
|
||||
"parking_lot",
|
||||
"rustix",
|
||||
"rustix 0.37.22",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
@@ -1431,7 +1422,7 @@ version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7058c94f4164fcf5b8457d35f6d8f6e1007f9f7f938c9c7684a7e01d23c6ddde"
|
||||
dependencies = [
|
||||
"fastrand 2.0.0",
|
||||
"fastrand",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1605,7 +1596,7 @@ dependencies = [
|
||||
"httpdate",
|
||||
"itoa",
|
||||
"pin-project-lite",
|
||||
"socket2",
|
||||
"socket2 0.4.9",
|
||||
"tokio",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
@@ -1655,15 +1646,6 @@ dependencies = [
|
||||
"hashbrown 0.12.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "io-close"
|
||||
version = "0.3.7"
|
||||
@@ -1693,9 +1675,9 @@ checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6"
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.10.5"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
|
||||
checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
|
||||
dependencies = [
|
||||
"either",
|
||||
]
|
||||
@@ -1814,6 +1796,12 @@ version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0"
|
||||
|
||||
[[package]]
|
||||
name = "local-channel"
|
||||
version = "0.1.3"
|
||||
@@ -2021,7 +2009,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.23",
|
||||
"syn 2.0.28",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2138,7 +2126,7 @@ dependencies = [
|
||||
"pest_meta",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.23",
|
||||
"syn 2.0.28",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2169,14 +2157,14 @@ checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.23",
|
||||
"syn 2.0.28",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.2.10"
|
||||
version = "0.2.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57"
|
||||
checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05"
|
||||
|
||||
[[package]]
|
||||
name = "pin-utils"
|
||||
@@ -2350,9 +2338,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ructe"
|
||||
version = "0.16.1"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "79c86c1631418815c5947a34be5872806586c65398754ec91cc2df35a8e26ba8"
|
||||
checksum = "9b0a930679d54e46fa4e66be3d9a333026da04d2b659e42aab4dfd1586452815"
|
||||
dependencies = [
|
||||
"base64 0.21.2",
|
||||
"bytecount",
|
||||
@@ -2397,7 +2385,20 @@ dependencies = [
|
||||
"errno",
|
||||
"io-lifetimes",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"linux-raw-sys 0.3.8",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.38.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5"
|
||||
dependencies = [
|
||||
"bitflags 2.3.3",
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys 0.4.3",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
@@ -2468,29 +2469,29 @@ checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.166"
|
||||
version = "1.0.183"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d01b7404f9d441d3ad40e6a636a7782c377d2abdbe4fa2440e2edcc2f4f10db8"
|
||||
checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.166"
|
||||
version = "1.0.183"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6"
|
||||
checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.23",
|
||||
"syn 2.0.28",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.99"
|
||||
version = "1.0.105"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3"
|
||||
checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"ryu",
|
||||
@@ -2590,6 +2591,16 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "socket2"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
version = "1.1.0"
|
||||
@@ -2609,9 +2620,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.23"
|
||||
version = "2.0.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737"
|
||||
checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -2620,15 +2631,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tempfile"
|
||||
version = "3.6.0"
|
||||
version = "3.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6"
|
||||
checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cfg-if",
|
||||
"fastrand 1.9.0",
|
||||
"fastrand",
|
||||
"redox_syscall 0.3.5",
|
||||
"rustix",
|
||||
"rustix 0.38.4",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
@@ -2649,7 +2659,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.23",
|
||||
"syn 2.0.28",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2708,11 +2718,10 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.29.1"
|
||||
version = "1.32.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da"
|
||||
checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"backtrace",
|
||||
"bytes",
|
||||
"libc",
|
||||
@@ -2720,7 +2729,7 @@ dependencies = [
|
||||
"parking_lot",
|
||||
"pin-project-lite",
|
||||
"signal-hook-registry",
|
||||
"socket2",
|
||||
"socket2 0.5.3",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
@@ -2778,9 +2787,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tracing-actix-web"
|
||||
version = "0.7.5"
|
||||
version = "0.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ce52ffaf2d544e317d3bef63f49a6a22022866505fa4840a4339b1756834a2a9"
|
||||
checksum = "5c0b08ce08cbde6a96fc1e4ebb8132053e53ec7a5cd27eef93ede6b73ebbda06"
|
||||
dependencies = [
|
||||
"actix-web",
|
||||
"pin-project",
|
||||
@@ -2796,14 +2805,14 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.23",
|
||||
"syn 2.0.28",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-bunyan-formatter"
|
||||
version = "0.3.7"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "25a348912d4e90923cb93343691d3be97e3409607363706c400fc935bb032fb0"
|
||||
checksum = "b5c266b9ac83dedf0e0385ad78514949e6d89491269e7065bee51d2bb8ec7373"
|
||||
dependencies = [
|
||||
"ahash 0.8.3",
|
||||
"gethostname",
|
||||
@@ -2951,9 +2960,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
||||
|
||||
[[package]]
|
||||
name = "vergen"
|
||||
version = "8.2.3"
|
||||
version = "8.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ce38fc503fa57441ac2539c3e723b5adf76601eb4f1ad24025c6660d27f355b7"
|
||||
checksum = "bbc5ad0d9d26b2c49a5ab7da76c3e79d3ee37e7821799f8223fcb8f2f391a2e7"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"gix",
|
||||
@@ -3013,7 +3022,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.23",
|
||||
"syn 2.0.28",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
@@ -3047,7 +3056,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.23",
|
||||
"syn 2.0.28",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
20
Cargo.toml
20
Cargo.toml
@@ -26,23 +26,23 @@ mime = "0.3"
|
||||
number_prefix = "0.4.0"
|
||||
openssl-probe = "0.1.5"
|
||||
reqwest = "0.11.18"
|
||||
serde = "1.0.166"
|
||||
serde = "1.0.183"
|
||||
serde_derive = "1.0.166"
|
||||
serde_json = "1.0.99"
|
||||
serde_json = "1.0.105"
|
||||
tracing = "0.1.37"
|
||||
tracing-actix-web = "0.7.5"
|
||||
tracing-bunyan-formatter = "0.3.7"
|
||||
tracing-actix-web = "0.7.6"
|
||||
tracing-bunyan-formatter = "0.3.9"
|
||||
tracing-futures = "0.2.5"
|
||||
tracing-log = "0.1.3"
|
||||
tracing-subscriber = { version = "0.3.17", features = ["registry", "env-filter"] }
|
||||
|
||||
[build-dependencies]
|
||||
anyhow = "1.0.71"
|
||||
ructe = { version = "0.16.1", features = ["mime03"] }
|
||||
vergen = { version = "8.2.3", default-features = false, features = ["git", "gitoxide"] }
|
||||
anyhow = "1.0.75"
|
||||
ructe = { version = "0.17.0", features = ["mime03"] }
|
||||
vergen = { version = "8.2.4", default-features = false, features = ["git", "gitoxide"] }
|
||||
|
||||
[dev-dependencies]
|
||||
awc = "3.1.1"
|
||||
ructe = "0.16.1"
|
||||
tempfile = "3.6.0"
|
||||
tokio = "1.29.1"
|
||||
ructe = "0.17.0"
|
||||
tempfile = "3.8.0"
|
||||
tokio = "1.32.0"
|
||||
|
@@ -74,7 +74,7 @@ impl<'a> CacheState<'a> {
|
||||
trace!("Calculating new cache");
|
||||
match self {
|
||||
CacheState::Old { mut cache, .. } => {
|
||||
if let Some(mut cache) = cache.entries.get_mut(branch) {
|
||||
if let Some(cache) = cache.entries.get_mut(branch) {
|
||||
cache.head = head;
|
||||
cache.count += count;
|
||||
cache.commits += commits;
|
||||
|
19
src/error.rs
19
src/error.rs
@@ -41,17 +41,14 @@ impl ResponseError for Error {
|
||||
|
||||
fn error_response(&self) -> HttpResponse {
|
||||
let mut buf = Vec::new();
|
||||
match self {
|
||||
Error::BranchNotFound => {
|
||||
templates::p404_no_master_html(&mut buf, VERSION_INFO, 0).unwrap();
|
||||
HttpResponse::NotFound().content_type("text/html").body(buf)
|
||||
}
|
||||
_ => {
|
||||
templates::p500_html(&mut buf, VERSION_INFO, 0).unwrap();
|
||||
HttpResponse::InternalServerError()
|
||||
.content_type("text/html")
|
||||
.body(buf)
|
||||
}
|
||||
if let Error::BranchNotFound = self {
|
||||
templates::p404_no_master_html(&mut buf, VERSION_INFO, 0).unwrap();
|
||||
HttpResponse::NotFound().content_type("text/html").body(buf)
|
||||
} else {
|
||||
templates::p500_html(&mut buf, VERSION_INFO, 0).unwrap();
|
||||
HttpResponse::InternalServerError()
|
||||
.content_type("text/html")
|
||||
.body(buf)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -282,6 +282,7 @@ where
|
||||
}
|
||||
pull(&path)?;
|
||||
let (hoc, head, commits) = hoc(&service_url, &state.repos(), &state.cache(), branch)?;
|
||||
#[allow(clippy::cast_precision_loss)]
|
||||
let hoc_pretty = match NumberPrefix::decimal(hoc as f64) {
|
||||
NumberPrefix::Standalone(hoc) => hoc.to_string(),
|
||||
NumberPrefix::Prefixed(prefix, hoc) => format!("{hoc:.1}{prefix}"),
|
||||
|
@@ -6,7 +6,7 @@ fn init() {
|
||||
dotenvy::dotenv().ok();
|
||||
openssl_probe::init_ssl_cert_env_vars();
|
||||
|
||||
telemetry::init_subscriber(telemetry::get_subscriber("hoc", "info"))
|
||||
telemetry::init_subscriber(telemetry::get_subscriber("hoc", "info"));
|
||||
}
|
||||
|
||||
#[actix_rt::main]
|
||||
|
@@ -15,6 +15,10 @@ pub fn get_subscriber(name: &str, env_filter: &str) -> impl Subscriber + Send +
|
||||
.with(formatting_layer)
|
||||
}
|
||||
|
||||
/// # Panics
|
||||
///
|
||||
/// This panics if the `LogTracer` cannot be initialized or `subscriber` cannot be set as global
|
||||
/// default.
|
||||
pub fn init_subscriber(subscriber: impl Subscriber + Send + Sync) {
|
||||
LogTracer::init().expect("Failed to set logger");
|
||||
set_global_default(subscriber).expect("Failed to set tracing subscriber");
|
||||
|
@@ -5,14 +5,14 @@ use tempfile::TempDir;
|
||||
#[test]
|
||||
fn no_repos() {
|
||||
let repos = TempDir::new().unwrap();
|
||||
assert_eq!(0, count_repositories(&repos).unwrap())
|
||||
assert_eq!(0, count_repositories(&repos).unwrap());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_repos_for_provider() {
|
||||
let repos = TempDir::new().unwrap();
|
||||
let _provider = TempDir::new_in(&repos).unwrap();
|
||||
assert_eq!(0, count_repositories(&repos).unwrap())
|
||||
assert_eq!(0, count_repositories(&repos).unwrap());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -20,7 +20,7 @@ fn no_repos_for_owner() {
|
||||
let repos = TempDir::new().unwrap();
|
||||
let provider = TempDir::new_in(&repos).unwrap();
|
||||
let _owner = TempDir::new_in(&provider).unwrap();
|
||||
assert_eq!(0, count_repositories(&repos).unwrap())
|
||||
assert_eq!(0, count_repositories(&repos).unwrap());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -29,7 +29,7 @@ fn one_repo_for_owner() {
|
||||
let provider = TempDir::new_in(&repos).unwrap();
|
||||
let owner = TempDir::new_in(&provider).unwrap();
|
||||
let _repo = TempDir::new_in(&owner).unwrap();
|
||||
assert_eq!(1, count_repositories(&repos).unwrap())
|
||||
assert_eq!(1, count_repositories(&repos).unwrap());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -39,7 +39,7 @@ fn two_repos_for_owner() {
|
||||
let owner = TempDir::new_in(&provider).unwrap();
|
||||
let _repo1 = TempDir::new_in(&owner).unwrap();
|
||||
let _repo2 = TempDir::new_in(&owner).unwrap();
|
||||
assert_eq!(2, count_repositories(&repos).unwrap())
|
||||
assert_eq!(2, count_repositories(&repos).unwrap());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -51,7 +51,7 @@ fn two_repos_for_two_providers() {
|
||||
let provider2 = TempDir::new_in(&repos).unwrap();
|
||||
let owner2 = TempDir::new_in(&provider2).unwrap();
|
||||
let _repo2 = TempDir::new_in(&owner2).unwrap();
|
||||
assert_eq!(2, count_repositories(&repos).unwrap())
|
||||
assert_eq!(2, count_repositories(&repos).unwrap());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -62,5 +62,5 @@ fn two_subdirs_in_one_repo() {
|
||||
let repo = TempDir::new_in(&owner).unwrap();
|
||||
let _subdir1 = TempDir::new_in(&repo).unwrap();
|
||||
let _subdir2 = TempDir::new_in(&repo).unwrap();
|
||||
assert_eq!(1, count_repositories(&repos).unwrap())
|
||||
assert_eq!(1, count_repositories(&repos).unwrap());
|
||||
}
|
||||
|
@@ -25,14 +25,14 @@ pub async fn spawn_app() -> TestApp {
|
||||
let listener = TcpListener::bind("127.0.0.1:0").expect("Failed to bind random port");
|
||||
|
||||
let port = listener.local_addr().unwrap().port();
|
||||
let address = format!("http://127.0.0.1:{}", port);
|
||||
let address = format!("http://127.0.0.1:{port}");
|
||||
|
||||
let _repo_dir = tempdir().expect("Cannot create repo_dir");
|
||||
let _cache_dir = tempdir().expect("Cannot create cache_dir");
|
||||
let repo_dir = tempdir().expect("Cannot create repo_dir");
|
||||
let cache_dir = tempdir().expect("Cannot create cache_dir");
|
||||
|
||||
let mut settings = Settings::load().expect("Failed to read configuration.");
|
||||
settings.repodir = _repo_dir.path().to_path_buf();
|
||||
settings.cachedir = _cache_dir.path().to_path_buf();
|
||||
settings.repodir = repo_dir.path().to_path_buf();
|
||||
settings.cachedir = cache_dir.path().to_path_buf();
|
||||
|
||||
let server = hoc::run(listener, settings)
|
||||
.await
|
||||
@@ -44,7 +44,7 @@ pub async fn spawn_app() -> TestApp {
|
||||
|
||||
TestApp {
|
||||
address,
|
||||
_repo_dir,
|
||||
_cache_dir,
|
||||
_repo_dir: repo_dir,
|
||||
_cache_dir: cache_dir,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user