Compare commits

...

10 Commits
v0.3.2 ... main

Author SHA1 Message Date
Paul van Tilburg 03c51e2a2c
Bump the version to 0.3.5
Check and lint using Cargo / Check and lint (push) Successful in 2m10s Details
Release / Release (push) Successful in 1m14s Details
Release / Release Rust crate (push) Successful in 2m53s Details
Release / Release Docker image (push) Successful in 8m41s Details
2024-02-27 15:37:56 +01:00
Paul van Tilburg cc1a0e4748
Update the changelog 2024-02-27 15:37:35 +01:00
Paul van Tilburg d2b90c16f6
Fix clippy issue 2024-02-27 15:37:05 +01:00
Paul van Tilburg d5eed08072
Bump the version to 0.3.4
Check and lint using Cargo / Check and lint (push) Has been cancelled Details
Release / Release (push) Has been cancelled Details
Release / Release Rust crate (push) Has been cancelled Details
Release / Release Docker image (push) Has been cancelled Details
2024-02-27 15:28:09 +01:00
Paul van Tilburg 247e9d51f5
Update the changelog 2024-02-27 15:27:21 +01:00
Paul van Tilburg 5241d90e79
Cargo update; fixes several security advisories
Fixes RUSTSEC-2024-0003 and RUSTSEC-2023-0072
2024-02-27 15:25:21 +01:00
Paul van Tilburg c61bbfef5b
Bump the version to 0.3.3
Check and lint using Cargo / Check and lint (push) Successful in 2m35s Details
Release / Release (push) Successful in 1m14s Details
Release / Release Rust crate (push) Successful in 3m28s Details
Release / Release Docker image (push) Successful in 11m19s Details
2023-11-03 21:25:03 +01:00
Paul van Tilburg f3ff02e4ff
Update the changelog 2023-11-03 21:24:22 +01:00
Paul van Tilburg f2be089fb9
Add missing dates 2023-11-03 21:16:26 +01:00
Paul van Tilburg 45b3f52e71
Cargo update; fixes RUSTSEC-2020-0071
Fix the usage of a deprecated method.
2023-11-03 21:12:04 +01:00
4 changed files with 524 additions and 404 deletions

View File

@ -7,13 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.3.2]
## [0.3.5] - 2024-02-27
### Fixed
* Fix clippy issue
## [0.3.4] - 2024-02-27
### Security
* Updated dependencies, fixes security advisories:
* [RUSTSEC-2024-0003](https://rustsec.org/advisories/RUSTSEC-2024-0003)
* [RUSTSEC-2023-0072](https://rustsec.org/advisories/RUSTSEC-2024-0072)
## [0.3.3] - 2023-11-03
### Security
* Update dependencies ([RUSTSEC-2020-0071](https://rustsec.org/advisories/RUSTSEC-2020-0071.html))
### Changed
* Switch to Rocket 0.5 RC4
## [0.3.2] - 2023-08-27
### Fixed
* Switch to Debian bookworm Docker image for runtime; fixes Docker image
## [0.3.1]
## [0.3.1] - 2023-08-26
### Changed
@ -97,7 +121,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Rename Autarco Scraper project to Solar Grabber.
[Unreleased]: https://git.luon.net/paul/solar-grabber/compare/v0.3.2...HEAD
[Unreleased]: https://git.luon.net/paul/solar-grabber/compare/v0.3.5...HEAD
[0.3.5]: https://git.luon.net/paul/solar-grabber/compare/v0.3.4...v0.3.5
[0.3.4]: https://git.luon.net/paul/solar-grabber/compare/v0.3.3...v0.3.4
[0.3.3]: https://git.luon.net/paul/solar-grabber/compare/v0.3.2...v0.3.3
[0.3.2]: https://git.luon.net/paul/solar-grabber/compare/v0.3.1...v0.3.2
[0.3.1]: https://git.luon.net/paul/solar-grabber/compare/v0.3.0...v0.3.1
[0.3.0]: https://git.luon.net/paul/solar-grabber/compare/v0.2.2...v0.3.0

882
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
[package]
name = "solar-grabber"
version = "0.3.2"
version = "0.3.5"
authors = ["Paul van Tilburg <paul@luon.net>"]
edition = "2021"
description = """"

View File

@ -6,7 +6,7 @@
use std::sync::Arc;
use chrono::{DateTime, Local, TimeZone};
use chrono::{DateTime, Local, NaiveDateTime, TimeZone};
use md5::{Digest, Md5};
use reqwest::{cookie::Jar as CookieJar, Client, ClientBuilder, Url};
use rocket::{
@ -112,7 +112,7 @@ where
use rocket::serde::de::Error;
match <StringOrObject<'_, T>>::deserialize(deserializer) {
Ok(StringOrObject::String(s)) if s.is_empty() => Ok(None),
Ok(StringOrObject::String("")) => Ok(None),
Ok(StringOrObject::String(_)) => Err(Error::custom("Non-empty string not allowed here")),
Ok(StringOrObject::Object(t)) => Ok(Some(t)),
Ok(StringOrObject::Value(j)) => Err(Error::custom(&format!(
@ -133,9 +133,12 @@ where
use rocket::serde::de::Error;
let s = <&str>::deserialize(deserializer)?;
let dt = NaiveDateTime::parse_from_str(s, DATE_TIME_FORMAT).map_err(D::Error::custom)?;
Local
.datetime_from_str(s, DATE_TIME_FORMAT)
.map_err(D::Error::custom)
.from_local_datetime(&dt)
.latest()
.ok_or_else(|| D::Error::custom("time representation is invalid for server time zone"))
}
/// Deserializes a string ([`&str`]) into a float ([`f32`]).