From 01fd3c3a70708c181c7a34707a07aeebc8257652 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Apr 2022 23:57:09 -0400 Subject: [PATCH] Bump rust from 1.54-buster to 1.60.0-buster (#173) * Bump rust from 1.54-buster to 1.60.0-buster Bumps rust from 1.54-buster to 1.60.0-buster. --- updated-dependencies: - dependency-name: rust dependency-type: direct:production ... Signed-off-by: dependabot[bot] * fmt * Remove examples * Fix config test Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dave Gallant --- Dockerfile | 8 +------- examples/config.yml | 5 +++++ src/config.rs | 4 ++-- src/main.rs | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 examples/config.yml diff --git a/Dockerfile b/Dockerfile index 4c928e3..54531b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.54-buster as build +FROM rust:1.60.0-buster as build ENV DEBIAN_FRONTEND=noninteractive @@ -22,15 +22,9 @@ ENV PKG_CONFIG_ALLOW_CROSS=1 RUN cargo build --target=x86_64-unknown-linux-musl --release -RUN mkdir /examples - -COPY examples /examples - ### Final lightweight image FROM scratch -COPY --from=build /examples /examples - COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY --from=build /usr/src/rfd-notify/target/x86_64-unknown-linux-musl/release/rfd-notify ./rfd-notify diff --git a/examples/config.yml b/examples/config.yml new file mode 100644 index 0000000..9223c02 --- /dev/null +++ b/examples/config.yml @@ -0,0 +1,5 @@ +expressions: + - amazon + - costco + - "rx.?5[6789]0" + - starbucks diff --git a/src/config.rs b/src/config.rs index d73bb0a..648c1d2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -21,14 +21,14 @@ mod tests { #[serial] fn load_config_with_missing_sendgrid_api_key() { std::env::remove_var("SENDGRID_API_KEY"); - let file = "./examples/config.yaml"; + let file = "./examples/config.yml"; load(file); } #[test] #[serial] fn load_config() { - let file = "./examples/config.yaml"; + let file = "./examples/config.yml"; std::env::set_var("SENDGRID_API_KEY", "FAKE"); std::env::set_var("SENDGRID_MAIL_FROM", "notify@rfd-notify.org"); std::env::set_var("SENDGRID_MAIL_TO", "test@email.com"); diff --git a/src/main.rs b/src/main.rs index cd44067..f6fc59c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,7 @@ fn main() { .about("Send emails based on regular expressions") .args(&[ Arg::with_name("config") - .default_value("./config.yml") + .default_value("./config.yml") .required(true) .takes_value(true) .short("c")