Compare commits

...

28 Commits

Author SHA1 Message Date
Aravinth Manivannan b93373e96b
fix: CI: build release profile bin and publish
ci/woodpecker/push/woodpecker Pipeline is pending Details
2022-12-19 15:15:18 +05:30
Aravinth Manivannan 4b1535848f
fix: rm cmd in publisher
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 14:16:46 +05:30
Aravinth Manivannan f205543c02
fix: CI: don't purge publisher img
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 13:52:30 +05:30
Aravinth Manivannan cfc3f81989
feat: CI: bin publish
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 13:34:42 +05:30
Aravinth Manivannan 88aa76c55b
feat: bin publisher docker img. Get bin from realaravinth/librepages 2022-12-19 13:34:29 +05:30
Aravinth Manivannan ee23632e90
fix: bulid with DATABASE_URL unset and apply migrations
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 12:50:06 +05:30
Aravinth Manivannan 98e3a9d810
fix: switch to global env vars
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 12:43:13 +05:30
Aravinth Manivannan 631849fceb
fix: override DATABASE_URL _after_ URL is constructed
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 12:35:10 +05:30
Aravinth Manivannan e1c475d05a
debug: CI: switch to local env vars for passing DATABASE_URL
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 12:31:12 +05:30
Aravinth Manivannan a0144bcf9b
debug: CI: explicitly supply DATABASE_URL
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 12:00:53 +05:30
Aravinth Manivannan 7db1fa3d3b
debug: db: url
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 11:49:42 +05:30
Aravinth Manivannan fdf31ecfd2
debug: CI: switch name back to database and print URI 2022-12-19 10:57:30 +05:30
Aravinth Manivannan 0a05fb945f
debug: CI: rm db port from url
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 10:48:45 +05:30
Aravinth Manivannan fb967e554b
debug: CI: pass DB url as string
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 10:42:45 +05:30
Aravinth Manivannan b249696776
debug: CI: use different hostname for postgres container
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 10:34:51 +05:30
Aravinth Manivannan 55e4c95d6c
fix: checkin sqlx offline compilation data
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 10:24:51 +05:30
Aravinth Manivannan 56c1a5373e
fix: CI: unset DATABASE_URL while fetching deps 2022-12-19 09:49:18 +05:30
Aravinth Manivannan f021e6fa87
fix: update sqlx offline compilation data
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 09:14:35 +05:30
Aravinth Manivannan 97b59a7576
fix: CI: sed command
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 09:04:38 +05:30
Aravinth Manivannan 409b2be66d
fix: CI: rm release build step, use binary from docker img
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 08:51:52 +05:30
Aravinth Manivannan abe3cf1dac
fix: CI: use the right image to publish bins 2022-12-19 08:51:40 +05:30
Aravinth Manivannan 87f39721c9
fix: CI: write sed output to config file & rm init conductor from make dev-env
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 08:45:27 +05:30
Aravinth Manivannan 61fe325db0
fix: CI: source code uri
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 08:41:34 +05:30
Aravinth Manivannan f919dcb691
fix: CI: fix conductor type
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 08:38:06 +05:30
Aravinth Manivannan 04e3ab398d
fix: CI: booleans
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 08:36:01 +05:30
Aravinth Manivannan 20e326fb51
fix: CI: port is a number
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 08:34:25 +05:30
Aravinth Manivannan df3ed747b0
fix: CI: add librepages-conductor img
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-12-19 08:33:48 +05:30
Aravinth Manivannan 4250a62165
feat: add CI build status badge 2022-12-19 08:27:28 +05:30
11 changed files with 113 additions and 81 deletions

View File

@ -1,4 +1,4 @@
/target
**/target/
tarpaulin-report.html
.env
cobertura.xml

View File

