Compare commits
78 Commits
v0.30.0
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
e67696406b
|
|||
ad9579418e | |||
540f30d472 | |||
4f9cd72115
|
|||
3612684709 | |||
0cb9deca71 | |||
52f3895af8
|
|||
d8e51e8c74
|
|||
35d2315812 | |||
7caf69b5f0
|
|||
e3f1d3ef10 | |||
a0d8618722 | |||
35232d226d
|
|||
48318ee1bc | |||
b7690c062f | |||
239f94f830
|
|||
7b772d2efd | |||
54ea0dc7c4 | |||
4bb1925fa0
|
|||
15f77906e1 | |||
b5207b0c67 | |||
583a746714
|
|||
9e9220afbb | |||
2e12c9367e | |||
d27fc2352d
|
|||
5d7e5d219a
|
|||
3ca483e2ee | |||
f670505a1b | |||
ba4574a66d | |||
06dc3a73d3 | |||
36711cbf8f | |||
6c3d6c0bfa | |||
a23d4e5192 | |||
f40d35270f | |||
8d6e60fb40 | |||
144c980e89 | |||
7e30e49240
|
|||
06ce86b4ec | |||
05b9804c86 | |||
881e09194c | |||
52764a906a | |||
f66920bda5 | |||
6186f27ea2 | |||
8250c3de35 | |||
98e9c19ace | |||
7451a2e571 | |||
51cb97c103 | |||
63967c79b9 | |||
a555e8ed48 | |||
ab32765efa | |||
938aa648e8 | |||
0b37d01594 | |||
aa8d3a0f26 | |||
aea1768f52 | |||
f5f328acf1 | |||
689ec4fe95 | |||
73db3915b3 | |||
0e4ee009c9 | |||
35d5c8531e | |||
e3bcf4f4ca | |||
a6f33097d3 | |||
4b9a0f95e3 | |||
1f340728a1 | |||
16079253b8 | |||
cb97f0feee | |||
366b3496f2 | |||
a73f07e491 | |||
4ddaa84e5f | |||
74a9f74455 | |||
fca16947f6 | |||
83a4cb57d8
|
|||
9aa9b5359a | |||
00ee175e8b
|
|||
c0bafa6079 | |||
18fb75e13e | |||
9a578565bd | |||
ffb7acc738 | |||
8b058d9c53 |
60
CHANGELOG.md
60
CHANGELOG.md
@ -5,6 +5,66 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
* Updated [`futures`](https://github.com/rust-lang/futures-rs) from 0.3.26 to 0.3.27 ([#575])
|
||||
* Updated [`serde`](https://github.com/serde-rs/serde) from 1.0.152 to 1.0.156 ([#576])
|
||||
|
||||
|
||||
[#575]: https://github.com/vbrandl/hoc/pull/575
|
||||
[#576]: https://github.com/vbrandl/hoc/pull/576
|
||||
|
||||
|
||||
## [0.32.0] 2023-03-06
|
||||
|
||||
* Updated [`actix-web`](https://github.com/actix/actix-web) from 4.3.0 to 4.3.1 ([#566])
|
||||
* Updated [`tempfile`](https://github.com/Stebalien/tempfile) from 3.3.0 to 3.4.0 ([#567])
|
||||
* Updated [`awc`](https://github.com/actix/actix-web) from 3.1.0 to 3.1.1 ([#568])
|
||||
* Updated [`tokio`](https://github.com/tokio-rs/tokio) from 1.25.0 to 1.26.0 ([#569])
|
||||
* Updated [`serde_json`](https://github.com/serde-rs/json) from 1.0.93 to 1.0.94 ([#570])
|
||||
|
||||
[#566]: https://github.com/vbrandl/hoc/pull/566
|
||||
[#567]: https://github.com/vbrandl/hoc/pull/567
|
||||
[#568]: https://github.com/vbrandl/hoc/pull/568
|
||||
[#569]: https://github.com/vbrandl/hoc/pull/569
|
||||
[#570]: https://github.com/vbrandl/hoc/pull/570
|
||||
|
||||
|
||||
## [0.31.0] 2023-02-13
|
||||
|
||||
### Dependency Updates
|
||||
|
||||
* Updated [`tokio`](https://github.com/tokio-rs/tokio) from 1.24.1 to 1.24.2 ([#547])
|
||||
* Updated [`badgers`](https://github.com/vbrandl/badgers) from 1.1.0 to 1.2.0 ([#548])
|
||||
* Updated [`reqwest`](https://github.com/seanmonstar/reqwest) from 0.11.13 to 0.11.14 ([#549])
|
||||
* Updated [`bumpalo`](https://github.com/fitzgen/bumpalo) from 3.10.0 to 3.12.0 ([#550])
|
||||
* Updated [`libgit2-sys`](https://github.com/rust-lang/git2-rs) from 0.14.1+1.5.0 to 0.14.2+1.5.1 ([#551])
|
||||
* Updated [`git2`](https://github.com/rust-lang/git2-rs) from 0.16.0 to 0.16.1 ([#552])
|
||||
* Updated [`actix-rt`](https://github.com/actix/actix-net) from 2.7.0 to 2.8.0 ([#553])
|
||||
* Updated [`actix-web`](https://github.com/actix/actix-web) from 4.2.1 to 4.3.0 ([#554])
|
||||
* Updated [`awc`](https://github.com/actix/actix-web) from 3.0.1 to 3.1.0 ([#555])
|
||||
* Updated [`tokio`](https://github.com/tokio-rs/tokio) from 1.24.2 to 1.25.0 ([#558])
|
||||
* Updated [`ructe`](https://github.com/kaj/ructe) from 0.15.0 to 0.16.1 ([#559])
|
||||
* Updated [`futures`](https://github.com/rust-lang/futures-rs) from 0.3.25 to 0.3.26 ([#560])
|
||||
* Updated [`bytes`](https://github.com/tokio-rs/bytes) from 1.3.0 to 1.4.0 ([#561])
|
||||
* Updated [`serde_json`](https://github.com/serde-rs/json) from 1.0.91 to 1.0.92 ([#562])
|
||||
* Updated [`vergen`](https://github.com/rustyhorde/vergen) from 7.5.0 to 7.5.1 ([#563])
|
||||
* Updated [`serde_json`](https://github.com/serde-rs/json) from 1.0.92 to 1.0.93 ([#564])
|
||||
|
||||
[#547]: https://github.com/vbrandl/hoc/pull/547
|
||||
[#548]: https://github.com/vbrandl/hoc/pull/548
|
||||
[#550]: https://github.com/vbrandl/hoc/pull/550
|
||||
[#551]: https://github.com/vbrandl/hoc/pull/551
|
||||
[#552]: https://github.com/vbrandl/hoc/pull/552
|
||||
[#553]: https://github.com/vbrandl/hoc/pull/553
|
||||
[#554]: https://github.com/vbrandl/hoc/pull/554
|
||||
[#555]: https://github.com/vbrandl/hoc/pull/555
|
||||
[#558]: https://github.com/vbrandl/hoc/pull/558
|
||||
[#559]: https://github.com/vbrandl/hoc/pull/559
|
||||
[#560]: https://github.com/vbrandl/hoc/pull/560
|
||||
[#561]: https://github.com/vbrandl/hoc/pull/561
|
||||
[#562]: https://github.com/vbrandl/hoc/pull/562
|
||||
[#563]: https://github.com/vbrandl/hoc/pull/563
|
||||
[#564]: https://github.com/vbrandl/hoc/pull/564
|
||||
|
||||
|
||||
## [0.30.0] 2023-01-16
|
||||
|
||||
|
288
Cargo.lock
generated
288
Cargo.lock
generated
@ -37,16 +37,16 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "actix-http"
|
||||
version = "3.2.2"
|
||||
version = "3.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c83abf9903e1f0ad9973cc4f7b9767fd5a03a583f51a5b7a339e07987cd2724"
|
||||
checksum = "0070905b2c4a98d184c4e81025253cb192aa8a73827553f38e9410801ceb35bb"
|
||||
dependencies = [
|
||||
"actix-codec",
|
||||
"actix-rt",
|
||||
"actix-service",
|
||||
"actix-utils",
|
||||
"ahash 0.7.6",
|
||||
"base64 0.13.0",
|
||||
"base64 0.21.0",
|
||||
"bitflags",
|
||||
"brotli",
|
||||
"bytes",
|
||||
@ -68,6 +68,8 @@ dependencies = [
|
||||
"rand",
|
||||
"sha1",
|
||||
"smallvec",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
"zstd",
|
||||
]
|
||||
@ -98,9 +100,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "actix-rt"
|
||||
version = "2.7.0"
|
||||
version = "2.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ea16c295198e958ef31930a6ef37d0fb64e9ca3b6116e6b93a8bdae96ee1000"
|
||||
checksum = "15265b6b8e2347670eb363c47fc8c75208b4a4994b27192f345fcbe707804f3e"
|
||||
dependencies = [
|
||||
"actix-macros",
|
||||
"futures-core",
|
||||
@ -165,9 +167,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "actix-web"
|
||||
version = "4.2.1"
|
||||
version = "4.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d48f7b6534e06c7bfc72ee91db7917d4af6afe23e7d223b51e68fffbb21e96b9"
|
||||
checksum = "cd3cb42f9566ab176e1ef0b8b3a896529062b4efc6be0123046095914c4c1c96"
|
||||
dependencies = [
|
||||
"actix-codec",
|
||||
"actix-http",
|
||||
@ -206,9 +208,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "actix-web-codegen"
|
||||
version = "4.1.0"
|
||||
version = "4.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fa9362663c8643d67b2d5eafba49e4cb2c8a053a29ed00a0bea121f17c76b13"
|
||||
checksum = "2262160a7ae29e3415554a3f1fc04c764b1540c116aa524683208078b7a75bc9"
|
||||
dependencies = [
|
||||
"actix-router",
|
||||
"proc-macro2",
|
||||
@ -271,9 +273,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.68"
|
||||
version = "1.0.69"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61"
|
||||
checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800"
|
||||
|
||||
[[package]]
|
||||
name = "async-trait"
|
||||
@ -294,9 +296,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "awc"
|
||||
version = "3.0.1"
|
||||
version = "3.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80ca7ff88063086d2e2c70b9f3b29b2fcd999bac68ac21731e66781970d68519"
|
||||
checksum = "87ef547a81796eb2dfe9b345aba34c2e08391a0502493711395b36dd64052b69"
|
||||
dependencies = [
|
||||
"actix-codec",
|
||||
"actix-http",
|
||||
@ -305,7 +307,7 @@ dependencies = [
|
||||
"actix-tls",
|
||||
"actix-utils",
|
||||
"ahash 0.7.6",
|
||||
"base64 0.13.0",
|
||||
"base64 0.21.0",
|
||||
"bytes",
|
||||
"cfg-if",
|
||||
"cookie",
|
||||
@ -328,12 +330,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "badgers"
|
||||
version = "1.1.0"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d7e5709e2ae2f0d8aa0db9aa872594c1e094cf346442227d09d723b635850f6"
|
||||
checksum = "7954c1a712ad1b82f0f719bbeee7dc5ffd3d13a66c7dfb1e1df02f79e2729441"
|
||||
dependencies = [
|
||||
"ab_glyph",
|
||||
"base64 0.20.0",
|
||||
"base64 0.21.0",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
@ -345,9 +347,9 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.20.0"
|
||||
version = "0.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5"
|
||||
checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
@ -408,9 +410,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.10.0"
|
||||
version = "3.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3"
|
||||
checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535"
|
||||
|
||||
[[package]]
|
||||
name = "byte-tools"
|
||||
@ -432,9 +434,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
|
||||
|
||||
[[package]]
|
||||
name = "bytes"
|
||||
version = "1.3.0"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c"
|
||||
checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
|
||||
|
||||
[[package]]
|
||||
name = "bytestring"
|
||||
@ -619,6 +621,27 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "errno"
|
||||
version = "0.2.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
|
||||
dependencies = [
|
||||
"errno-dragonfly",
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "errno-dragonfly"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fake-simd"
|
||||
version = "0.1.2"
|
||||
@ -683,9 +706,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures"
|
||||
version = "0.3.25"
|
||||
version = "0.3.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0"
|
||||
checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
@ -698,9 +721,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-channel"
|
||||
version = "0.3.25"
|
||||
version = "0.3.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed"
|
||||
checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
@ -708,15 +731,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-core"
|
||||
version = "0.3.25"
|
||||
version = "0.3.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac"
|
||||
checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd"
|
||||
|
||||
[[package]]
|
||||
name = "futures-executor"
|
||||
version = "0.3.25"
|
||||
version = "0.3.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2"
|
||||
checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-task",
|
||||
@ -725,15 +748,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-io"
|
||||
version = "0.3.25"
|
||||
version = "0.3.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb"
|
||||
checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91"
|
||||
|
||||
[[package]]
|
||||
name = "futures-macro"
|
||||
version = "0.3.25"
|
||||
version = "0.3.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d"
|
||||
checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -742,21 +765,21 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-sink"
|
||||
version = "0.3.25"
|
||||
version = "0.3.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9"
|
||||
checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2"
|
||||
|
||||
[[package]]
|
||||
name = "futures-task"
|
||||
version = "0.3.25"
|
||||
version = "0.3.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea"
|
||||
checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879"
|
||||
|
||||
[[package]]
|
||||
name = "futures-util"
|
||||
version = "0.3.25"
|
||||
version = "0.3.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6"
|
||||
checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
@ -824,22 +847,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "git2"
|
||||
version = "0.15.0"
|
||||
version = "0.16.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2994bee4a3a6a51eb90c218523be382fd7ea09b16380b9312e9dbe955ff7c7d1"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"libc",
|
||||
"libgit2-sys",
|
||||
"log",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "git2"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be36bc9e0546df253c0cc41fd0af34f5e92845ad8509462ec76672fac6997f5b"
|
||||
checksum = "ccf7f68c2995f392c49fffb4f95ae2c873297830eb25c6bc4c114ce8f4562acc"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"libc",
|
||||
@ -895,7 +905,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "hoc"
|
||||
version = "0.30.0"
|
||||
version = "0.32.0"
|
||||
dependencies = [
|
||||
"actix-rt",
|
||||
"actix-web",
|
||||
@ -905,7 +915,7 @@ dependencies = [
|
||||
"config",
|
||||
"dotenvy",
|
||||
"futures",
|
||||
"git2 0.16.0",
|
||||
"git2",
|
||||
"lazy_static",
|
||||
"mime",
|
||||
"number_prefix",
|
||||
@ -1027,6 +1037,16 @@ dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "io-lifetimes"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.42.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ipnet"
|
||||
version = "2.5.0"
|
||||
@ -1091,15 +1111,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.126"
|
||||
version = "0.2.139"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
|
||||
checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
|
||||
|
||||
[[package]]
|
||||
name = "libgit2-sys"
|
||||
version = "0.14.1+1.5.0"
|
||||
version = "0.14.2+1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4a07fb2692bc3593bda59de45a502bb3071659f2c515e28c71e728306b038e17"
|
||||
checksum = "7f3d95f6b51075fe9810a7ae22c7095f12b98005ab364d8544797a825ce946a4"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
@ -1141,6 +1161,12 @@ version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
|
||||
|
||||
[[package]]
|
||||
name = "local-channel"
|
||||
version = "0.1.3"
|
||||
@ -1615,22 +1641,13 @@ version = "0.6.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64"
|
||||
|
||||
[[package]]
|
||||
name = "remove_dir_all"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "reqwest"
|
||||
version = "0.11.13"
|
||||
version = "0.11.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c"
|
||||
checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9"
|
||||
dependencies = [
|
||||
"base64 0.13.0",
|
||||
"base64 0.21.0",
|
||||
"bytes",
|
||||
"encoding_rs",
|
||||
"futures-core",
|
||||
@ -1674,11 +1691,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ructe"
|
||||
version = "0.15.0"
|
||||
version = "0.16.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "85517cd381cf0c34694881d8aaf173107c6af7670e66cec18d7a1a8bfce3b758"
|
||||
checksum = "79c86c1631418815c5947a34be5872806586c65398754ec91cc2df35a8e26ba8"
|
||||
dependencies = [
|
||||
"base64 0.13.0",
|
||||
"base64 0.21.0",
|
||||
"bytecount",
|
||||
"itertools",
|
||||
"md5",
|
||||
@ -1705,6 +1722,20 @@ dependencies = [
|
||||
"semver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.36.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"errno",
|
||||
"io-lifetimes",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"windows-sys 0.42.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.11"
|
||||
@ -1764,18 +1795,18 @@ checksum = "a41d061efea015927ac527063765e73601444cdc344ba855bc7bd44578b25e1c"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.152"
|
||||
version = "1.0.156"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb"
|
||||
checksum = "314b5b092c0ade17c00142951e50ced110ec27cea304b1037c6969246c2469a4"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.152"
|
||||
version = "1.0.156"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e"
|
||||
checksum = "d7e29c4601e36bcec74a223228dce795f4cd3616341a4af93520ca1a837c087d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -1784,9 +1815,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.91"
|
||||
version = "1.0.94"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883"
|
||||
checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"ryu",
|
||||
@ -1881,16 +1912,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tempfile"
|
||||
version = "3.3.0"
|
||||
version = "3.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
|
||||
checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"fastrand",
|
||||
"libc",
|
||||
"redox_syscall",
|
||||
"remove_dir_all",
|
||||
"winapi",
|
||||
"rustix",
|
||||
"windows-sys 0.42.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1966,9 +1996,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.24.1"
|
||||
version = "1.26.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d9f76183f91ecfb55e1d7d5602bd1d979e38a3a522fe900241cf195624d67ae"
|
||||
checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"bytes",
|
||||
@ -1979,7 +2009,7 @@ dependencies = [
|
||||
"pin-project-lite",
|
||||
"signal-hook-registry",
|
||||
"socket2",
|
||||
"windows-sys 0.42.0",
|
||||
"windows-sys 0.45.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2204,15 +2234,15 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
||||
|
||||
[[package]]
|
||||
name = "vergen"
|
||||
version = "7.5.0"
|
||||
version = "7.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "571b69f690c855821462709b6f41d42ceccc316fbd17b60bd06d06928cfe6a99"
|
||||
checksum = "f21b881cd6636ece9735721cf03c1fe1e774fe258683d084bb2812ab67435749"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cfg-if",
|
||||
"enum-iterator",
|
||||
"getset",
|
||||
"git2 0.15.0",
|
||||
"git2",
|
||||
"rustversion",
|
||||
"thiserror",
|
||||
"time",
|
||||
@ -2358,19 +2388,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm",
|
||||
"windows_aarch64_msvc 0.42.0",
|
||||
"windows_i686_gnu 0.42.0",
|
||||
"windows_i686_msvc 0.42.0",
|
||||
"windows_x86_64_gnu 0.42.0",
|
||||
"windows_aarch64_msvc 0.42.1",
|
||||
"windows_i686_gnu 0.42.1",
|
||||
"windows_i686_msvc 0.42.1",
|
||||
"windows_x86_64_gnu 0.42.1",
|
||||
"windows_x86_64_gnullvm",
|
||||
"windows_x86_64_msvc 0.42.0",
|
||||
"windows_x86_64_msvc 0.42.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.45.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm",
|
||||
"windows_aarch64_msvc 0.42.1",
|
||||
"windows_i686_gnu 0.42.1",
|
||||
"windows_i686_msvc 0.42.1",
|
||||
"windows_x86_64_gnu 0.42.1",
|
||||
"windows_x86_64_gnullvm",
|
||||
"windows_x86_64_msvc 0.42.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e"
|
||||
checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
@ -2380,9 +2434,9 @@ checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4"
|
||||
checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
@ -2392,9 +2446,9 @@ checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7"
|
||||
checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
@ -2404,9 +2458,9 @@ checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246"
|
||||
checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
@ -2416,15 +2470,15 @@ checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed"
|
||||
checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028"
|
||||
checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
@ -2434,9 +2488,9 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5"
|
||||
checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
|
||||
|
||||
[[package]]
|
||||
name = "winreg"
|
||||
@ -2458,18 +2512,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zstd"
|
||||
version = "0.11.2+zstd.1.5.2"
|
||||
version = "0.12.2+zstd.1.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4"
|
||||
checksum = "e9262a83dc741c0b0ffec209881b45dbc232c21b02a2b9cb1adb93266e41303d"
|
||||
dependencies = [
|
||||
"zstd-safe",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zstd-safe"
|
||||
version = "5.0.2+zstd.1.5.2"
|
||||
version = "6.0.2+zstd.1.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db"
|
||||
checksum = "a6cf39f730b440bab43da8fb5faf5f254574462f73f260f85f7987f32154ff17"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"zstd-sys",
|
||||
|
32
Cargo.toml
32
Cargo.toml
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "hoc"
|
||||
version = "0.30.0"
|
||||
version = "0.32.0"
|
||||
authors = ["Valentin Brandl <vbrandl@riseup.net>"]
|
||||
edition = "2018"
|
||||
build = "build.rs"
|
||||
@ -13,22 +13,22 @@ path = "src/main.rs"
|
||||
name = "hoc"
|
||||
|
||||
[dependencies]
|
||||
actix-rt = "2.7.0"
|
||||
actix-web = "4.2.1"
|
||||
badgers = "1.1.0"
|
||||
bytes = "1.3.0"
|
||||
actix-rt = "2.8.0"
|
||||
actix-web = "4.3.1"
|
||||
badgers = "1.2.0"
|
||||
bytes = "1.4.0"
|
||||
config = { version = "0.13.3", features = ["toml"] }
|
||||
dotenvy = "0.15.6"
|
||||
futures = "0.3.25"
|
||||
git2 = "0.16.0"
|
||||
futures = "0.3.27"
|
||||
git2 = "0.16.1"
|
||||
lazy_static = "1.4.0"
|
||||
mime = "0.3"
|
||||
number_prefix = "0.4.0"
|
||||
openssl-probe = "0.1.5"
|
||||
reqwest = "0.11.13"
|
||||
serde = "1.0.152"
|
||||
reqwest = "0.11.14"
|
||||
serde = "1.0.156"
|
||||
serde_derive = "1.0.137"
|
||||
serde_json = "1.0.91"
|
||||
serde_json = "1.0.94"
|
||||
tracing = "0.1.37"
|
||||
tracing-actix-web = "0.7.2"
|
||||
tracing-bunyan-formatter = "0.3.6"
|
||||
@ -37,11 +37,11 @@ tracing-log = "0.1.3"
|
||||
tracing-subscriber = { version = "0.3.16", features = ["registry", "env-filter"] }
|
||||
|
||||
[build-dependencies]
|
||||
ructe = { version = "0.15.0", features = ["mime03"] }
|
||||
vergen = { version = "7.5.0", default-features = false, features = ["git"] }
|
||||
ructe = { version = "0.16.1", features = ["mime03"] }
|
||||
vergen = { version = "7.5.1", default-features = false, features = ["git"] }
|
||||
|
||||
[dev-dependencies]
|
||||
awc = "3.0.1"
|
||||
ructe = "0.15.0"
|
||||
tempfile = "3.3.0"
|
||||
tokio = "1.24.1"
|
||||
awc = "3.1.1"
|
||||
ructe = "0.16.1"
|
||||
tempfile = "3.4.0"
|
||||
tokio = "1.26.0"
|
||||
|
16
src/error.rs
16
src/error.rs
@ -19,13 +19,13 @@ pub enum Error {
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
Error::Badge(s) => write!(fmt, "Badge({})", s),
|
||||
Error::Client(e) => write!(fmt, "Client({})", e),
|
||||
Error::Git(e) => write!(fmt, "Git({})", e),
|
||||
Error::Badge(s) => write!(fmt, "Badge({s})"),
|
||||
Error::Client(e) => write!(fmt, "Client({e})"),
|
||||
Error::Git(e) => write!(fmt, "Git({e})"),
|
||||
Error::Internal => write!(fmt, "Internal Error"),
|
||||
Error::Io(e) => write!(fmt, "Io({})", e),
|
||||
Error::Parse(e) => write!(fmt, "Parse({})", e),
|
||||
Error::Serial(e) => write!(fmt, "Serial({})", e),
|
||||
Error::Io(e) => write!(fmt, "Io({e})"),
|
||||
Error::Parse(e) => write!(fmt, "Parse({e})"),
|
||||
Error::Serial(e) => write!(fmt, "Serial({e})"),
|
||||
Error::BranchNotFound => write!(fmt, "Repo doesn't have master branch"),
|
||||
}
|
||||
}
|
||||
@ -43,11 +43,11 @@ impl ResponseError for Error {
|
||||
let mut buf = Vec::new();
|
||||
match self {
|
||||
Error::BranchNotFound => {
|
||||
templates::p404_no_master(&mut buf, VERSION_INFO, 0).unwrap();
|
||||
templates::p404_no_master_html(&mut buf, VERSION_INFO, 0).unwrap();
|
||||
HttpResponse::NotFound().content_type("text/html").body(buf)
|
||||
}
|
||||
_ => {
|
||||
templates::p500(&mut buf, VERSION_INFO, 0).unwrap();
|
||||
templates::p500_html(&mut buf, VERSION_INFO, 0).unwrap();
|
||||
HttpResponse::InternalServerError()
|
||||
.content_type("text/html")
|
||||
.body(buf)
|
||||
|
30
src/lib.rs
30
src/lib.rs
@ -101,8 +101,8 @@ fn pull(path: impl AsRef<Path>) -> Result<()> {
|
||||
}
|
||||
|
||||
fn hoc(repo: &str, repo_dir: &str, cache_dir: &str, branch: &str) -> Result<(u64, String, u64)> {
|
||||
let repo_dir = format!("{}/{}", repo_dir, repo);
|
||||
let cache_dir = format!("{}/{}.json", cache_dir, repo);
|
||||
let repo_dir = format!("{repo_dir}/{repo}");
|
||||
let cache_dir = format!("{cache_dir}/{repo}.json");
|
||||
let cache_dir = Path::new(&cache_dir);
|
||||
let repo = Repository::open_bare(&repo_dir)?;
|
||||
// TODO: do better...
|
||||
@ -132,8 +132,8 @@ fn hoc(repo: &str, repo_dir: &str, cache_dir: &str, branch: &str) -> Result<(u64
|
||||
}
|
||||
CacheState::Old { head, .. } => {
|
||||
info!("Updating cache");
|
||||
arg.push(format!("{}..{}", head, branch));
|
||||
arg_commit_count.push(format!("{}..{}", head, branch));
|
||||
arg.push(format!("{head}..{branch}"));
|
||||
arg_commit_count.push(format!("{head}..{branch}"));
|
||||
}
|
||||
CacheState::No | CacheState::NoneForBranch(..) => {
|
||||
info!("Creating cache");
|
||||
@ -214,8 +214,8 @@ where
|
||||
data.1.to_lowercase()
|
||||
);
|
||||
info!("Deleting cache and repository");
|
||||
let cache_dir = format!("{}/{}.json", &state.cache(), repo);
|
||||
let repo_dir = format!("{}/{}", &state.repos(), repo);
|
||||
let cache_dir = format!("{}/{repo}.json", &state.cache());
|
||||
let repo_dir = format!("{}/{repo}", &state.repos());
|
||||
std::fs::remove_file(cache_dir).or_else(|e| {
|
||||
if e.kind() == io::ErrorKind::NotFound {
|
||||
Ok(())
|
||||
@ -262,10 +262,10 @@ where
|
||||
);
|
||||
let future = async {
|
||||
let repo = format!("{}/{}", data.0.to_lowercase(), data.1.to_lowercase());
|
||||
let service_path = format!("{}/{}", T::url_path(), repo);
|
||||
let service_url = format!("{}/{}", T::domain(), repo);
|
||||
let path = format!("{}/{}", state.repos(), service_url);
|
||||
let url = format!("https://{}", service_url);
|
||||
let service_path = format!("{}/{repo}", T::url_path());
|
||||
let service_url = format!("{}/{repo}", T::domain());
|
||||
let path = format!("{}/{service_url}", state.repos());
|
||||
let url = format!("https://{service_url}");
|
||||
let remote_exists = remote_exists(&url).await?;
|
||||
let file = Path::new(&path);
|
||||
if !file.exists() {
|
||||
@ -284,7 +284,7 @@ where
|
||||
let (hoc, head, commits) = hoc(&service_url, &state.repos(), &state.cache(), branch)?;
|
||||
let hoc_pretty = match NumberPrefix::decimal(hoc as f64) {
|
||||
NumberPrefix::Standalone(hoc) => hoc.to_string(),
|
||||
NumberPrefix::Prefixed(prefix, hoc) => format!("{:.1}{}", hoc, prefix),
|
||||
NumberPrefix::Prefixed(prefix, hoc) => format!("{hoc:.1}{prefix}"),
|
||||
};
|
||||
let res = HocResult::Hoc {
|
||||
hoc,
|
||||
@ -408,7 +408,7 @@ async fn overview<T: Service>(
|
||||
url: &url,
|
||||
branch,
|
||||
};
|
||||
templates::overview(
|
||||
templates::overview_html(
|
||||
&mut buf,
|
||||
VERSION_INFO,
|
||||
rc_clone.load(Ordering::Relaxed),
|
||||
@ -433,7 +433,7 @@ async fn index(
|
||||
repo_count: web::Data<AtomicUsize>,
|
||||
) -> Result<HttpResponse> {
|
||||
let mut buf = Vec::new();
|
||||
templates::index(
|
||||
templates::index_html(
|
||||
&mut buf,
|
||||
VERSION_INFO,
|
||||
repo_count.load(Ordering::Relaxed),
|
||||
@ -459,7 +459,7 @@ async fn generate(
|
||||
.filter(|s| !s.is_empty())
|
||||
.unwrap_or("master"),
|
||||
};
|
||||
templates::generate(
|
||||
templates::generate_html(
|
||||
&mut buf,
|
||||
VERSION_INFO,
|
||||
repo_count.load(Ordering::Relaxed),
|
||||
@ -472,7 +472,7 @@ async fn generate(
|
||||
|
||||
fn p404(repo_count: web::Data<AtomicUsize>) -> Result<HttpResponse> {
|
||||
let mut buf = Vec::new();
|
||||
templates::p404(&mut buf, VERSION_INFO, repo_count.load(Ordering::Relaxed))?;
|
||||
templates::p404_html(&mut buf, VERSION_INFO, repo_count.load(Ordering::Relaxed))?;
|
||||
Ok(HttpResponse::NotFound().content_type("text/html").body(buf))
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
@use super::base;
|
||||
@use super::base_html;
|
||||
@use crate::{statics::VersionInfo, template::RepoGeneratorInfo};
|
||||
|
||||
@(version_info: VersionInfo, repo_count: usize, base_url: &str, repo_info: &RepoGeneratorInfo)
|
||||
|
||||
@:base("Hits-of-Code Badges", "Badge Generator", {
|
||||
@:base_html("Hits-of-Code Badges", "Badge Generator", {
|
||||
|
||||
<p>
|
||||
Here is the markdown for the badge for <a href="https://@repo_info.service.url()/@repo_info.user/@repo_info.repo">@repo_info.user/@repo_info.repo</a>
|
||||
|
@ -1,9 +1,9 @@
|
||||
@use super::base;
|
||||
@use super::base_html;
|
||||
@use crate::statics::VersionInfo;
|
||||
|
||||
@(version_info: VersionInfo, repo_count: usize, base_url: &str)
|
||||
|
||||
@:base("Hits-of-Code Badges", "Hits-of-Code Badges", {
|
||||
@:base_html("Hits-of-Code Badges", "Hits-of-Code Badges", {
|
||||
|
||||
<p>
|
||||
This API offers badges for the Hits-of-Code metric for your repositories. This metric was proposed by
|
||||
|
@ -1,10 +1,10 @@
|
||||
@use super::base;
|
||||
@use super::base_html;
|
||||
@use crate::statics::VersionInfo;
|
||||
@use crate::template::RepoInfo;
|
||||
|
||||
@(version_info: VersionInfo, repo_count: usize, repo_info: RepoInfo, label: String)
|
||||
|
||||
@:base("Hits-of-Code Badges", "Overview", {
|
||||
@:base_html("Hits-of-Code Badges", "Overview", {
|
||||
|
||||
<p>
|
||||
The project <a href="@repo_info.url">@repo_info.url</a> has
|
||||
|
@ -1,9 +1,9 @@
|
||||
@use super::base;
|
||||
@use super::base_html;
|
||||
@use crate::statics::VersionInfo;
|
||||
|
||||
@(version_info: VersionInfo, repo_count: usize)
|
||||
|
||||
@:base("Page not Found - Hits-of-Code Badges", "404 - Page not Found", {
|
||||
@:base_html("Page not Found - Hits-of-Code Badges", "404 - Page not Found", {
|
||||
<p>
|
||||
<big>Sorry</big>. I couldn't find the page you are looking for. Please go <a href="/">back to the homepage</a>.
|
||||
</p>
|
||||
|
@ -1,9 +1,9 @@
|
||||
@use super::base;
|
||||
@use super::base_html;
|
||||
@use crate::statics::VersionInfo;
|
||||
|
||||
@(version_info: VersionInfo, repo_count: usize)
|
||||
|
||||
@:base("Branch not Found - Hits-of-Code Badges", "404 - Branch not Found", {
|
||||
@:base_html("Branch not Found - Hits-of-Code Badges", "404 - Branch not Found", {
|
||||
<p>
|
||||
<big>Sorry</big>. I couldn't find the requested branch of your repositroy. Currently this service assumes the
|
||||
extistence of a branch named <code>master</code>. If you'd like to request a badge for another branch, you can do so by
|
||||
|
@ -1,9 +1,9 @@
|
||||
@use super::base;
|
||||
@use super::base_html;
|
||||
@use crate::statics::VersionInfo;
|
||||
|
||||
@(version_info: VersionInfo, repo_count: usize)
|
||||
|
||||
@:base("Internal Server Error - Hits-of-Code Badges", "500 - Internal Server Error", {
|
||||
@:base_html("Internal Server Error - Hits-of-Code Badges", "500 - Internal Server Error", {
|
||||
<p>
|
||||
<big>Oops</big>. Looks like a made a mistake. Please go <a href="/">back to the homepage</a> and try again.
|
||||
</p>
|
||||
|
Reference in New Issue
Block a user