Compare commits

...

21 Commits

Author SHA1 Message Date
e9ebbee957 Bump version number
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2019-07-01 18:28:14 +02:00
5211481226 Merge pull request #30 from vbrandl/dependabot/cargo/serde_json-1.0.40
Bump serde_json from 1.0.39 to 1.0.40
2019-07-01 18:24:59 +02:00
fd230db0cb Bump serde_json from 1.0.39 to 1.0.40
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.39 to 1.0.40.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.39...v1.0.40)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-01 04:29:15 +00:00
92a95f33d4 Bump version number
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2019-06-28 15:26:12 +02:00
7e13f93ee3 Update dependencies 2019-06-28 15:25:28 +02:00
36afc8732e Merge pull request #29 from vbrandl/dependabot/cargo/serde_derive-1.0.94
All checks were successful
continuous-integration/drone/push Build is passing
Bump serde_derive from 1.0.93 to 1.0.94
2019-06-28 14:16:41 +02:00
abeed1f971 Bump serde_derive from 1.0.93 to 1.0.94
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.93 to 1.0.94.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.93...v1.0.94)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-28 04:26:03 +00:00
03a0743517 Merge pull request #27 from vbrandl/dependabot/cargo/structopt-0.2.18 2019-06-27 07:19:36 +00:00
cbfd56b33a Merge pull request #26 from vbrandl/dependabot/cargo/futures-0.1.28 2019-06-27 07:18:43 +00:00
9c5208d6e4 Bump structopt from 0.2.16 to 0.2.18
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.2.16 to 0.2.18.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/v0.2.18/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.2.16...v0.2.18)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-27 04:25:09 +00:00
92d7b6668a Bump futures from 0.1.27 to 0.1.28
Bumps [futures](https://github.com/rust-lang-nursery/futures-rs) from 0.1.27 to 0.1.28.
- [Release notes](https://github.com/rust-lang-nursery/futures-rs/releases)
- [Changelog](https://github.com/rust-lang-nursery/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang-nursery/futures-rs/compare/0.1.27...0.1.28)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-27 04:24:37 +00:00
97510fa325 Bump version number
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2019-06-26 18:20:56 +02:00
65ba104de1 Merge pull request #23 from vbrandl/dependabot/cargo/ructe-0.6.4
All checks were successful
continuous-integration/drone/push Build is passing
Bump ructe from 0.6.2 to 0.6.4
2019-06-26 18:18:20 +02:00
9599d934a2 Merge pull request #25 from vbrandl/dependabot/cargo/serde_derive-1.0.93
Bump serde_derive from 1.0.92 to 1.0.93
2019-06-26 18:18:06 +02:00
61e2dd174a Bump ructe from 0.6.2 to 0.6.4
Bumps [ructe](https://github.com/kaj/ructe) from 0.6.2 to 0.6.4.
- [Release notes](https://github.com/kaj/ructe/releases)
- [Commits](https://github.com/kaj/ructe/compare/v0.6.2...v0.6.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-26 16:17:36 +00:00
fe00cddd47 Bump serde_derive from 1.0.92 to 1.0.93
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.92 to 1.0.93.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.92...v1.0.93)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-26 16:17:33 +00:00
9b73c99922 Merge pull request #24 from vbrandl/dependabot/cargo/serde-1.0.93
All checks were successful
continuous-integration/drone/push Build is passing
Bump serde from 1.0.92 to 1.0.93
2019-06-26 18:16:03 +02:00
ed3da3a2c3 Bump serde from 1.0.92 to 1.0.93
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.92 to 1.0.93.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.92...v1.0.93)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-24 04:29:52 +00:00
504476b145 Merge pull request #22 from vbrandl/dependabot/cargo/actix-web-1.0.2
All checks were successful
continuous-integration/drone/push Build is passing
Bump actix-web from 1.0.0 to 1.0.2
2019-06-22 13:45:41 +02:00
9bc1b42750 Bump actix-web from 1.0.0 to 1.0.2
Bumps [actix-web](https://github.com/actix/actix-web) from 1.0.0 to 1.0.2.
- [Release notes](https://github.com/actix/actix-web/releases)
- [Changelog](https://github.com/actix/actix-web/blob/master/CHANGES.md)
- [Commits](https://github.com/actix/actix-web/compare/web-v1.0.0...web-v1.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-19 04:22:48 +00:00
140265b713 Cleanup and use internal result type
All checks were successful
continuous-integration/drone/push Build is passing
2019-06-16 22:20:09 +02:00
3 changed files with 188 additions and 201 deletions

365
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,27 @@
[package]
name = "hoc"
version = "0.9.2"
version = "0.9.5"
authors = ["Valentin Brandl <vbrandl@riseup.net>"]
edition = "2018"
build = "build.rs"
[dependencies]
actix-web = "1.0.0"
actix-web = "1.0.3"
badge = "0.2.0"
bytes = "0.4.12"
futures = "0.1.27"
futures = "0.1.28"
git2 = "0.9.1"
lazy_static = "1.3.0"
log = "0.4.6"
log4rs = "0.8.3"
number_prefix = "0.3.0"
openssl-probe = "0.1.2"
reqwest = "0.9.17"
serde = "1.0.91"
serde_derive = "1.0.91"
serde_json = "1.0.39"
structopt = "0.2.16"
reqwest = "0.9.18"
serde = "1.0.94"
serde_derive = "1.0.94"
serde_json = "1.0.40"
structopt = "0.2.18"
[build-dependencies]
ructe = "0.6.2"
ructe = "0.6.4"
vergen = "3.0.4"

View File

@ -1,4 +1,4 @@
use crate::Error;
use crate::error::{Error, Result};
use std::{
borrow::Cow,
fs::{create_dir_all, File, OpenOptions},
@ -17,7 +17,7 @@ pub(crate) enum CacheState<'a> {
}
impl<'a> CacheState<'a> {
pub(crate) fn read_from_file(path: impl AsRef<Path>, head: &str) -> Result<CacheState, Error> {
pub(crate) fn read_from_file(path: impl AsRef<Path>, head: &str) -> Result<CacheState> {
if path.as_ref().exists() {
let cache: Cache = serde_json::from_reader(BufReader::new(File::open(path)?))?;
if cache.head == head {
@ -49,7 +49,7 @@ pub(crate) struct Cache<'a> {
}
impl<'a> Cache<'a> {
pub(crate) fn write_to_file(&self, path: impl AsRef<Path>) -> Result<(), Error> {
pub(crate) fn write_to_file(&self, path: impl AsRef<Path>) -> Result<()> {
create_dir_all(path.as_ref().parent().ok_or(Error::Internal)?)?;
serde_json::to_writer(
OpenOptions::new()