@ -5,15 +5,14 @@ pipeline:
- DATABASE_URL=postgres://postgres:password@database:5432/postgres
commands:
- curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
- apt update && apt-get -y --no-install-recommends install nodejs
- apt update && apt-get -y --no-install-recommends install nodejs tar gpg curl wget
- rustup component add rustfmt
- rustup component add clippy
# rewrite conducotr configuration
- sed 's%url = "http:\/\/localhost:5000"%http:\/\/librepages-conductor:5000%' config/default.toml
- sed -i 's%url = "http:\/\/localhost:5000"%url = "http:\/\/librepages-conductor:5000"%' config/default.toml
- make dev-env
- make migrate
- make lint
- make
- make test
- make release
@ -37,6 +36,17 @@ pipeline:
repo: realaravinth/librepages
tags: latest
# build_publisher_docker_img:
# image: plugins/docker
# when:
# event: [push, tag, deployment]
# settings:
# dry_run: true
# dockerfile: scripts/publish-bins-docker
# purge: false
# repo: realaravinth/librepages-publisher
# tags: latest
#
publish_bins:
image: rust
when:
@ -45,7 +55,7 @@ pipeline:
- apt update
- apt-get -y --no-install-recommends install gpg tar curl wget
- echo -n "$RELEASE_BOT_GPG_SIGNING_KEY" | gpg --batch --import --pinentry-mode loopback
- ./scripts/bin-publish.sh publish master latest $DUMBSERVE_PASSWORD
- scripts/bin-publish.sh publish master latest $DUMBSERVE_PASSWORD
secrets: [RELEASE_BOT_GPG_SIGNING_KEY, DUMBSERVE_PASSWORD, GPG_PASSWORD]
services:
@ -55,18 +65,18 @@ services:
- POSTGRES_PASSWORD=password
librepages-conductor:
image: realaravinth/librepages-conductor
command: conductor serve
environment:
- LPCONDUCTOR__SOURCE_CODE="https://git.batsense.net/LibrePages/conductor"
- LPCONDUCTOR_SERVER__PROXY_HAS_TLS=false
- LPCONDUCTOR_DEBUG="false"
- LPCONDUCTOR_CONDUCTOR="dummy"
- LPCONDUCTOR_DEBUG=false
- LPCONDUCTOR_CONDUCTOR=dummy
- LPCONDUCTOR_SERVER_URL_PREFIX=""
- LPCONDUCTOR_SERVER_DOMAIN="librepages.test"
- LPCONDUCTOR_SERVER_IP="0.0.0.0"
- LPCONDUCTOR_SERVER_PROXY_HAS_TLS="false"
- LPCONDUCTOR_SERVER_IP=0.0.0.0
- LPCONDUCTOR_SERVER_PROXY_HAS_TLS=false
- LPCONDUCTOR_SERVER_PORT=7000
- LPCONDUCTOR_SOURCE_CODE="https://example.org"
- LPCONDUCTOR_SOURCE_CODE=https://example.org
- LPCONDUCTOR_CREDS_USERNAME="librepages_api"
- LPCONDUCTOR_CREDS_PASSWORD="longrandomlygeneratedpassword"
- PORT="5000"
- PORT=5000

94
Cargo.lock generated
View File

@ -42,7 +42,7 @@ dependencies = [
"actix-service",
"actix-utils",
"ahash",
"base64",
"base64 0.13.1",
"bitflags",
"brotli",
"bytes",
@ -339,9 +339,9 @@ checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"
[[package]]
name = "async-trait"
version = "0.1.59"
version = "0.1.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31e6e93155431f3931513b243d371981bb2770112b370c82745a1d19d2f99364"
checksum = "677d1d8ab452a3936018a687b20e6f7cf5363d713b732b8884001317b0e48aa3"
dependencies = [
"proc-macro2",
"quote",
@ -380,6 +380,12 @@ version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]]
name = "base64"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5"
[[package]]
name = "bitflags"
version = "1.3.2"
@ -480,9 +486,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.0.77"
version = "1.0.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"
checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d"
dependencies = [
"jobserver",
]
@ -575,12 +581,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]
name = "cookie"
version = "0.16.1"
version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "344adc371239ef32293cb1c4fe519592fcf21206c79c02854320afcdf3ab4917"
checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb"
dependencies = [
"aes-gcm",
"base64",
"base64 0.20.0",
"hkdf",
"hmac",
"percent-encoding",
@ -1342,9 +1348,9 @@ dependencies = [
[[package]]
name = "itoa"
version = "1.0.4"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc"
checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440"
[[package]]
name = "jobserver"
@ -1407,7 +1413,7 @@ dependencies = [
[[package]]
name = "libconfig"
version = "0.1.0"
source = "git+https://git.batsense.net/librepages/libconfig#f54290c4bae26b51a4945e0bf812e2b99856963b"
source = "git+https://git.batsense.net/librepages/libconfig#f5c8c7a73744b844075a2af3fae88465e29a434f"
dependencies = [
"serde",
]
@ -1834,9 +1840,9 @@ dependencies = [
[[package]]
name = "paste"
version = "1.0.10"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1c2c742266c2f1041c914ba65355a83ae8747b05f208319784083583494b4b"
checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba"
[[package]]
name = "pathdiff"
@ -2041,9 +2047,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.47"
version = "1.0.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"
checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5"
dependencies = [
"unicode-ident",
]
@ -2056,9 +2062,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quote"
version = "1.0.21"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b"
dependencies = [
"proc-macro2",
]
@ -2145,7 +2151,7 @@ version = "0.11.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c"
dependencies = [
"base64",
"base64 0.13.1",
"bytes",
"encoding_rs",
"futures-core",
@ -2197,7 +2203,7 @@ version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a"
dependencies = [
"base64",
"base64 0.13.1",
"bitflags",
"serde",
]
@ -2208,7 +2214,7 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b50162d19404029c1ceca6f6980fe40d45c8b369f6f44446fa14bb39573b5bb9"
dependencies = [
"base64",
"base64 0.13.1",
"blake2b_simd",
"constant_time_eq",
"crossbeam-utils",
@ -2285,14 +2291,14 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55"
dependencies = [
"base64",
"base64 0.13.1",
]
[[package]]
name = "ryu"
version = "1.0.11"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde"
[[package]]
name = "same-file"
@ -2354,24 +2360,24 @@ dependencies = [
[[package]]
name = "semver"
version = "1.0.14"
version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4"
checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a"
[[package]]
name = "serde"
version = "1.0.150"
version = "1.0.151"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91"
checksum = "97fed41fc1a24994d044e6db6935e69511a1153b52c15eb42493b26fa87feba0"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.150"
version = "1.0.151"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e"
checksum = "255abe9a125a985c05190d687b320c12f9b1f0b99445e608c21ba0782c719ad8"
dependencies = [
"proc-macro2",
"quote",
@ -2380,9 +2386,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.89"
version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db"
checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883"
dependencies = [
"itoa",
"ryu",
@ -2403,9 +2409,9 @@ dependencies = [
[[package]]
name = "serde_yaml"
version = "0.9.14"
version = "0.9.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d232d893b10de3eb7258ff01974d6ee20663d8e833263c99409d4b13a0209da"
checksum = "92b5b431e8907b50339b51223b97d102db8d987ced36f6e4d03621db9316c834"
dependencies = [
"indexmap",
"itoa",
@ -2511,7 +2517,7 @@ checksum = "dcbc16ddba161afc99e14d1713a453747a2b07fc097d2009f4c300ec99286105"
dependencies = [
"ahash",
"atoi",
"base64",
"base64 0.13.1",
"bitflags",
"byteorder",
"bytes",
@ -2641,9 +2647,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
[[package]]
name = "syn"
version = "1.0.105"
version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908"
checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
dependencies = [
"proc-macro2",
"quote",
@ -2708,18 +2714,18 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
[[package]]
name = "thiserror"
version = "1.0.37"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e"
checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.37"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb"
checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f"
dependencies = [
"proc-macro2",
"quote",
@ -2987,9 +2993,9 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
[[package]]
name = "unicode-ident"
version = "1.0.5"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc"
[[package]]
name = "unicode-normalization"
@ -3024,9 +3030,9 @@ dependencies = [
[[package]]
name = "unsafe-libyaml"
version = "0.2.4"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1e5fa573d8ac5f1a856f8d7be41d390ee973daf97c806b2c1a465e4e1406e68"
checksum = "bc7ed8ba44ca06be78ea1ad2c3682a43349126c8818054231ee6f4748012aed2"
[[package]]
name = "untrusted"

View File

@ -19,7 +19,7 @@ actix-identity = "0.4.0"
actix-rt = "2"
actix-web-codegen-const-routes = { version = "0.1.0", tag = "0.1.0", git = "https://github.com/realaravinth/actix-web-codegen-const-routes" }
argon2-creds = { branch = "master", git = "https://github.com/realaravinth/argon2-creds"}
sqlx = { version = "0.6.1", features = ["runtime-actix-rustls", "postgres", "time", "offline", "json", "uuid"] }
sqlx = { version = "0.6.2", features = ["runtime-actix-rustls", "postgres", "time", "offline", "json", "uuid"] }
clap = { version = "3.2.20", features = ["derive"]}
libconfig = { version = "0.1.0", git = "https://git.batsense.net/librepages/libconfig" }
libconductor = { version = "0.1.0", git = "https://git.batsense.net/librepages/conductor/" }

View File

@ -24,7 +24,6 @@ coverage: ## Generate HTML code coverage
dev-env: ## Download development dependencies
npm install
cargo fetch
./scripts/conductor.sh
doc: ## Prepare documentation
cargo doc --no-deps --workspace --all-features
@ -47,7 +46,7 @@ lint: ## Lint codebase
migrate: ## run migrations
$(call cache_bust)
unset DATABASE_URL && cargo build
cargo run -- migrate
DATABASE_URL=${DATABASE_URL} cargo run -- migrate
release: ## Release build
$(call cache_bust)

View File

@ -5,6 +5,7 @@
**Auto-deploy static websites from git repositories**
</p>
[![status-badge](https://ci.batsense.net/api/badges/LibrePages/librepages/status.svg)](https://ci.batsense.net/LibrePages/librepages)
</div>

View File

@ -33,14 +33,15 @@ FILENAME="$NAME-$2-linux-amd64"
TARBALL=$FILENAME.tar.gz
TARGET_DIR="$TMP_DIR/$FILENAME/"
mkdir -p $TARGET_DIR
DOCKER_IMG="realaravinth/pages:$3"
DOCKER_IMG="realaravinth/librepages:$3"
get_bin(){
echo "[*] Grabbing binary"
container_id=$(docker create $DOCKER_IMG)
docker cp $container_id:/usr/local/bin/pages $TARGET_DIR/
docker rm -v $container_id
#container_id=$(docker create $DOCKER_IMG)
#docker cp $container_id:/usr/local/bin/pages $TARGET_DIR/
#docker rm -v $container_id
cp target/release/librepages $TARGET_DIR
}
copy() {

View File

@ -0,0 +1,14 @@
FROM realaravinth/librepages:latest as base
RUN echo foo
FROM debian:bullseye-slim
RUN apt update
RUN apt-get -y --no-install-recommends install gpg tar curl wget
WORKDIR /src
COPY --from=base /usr/local/bin/librepages .
COPY . .
ARG RELEASE_BOT_GPG_SIGNING_KEY
RUN echo -n "$RELEASE_BOT_GPG_SIGNING_KEY"
RUN echo -n "$RELEASE_BOT_GPG_SIGNING_KEY" | gpg --batch --import --pinentry-mode loopback
env GPG_PASSWORD=$GPG_PASSWORD
RUN /src/scripts/bin-publish.sh publish master latest $DUMBSERVE_PASSWORD

View File

@ -48,6 +48,7 @@ impl ConnectionOptions {
async fn connect(self) -> ServiceResult<Database> {
let pool = match self {
Self::Fresh(fresh) => {
tracing::info!("DATABASE URL: {}", fresh.url);
let mut connect_options =
sqlx::postgres::PgConnectOptions::from_str(&fresh.url).unwrap();
if fresh.disable_logging {

View File

@ -136,15 +136,6 @@ impl Settings {
Err(e) => warn!("couldn't interpret PORT: {}", e),
}
if let Ok(val) = env::var("DATABASE_URL") {
let url = Url::parse(&val).expect("couldn't parse Database URL");
s = s.set_override("database.url", url.to_string()).unwrap();
let database_type = DBType::from_url(&url).unwrap();
s = s
.set_override("database.database_type", database_type.to_string())
.unwrap();
}
let intermediate_config = s.build_cloned().unwrap();
s = s
@ -171,6 +162,15 @@ impl Settings {
)
.expect("Couldn't set database url");
if let Ok(val) = env::var("DATABASE_URL") {
let url = Url::parse(&val).expect("couldn't parse Database URL");
s = s.set_override("database.url", url.to_string()).unwrap();
let database_type = DBType::from_url(&url).unwrap();
s = s
.set_override("database.database_type", database_type.to_string())
.unwrap();
}
let settings = s.build()?.try_deserialize::<Settings>()?;
settings.check_url();

View File

@ -167,6 +167,15 @@ version = "0.2.125"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b"
[[package]]
name = "librepages"
version = "0.1.0"
dependencies = [
"cache-buster",
"serde",
"serde_json",
]
[[package]]
name = "mime"
version = "0.3.16"
@ -183,15 +192,6 @@ dependencies = [
"unicase",
]
[[package]]
name = "pages"
version = "0.1.0"
dependencies = [
"cache-buster",
"serde",
"serde_json",
]
[[package]]
name = "proc-macro2"
version = "1.0.38"