Compare commits

...

464 Commits

Author SHA1 Message Date
1ef65037a1 Update actix-web and tokio
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-03 13:00:38 +02:00
5d4b90167b Bump actix-rt from 1.1.1 to 2.2.0
Bumps [actix-rt](https://github.com/actix/actix-net) from 1.1.1 to 2.2.0.
- [Release notes](https://github.com/actix/actix-net/releases)
- [Commits](https://github.com/actix/actix-net/compare/rt-1.1.1...rt-v2.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-03 09:46:32 +00:00
f6d47baefd Bump version (v0.18.0) 2021-09-03 11:45:10 +02:00
44d47b1d5f Implement badges for sourcehut 2021-09-03 11:44:22 +02:00
3a57fcca9d Merge pull request #305 from vbrandl/dependabot/cargo/vergen-5.1.13
Bump vergen from 5.1.2 to 5.1.13
2021-07-16 09:03:52 +02:00
3051bdc0c7 Bump vergen from 5.1.2 to 5.1.13
Bumps [vergen](https://github.com/rustyhorde/vergen) from 5.1.2 to 5.1.13.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/5.1.2...5.1.13)

---
updated-dependencies:
- dependency-name: vergen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-13 04:20:01 +00:00
e267a4fc8a chore: Bump version (v0.17.4)
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is failing
2021-06-29 19:47:08 +02:00
441ab76ca6 Merge pull request #300 from vbrandl/revert-299-dependabot/cargo/vergen-5.1.10
Revert "Bump vergen from 5.1.2 to 5.1.10"
2021-06-29 19:46:36 +02:00
155d79a019 Revert "Bump vergen from 5.1.2 to 5.1.10" 2021-06-29 19:46:21 +02:00
1fe39fbd3c fix(docker): Start with lib project for caching
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2021-06-29 19:23:34 +02:00
1fae322993 fix(docker): Start with lib project for caching
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is failing
2021-06-29 19:14:51 +02:00
13c193d04a chore: Bump version (v0.17.3)
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-29 19:06:35 +02:00
701299ab5b Merge pull request #299 from vbrandl/dependabot/cargo/vergen-5.1.10
Bump vergen from 5.1.2 to 5.1.10
2021-06-29 19:01:27 +02:00
2277931d3c Merge pull request #291 from vbrandl/dependabot/cargo/git2-0.13.20
Bump git2 from 0.13.18 to 0.13.20
2021-06-29 18:57:39 +02:00
6c59acc0ab Bump vergen from 5.1.2 to 5.1.10
Bumps [vergen](https://github.com/rustyhorde/vergen) from 5.1.2 to 5.1.10.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/5.1.2...5.1.10)

---
updated-dependencies:
- dependency-name: vergen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-29 16:56:16 +00:00
79d947fb36 Merge pull request #297 from vbrandl/dependabot/cargo/tracing-subscriber-0.2.19
Bump tracing-subscriber from 0.2.18 to 0.2.19
2021-06-29 18:55:39 +02:00
a1133259c2 Merge pull request #298 from vbrandl/dependabot/cargo/ructe-0.13.4
Bump ructe from 0.13.2 to 0.13.4
2021-06-29 18:55:05 +02:00
9eb47bd94b Bump ructe from 0.13.2 to 0.13.4
Bumps [ructe](https://github.com/kaj/ructe) from 0.13.2 to 0.13.4.
- [Release notes](https://github.com/kaj/ructe/releases)
- [Changelog](https://github.com/kaj/ructe/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kaj/ructe/compare/v0.13.2...v0.13.4)

---
updated-dependencies:
- dependency-name: ructe
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-28 04:24:35 +00:00
8f6c52a6f5 Bump tracing-subscriber from 0.2.18 to 0.2.19
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.18 to 0.2.19.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.18...tracing-subscriber-0.2.19)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-28 04:24:28 +00:00
b50112c7c0 Bump git2 from 0.13.18 to 0.13.20
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.18 to 0.13.20.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.18...0.13.20)

---
updated-dependencies:
- dependency-name: git2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-11 04:12:07 +00:00
62c80a81de Change link to gpg key 2021-06-10 12:10:00 +02:00
04f1437d0c chores(cargo): Bump version (0.17.2) 2021-05-27 13:18:31 +02:00
e706176d84 Merge pull request #282 from vbrandl/dependabot/cargo/serde-1.0.126
Bump serde from 1.0.125 to 1.0.126
2021-05-27 12:55:05 +02:00
a2a0047e03 Merge pull request #283 from vbrandl/dependabot/cargo/futures-0.3.15
Bump futures from 0.3.14 to 0.3.15
2021-05-27 12:54:37 +02:00
be7320e24e Merge pull request #281 from vbrandl/dependabot/cargo/tracing-bunyan-formatter-0.2.4
Bump tracing-bunyan-formatter from 0.2.0 to 0.2.4
2021-05-27 12:54:27 +02:00
55f937aac2 Bump tracing-bunyan-formatter from 0.2.0 to 0.2.4
Bumps [tracing-bunyan-formatter](https://github.com/LukeMathWalker/tracing-bunyan-formatter) from 0.2.0 to 0.2.4.
- [Release notes](https://github.com/LukeMathWalker/tracing-bunyan-formatter/releases)
- [Commits](https://github.com/LukeMathWalker/tracing-bunyan-formatter/compare/v0.2.0...v0.2.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-27 10:48:45 +00:00
d929a559b6 Bump futures from 0.3.14 to 0.3.15
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.14 to 0.3.15.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.14...0.3.15)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-27 10:48:26 +00:00
5e7374deea Bump serde from 1.0.125 to 1.0.126
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.125 to 1.0.126.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.125...v1.0.126)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-27 10:48:22 +00:00
0821559471 Remove reviewer and ignored dependencies for dependabot 2021-05-27 12:47:10 +02:00
a9ede0b2c7 Merge pull request #273 from vbrandl/dependabot/cargo/openssl-probe-0.1.4
Bump openssl-probe from 0.1.2 to 0.1.4
2021-05-27 12:45:28 +02:00
be48ebd2d9 Fix clippy lint 2021-05-27 12:39:45 +02:00
c80bef7cbd Merge pull request #271 from vbrandl/dependabot/cargo/tracing-subscriber-0.2.18
Bump tracing-subscriber from 0.2.17 to 0.2.18
2021-05-27 12:20:35 +02:00
c9b67eb6e6 Merge pull request #270 from vbrandl/dependabot/cargo/tracing-0.1.26
Bump tracing from 0.1.25 to 0.1.26
2021-05-27 12:19:55 +02:00
1ab4cb6c71 Merge pull request #268 from vbrandl/dependabot/add-v2-config-file
Upgrade to GitHub-native Dependabot
2021-05-27 12:18:35 +02:00
9785b38ce0 Bump openssl-probe from 0.1.2 to 0.1.4
Bumps [openssl-probe](https://github.com/alexcrichton/openssl-probe) from 0.1.2 to 0.1.4.
- [Release notes](https://github.com/alexcrichton/openssl-probe/releases)
- [Commits](https://github.com/alexcrichton/openssl-probe/compare/0.1.2...0.1.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-05-12 04:20:25 +00:00
492e17b997 Bump tracing-subscriber from 0.2.17 to 0.2.18
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.17 to 0.2.18.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.17...tracing-subscriber-0.2.18)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-05-03 04:19:29 +00:00
43586e534b Bump tracing from 0.1.25 to 0.1.26
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.25 to 0.1.26.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.25...tracing-0.1.26)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-05-03 04:19:05 +00:00
70bca967f3 Upgrade to GitHub-native Dependabot 2021-04-29 15:09:17 +00:00
61013e43ab Merge pull request #264 from vbrandl/dependabot/cargo/git2-0.13.18
Some checks failed
continuous-integration/drone/push Build is failing
Bump git2 from 0.13.17 to 0.13.18
2021-04-23 12:52:03 +02:00
0c100e76ad Merge pull request #263 from vbrandl/dependabot/cargo/vergen-5.1.2
Bump vergen from 5.1.1 to 5.1.2
2021-04-23 12:51:30 +02:00
000c7457f5 Bump git2 from 0.13.17 to 0.13.18
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.17 to 0.13.18.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.17...0.13.18)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-20 04:19:33 +00:00
70361e8b70 Bump vergen from 5.1.1 to 5.1.2
Bumps [vergen](https://github.com/rustyhorde/vergen) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/5.1.1...5.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-20 04:19:12 +00:00
4237f6cc06 Merge pull request #262 from vbrandl/disable-gitlab-ci
Some checks failed
continuous-integration/drone/push Build is failing
Remove `.gitlab-ci.yml`
2021-04-19 09:02:03 +02:00
04a90469fe Remove .gitlab-ci.yml
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-19 09:01:06 +02:00
117a052aa5 Merge pull request #259 from vbrandl/dependabot/cargo/futures-0.3.14
Bump futures from 0.3.13 to 0.3.14
2021-04-19 08:59:59 +02:00
b2bc7fc217 Bump futures from 0.3.13 to 0.3.14
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.13 to 0.3.14.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.13...0.3.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 17:58:36 +00:00
cd2624ae11 Merge pull request #256 from vbrandl/dependabot/cargo/tracing-bunyan-formatter-0.2.0
Bump tracing-bunyan-formatter from 0.1.7 to 0.2.0
2021-04-13 19:56:58 +02:00
fa9601bb9a Merge pull request #258 from vbrandl/dependabot/cargo/vergen-5.1.1
Bump vergen from 5.1.0 to 5.1.1
2021-04-13 19:55:14 +02:00
ae9d31b82c Bump vergen from 5.1.0 to 5.1.1
Bumps [vergen](https://github.com/rustyhorde/vergen) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/5.1.0...5.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-08 04:18:02 +00:00
2afe5fc172 Bump tracing-bunyan-formatter from 0.1.7 to 0.2.0
Bumps [tracing-bunyan-formatter](https://github.com/LukeMathWalker/tracing-bunyan-formatter) from 0.1.7 to 0.2.0.
- [Release notes](https://github.com/LukeMathWalker/tracing-bunyan-formatter/releases)
- [Commits](https://github.com/LukeMathWalker/tracing-bunyan-formatter/commits/v0.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-30 04:19:49 +00:00
ea7f074661 Merge pull request #244 from vbrandl/dependabot/cargo/ructe-0.13.2
Bump ructe from 0.13.0 to 0.13.2
2021-03-29 14:45:53 +02:00
d5e3cad299 Bump ructe from 0.13.0 to 0.13.2
Bumps [ructe](https://github.com/kaj/ructe) from 0.13.0 to 0.13.2.
- [Release notes](https://github.com/kaj/ructe/releases)
- [Changelog](https://github.com/kaj/ructe/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kaj/ructe/compare/v0.13.0...v0.13.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-29 10:56:11 +00:00
6570daef02 Remove macos from test matrix
Some checks failed
continuous-integration/drone/push Build is failing
2021-03-29 12:55:49 +02:00
6ac389e3ee Merge pull request #239 from vbrandl/dependabot/cargo/serde_json-1.0.64
Bump serde_json from 1.0.63 to 1.0.64
2021-03-29 12:55:14 +02:00
36196975ac Merge pull request #251 from vbrandl/dependabot/cargo/vergen-5.1.0
Bump vergen from 4.1.0 to 5.1.0
2021-03-29 12:54:28 +02:00
1dd83829b2 Bump serde_json from 1.0.63 to 1.0.64
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.63 to 1.0.64.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.63...v1.0.64)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-29 10:48:28 +00:00
1b0817bc25 Bump vergen from 4.1.0 to 5.1.0
All checks were successful
continuous-integration/drone/push Build is passing
Bumps [vergen](https://github.com/rustyhorde/vergen) from 4.1.0 to 5.1.0.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/4.1.0...5.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-29 12:45:49 +02:00
f57dc8e890 Fix vergen 2021-03-29 12:45:49 +02:00
bdda6292d2 Bump vergen from 4.1.0 to 5.1.0
Bumps [vergen](https://github.com/rustyhorde/vergen) from 4.1.0 to 5.1.0.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/4.1.0...5.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-29 12:45:49 +02:00
a2826c9922 Remove windows from test matrix
Some checks failed
continuous-integration/drone/push Build is failing
2021-03-29 12:44:55 +02:00
3b2a368df0 Merge pull request #247 from vbrandl/dependabot/cargo/config-0.11.0
Bump config from 0.10.1 to 0.11.0
2021-03-29 12:23:55 +02:00
8b7444bd7c Merge pull request #253 from vbrandl/feature/refactor2
Feature/refactor2
2021-03-29 12:12:58 +02:00
9d719e7d85 Merge pull request #252 from vbrandl/master
Refactor for testability
2021-03-29 12:12:09 +02:00
584379e047 Merge pull request #250 from vbrandl/dependabot/cargo/serde-1.0.125
Bump serde from 1.0.123 to 1.0.125
2021-03-29 12:10:50 +02:00
951124e038 Bump serde from 1.0.123 to 1.0.125
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.123 to 1.0.125.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.123...v1.0.125)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-23 04:24:16 +00:00
e574f4bdd0 Run tests also on windows
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-22 13:41:50 +01:00
5c8e3fa35d Add badge test
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-22 13:34:26 +01:00
4c0df1fa19 Add config so tests will work 2021-03-22 13:34:18 +01:00
f6b46a1e90 Add config so tests will work
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-22 13:33:56 +01:00
5eb16ac38e Remove unused code
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-22 12:52:24 +01:00
3486d44bc5 Restructure for testability and implement first tests 2021-03-22 12:46:10 +01:00
1311e724ce Bump version (v0.17.1)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2021-03-22 08:38:45 +01:00
5da9e74992 Merge pull request #248 from strdr4605/patch-1
fix: remove redundant param in md url
2021-03-22 08:37:53 +01:00
8dadc0ddea fix: remove redundant param in md url 2021-03-22 00:16:31 +02:00
cba235eadf Bump config from 0.10.1 to 0.11.0
Bumps [config](https://github.com/mehcode/config-rs) from 0.10.1 to 0.11.0.
- [Release notes](https://github.com/mehcode/config-rs/releases)
- [Changelog](https://github.com/mehcode/config-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mehcode/config-rs/commits/0.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-18 04:18:27 +00:00
5284249acf Bump version (v0.17.0)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2021-02-26 16:38:26 +01:00
d28f56dac0 Updgrade serde_derive and futures
All checks were successful
continuous-integration/drone/push Build is passing
2021-02-26 16:35:14 +01:00
ab02a45bf6 Update dependencies
All checks were successful
continuous-integration/drone/push Build is passing
2021-02-26 16:28:04 +01:00
837c1c160b Merge pull request #234 from vbrandl/dependabot/cargo/vergen-4.1.0
Bump vergen from 3.2.0 to 4.1.0
2021-02-26 16:17:56 +01:00
3d26823425 Fix breaking changes in vergen
All checks were successful
continuous-integration/drone/push Build is passing
2021-02-26 16:12:58 +01:00
d9553871fa Deactivate unused features of vergen 2021-02-26 16:12:47 +01:00
d2bc9c2149 Bump vergen from 3.2.0 to 4.1.0
Bumps [vergen](https://github.com/rustyhorde/vergen) from 3.2.0 to 4.1.0.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/v3.2.0...4.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-26 15:06:33 +00:00
b0b97653a9 Rollback reqwest to 0.10.10
All checks were successful
continuous-integration/drone/push Build is passing
2021-02-26 16:04:58 +01:00
0b1bc60790 Merge pull request #238 from vbrandl/revert-236-dependabot/cargo/actix-rt-2.1.0
Revert "Bump actix-rt from 1.1.1 to 2.1.0"
2021-02-26 15:51:46 +01:00
e93588a6d9 Revert "Bump actix-rt from 1.1.1 to 2.1.0" 2021-02-26 15:51:35 +01:00
cd5046a276 Merge pull request #236 from vbrandl/dependabot/cargo/actix-rt-2.1.0
Bump actix-rt from 1.1.1 to 2.1.0
2021-02-26 15:41:54 +01:00
919348d49d Merge pull request #229 from vbrandl/dependabot/cargo/tracing-futures-0.2.5
Bump tracing-futures from 0.2.4 to 0.2.5
2021-02-26 15:31:26 +01:00
8378b0b51b Bump tracing-futures from 0.2.4 to 0.2.5
Bumps [tracing-futures](https://github.com/tokio-rs/tracing) from 0.2.4 to 0.2.5.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-futures-0.2.4...tracing-futures-0.2.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-26 14:31:17 +00:00
0394ae52e9 Merge pull request #235 from vbrandl/dependabot/cargo/tracing-0.1.25
Bump tracing from 0.1.23 to 0.1.25
2021-02-26 15:29:55 +01:00
fb34f6bf2f Bump tracing from 0.1.23 to 0.1.25
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.23 to 0.1.25.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.23...tracing-0.1.25)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-26 14:29:17 +00:00
36622ad322 Merge pull request #232 from vbrandl/dependabot/cargo/tracing-subscriber-0.2.16
Bump tracing-subscriber from 0.2.15 to 0.2.16
2021-02-26 15:28:11 +01:00
89bb27e137 Merge pull request #237 from vbrandl/dependabot/cargo/serde_json-1.0.63
Bump serde_json from 1.0.62 to 1.0.63
2021-02-26 15:27:53 +01:00
7d4385764c Bump serde_json from 1.0.62 to 1.0.63
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.62 to 1.0.63.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.62...v1.0.63)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-26 04:19:16 +00:00
5df97f0e64 Bump actix-rt from 1.1.1 to 2.1.0
Bumps [actix-rt](https://github.com/actix/actix-net) from 1.1.1 to 2.1.0.
- [Release notes](https://github.com/actix/actix-net/releases)
- [Commits](https://github.com/actix/actix-net/compare/rt-1.1.1...rt-v2.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-26 04:18:49 +00:00
a3d98a326e Bump tracing-subscriber from 0.2.15 to 0.2.16
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.15 to 0.2.16.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.15...tracing-subscriber-0.2.16)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-22 04:14:56 +00:00
76bf5f2f98 Merge pull request #221 from vbrandl/dependabot/cargo/serde-1.0.123
Bump serde from 1.0.118 to 1.0.123
2021-02-11 11:17:34 +01:00
e827d2ef39 Bump serde from 1.0.118 to 1.0.123
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.118 to 1.0.123.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.118...v1.0.123)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-11 10:12:45 +00:00
65576140ce Merge pull request #212 from vbrandl/dependabot/cargo/reqwest-0.11.0
Bump reqwest from 0.10.10 to 0.11.0
2021-02-11 11:11:14 +01:00
cea54cf2f3 Bump reqwest from 0.10.10 to 0.11.0
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.10.10 to 0.11.0.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.10.10...v0.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-11 10:10:09 +00:00
8c28c68c17 Merge pull request #215 from vbrandl/dependabot/cargo/bytes-1.0.1
Bump bytes from 1.0.0 to 1.0.1
2021-02-11 11:09:27 +01:00
b86a080ead Merge pull request #223 from vbrandl/dependabot/cargo/tracing-0.1.23
Bump tracing from 0.1.22 to 0.1.23
2021-02-11 11:08:42 +01:00
1b0c959a8d Bump bytes from 1.0.0 to 1.0.1
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.0.0...v1.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-10 17:07:29 +00:00
806baf7460 Bump tracing from 0.1.22 to 0.1.23
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.22 to 0.1.23.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.22...tracing-0.1.23)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-10 17:06:26 +00:00
080f7379ea Merge pull request #216 from vbrandl/dependabot/cargo/tempfile-3.2.0
Bump tempfile from 3.1.0 to 3.2.0
2021-02-10 18:06:14 +01:00
7409de5dba Merge pull request #219 from vbrandl/dependabot/cargo/git2-0.13.17
Bump git2 from 0.13.14 to 0.13.17
2021-02-10 18:05:52 +01:00
07f4ef518a Merge pull request #225 from vbrandl/dependabot/cargo/serde_json-1.0.62
Bump serde_json from 1.0.61 to 1.0.62
2021-02-10 18:04:58 +01:00
820ebdd899 Bump tempfile from 3.1.0 to 3.2.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-10 17:04:57 +00:00
527d793914 Merge pull request #226 from vbrandl/dependabot/cargo/vergen-3.2.0
Bump vergen from 3.1.0 to 3.2.0
2021-02-10 18:03:26 +01:00
7df6c3fc75 Bump vergen from 3.1.0 to 3.2.0
Bumps [vergen](https://github.com/rustyhorde/vergen) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/v3.1.0...v3.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-10 04:16:04 +00:00
17e1af1dd7 Bump serde_json from 1.0.61 to 1.0.62
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.61 to 1.0.62.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.61...v1.0.62)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-08 04:17:19 +00:00
baade8fbc2 Bump git2 from 0.13.14 to 0.13.17
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.14 to 0.13.17.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.14...0.13.17)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-25 04:16:33 +00:00
cfc07664fc Merge pull request #211 from vbrandl/dependabot/cargo/serde_json-1.0.61
Bump serde_json from 1.0.60 to 1.0.61
2021-01-06 18:11:44 +01:00
52938c9106 Bump serde_json from 1.0.60 to 1.0.61
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.60 to 1.0.61.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.60...v1.0.61)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-29 04:18:23 +00:00
b64f573a38 Bump version (v0.16.0)
All checks were successful
continuous-integration/drone/push Build is passing
2020-12-23 21:44:46 +01:00
ebbd1ea8cb Merge pull request #204 from vbrandl/dependabot/cargo/reqwest-0.10.10
Bump reqwest from 0.10.9 to 0.10.10
2020-12-23 21:33:54 +01:00
93a0147a78 Merge pull request #208 from vbrandl/dependabot/cargo/bytes-1.0.0
Bump bytes from 0.6.0 to 1.0.0
2020-12-23 21:33:27 +01:00
2040e718d7 Bump reqwest from 0.10.9 to 0.10.10
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.10.9 to 0.10.10.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.10.9...v0.10.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-23 20:33:00 +00:00
5679f67de0 Bump bytes from 0.6.0 to 1.0.0
Bumps [bytes](https://github.com/tokio-rs/bytes) from 0.6.0 to 1.0.0.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v0.6.0...v1.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-23 20:32:36 +00:00
8babdb978e Merge pull request #207 from vbrandl/dependabot/cargo/git2-0.13.14
Bump git2 from 0.13.12 to 0.13.14
2020-12-23 21:32:20 +01:00
b3388912c2 Merge pull request #203 from vbrandl/dependabot/cargo/serde-1.0.118
Bump serde from 1.0.117 to 1.0.118
2020-12-23 21:31:41 +01:00
bce511ce0b Merge pull request #202 from vbrandl/dependabot/cargo/serde_json-1.0.60
Bump serde_json from 1.0.59 to 1.0.60
2020-12-23 21:31:25 +01:00
50e36769d1 Merge pull request #201 from vbrandl/dependabot/cargo/actix-web-3.3.2
Bump actix-web from 3.3.1 to 3.3.2
2020-12-23 21:31:09 +01:00
9477338331 Bump git2 from 0.13.12 to 0.13.14
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.12 to 0.13.14.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.12...0.13.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-22 04:18:08 +00:00
c1d0930354 Bump serde from 1.0.117 to 1.0.118
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.117 to 1.0.118.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.117...v1.0.118)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-07 04:17:13 +00:00
688067e5c5 Bump serde_json from 1.0.59 to 1.0.60
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.59 to 1.0.60.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.59...v1.0.60)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-03 04:16:41 +00:00
529f36dc40 Bump actix-web from 3.3.1 to 3.3.2
Bumps [actix-web](https://github.com/actix/actix-web) from 3.3.1 to 3.3.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-v3.3.1...web-v3.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-02 04:17:45 +00:00
d8fdabfca6 Merge pull request #200 from vbrandl/dependabot/cargo/actix-web-3.3.1
Bump actix-web from 3.2.0 to 3.3.1
2020-11-30 23:37:56 +01:00
8060b80ae6 Bump actix-web from 3.2.0 to 3.3.1
Bumps [actix-web](https://github.com/actix/actix-web) from 3.2.0 to 3.3.1.
- [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-v3.2.0...web-v3.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-30 04:17:12 +00:00
15965c5b5f Bump version (v0.15.0)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2020-11-24 19:34:20 +01:00
1eade03b63 Load env in docker-compose setup
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-24 19:33:12 +01:00
f41fbc8baf Fix test
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-24 19:24:35 +01:00
14cd21dc1c Make paths consistent
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-24 19:13:08 +01:00
1bdee4ee36 Document new config mechanism
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-24 19:07:21 +01:00
9e33742d81 Use new config 2020-11-24 19:06:49 +01:00
8e78d13443 Make full base URL configurable 2020-11-24 19:06:42 +01:00
391fa39470 Use config and dotenv over structopt 2020-11-24 19:06:18 +01:00
e6e90214e2 Add example configurations 2020-11-24 19:05:56 +01:00
6f734b103a Ignore actual configs 2020-11-24 19:05:46 +01:00
413bb824e1 Merge pull request #198 from vbrandl/dependabot/cargo/tracing-0.1.22
All checks were successful
continuous-integration/drone/push Build is passing
Bump tracing from 0.1.21 to 0.1.22
2020-11-24 18:22:29 +01:00
58ad13dbad Bump tracing from 0.1.21 to 0.1.22
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.21 to 0.1.22.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.21...tracing-0.1.22)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-24 04:17:21 +00:00
9f8b781f7b Bump version (v0.14.5)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2020-11-23 14:47:22 +01:00
175b7c828b Cleanup cache keys
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-23 14:36:43 +01:00
002119324f Remove unused dependencies 2020-11-23 14:35:12 +01:00
df78b6f1e5 Revert "Dummy modification for audit"
All checks were successful
continuous-integration/drone/push Build is passing
This reverts commit e1bff0d280.
2020-11-23 14:21:46 +01:00
e1bff0d280 Dummy modification for audit
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-23 14:19:39 +01:00
4c9454aa9e Use different cache keys per pipeline 2020-11-23 14:19:11 +01:00
e9e57495a6 Disable nix-build
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-23 14:13:02 +01:00
b6505f6a37 Disable nix-build
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-23 14:12:32 +01:00
a2463bf657 Release binaries on github release page
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-23 14:11:36 +01:00
53cb73cd9b Use checkout@v2 2020-11-23 14:11:18 +01:00
423a3aa0b0 Split formatting and clippy checks into separate pipelines 2020-11-23 14:11:01 +01:00
7a2c6b6f06 Merge pull request #197 from vbrandl/dependabot/cargo/reqwest-0.10.9
Bump reqwest from 0.10.8 to 0.10.9
2020-11-23 12:13:19 +01:00
ffb306a7a8 Merge pull request #196 from vbrandl/dependabot/cargo/ructe-0.13.0
Bump ructe from 0.12.0 to 0.13.0
2020-11-23 12:13:08 +01:00
cef2ae2299 Merge pull request #195 from vbrandl/dependabot/cargo/futures-0.3.8
Bump futures from 0.3.7 to 0.3.8
2020-11-23 12:07:59 +01:00
b91de72d19 Remove travis
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-23 12:07:26 +01:00
fd08489587 Bump futures from 0.3.7 to 0.3.8
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.7...0.3.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-23 10:57:43 +00:00
ce0d6041ea Bump reqwest from 0.10.8 to 0.10.9
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.10.8 to 0.10.9.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.10.8...v0.10.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-23 10:57:41 +00:00
3af60a82ce Merge pull request #194 from vbrandl/dependabot/cargo/tracing-subscriber-0.2.15
Bump tracing-subscriber from 0.2.14 to 0.2.15
2020-11-23 11:56:47 +01:00
bcdf7db549 Merge pull request #189 from vbrandl/dependabot/cargo/actix-web-3.2.0
Bump actix-web from 3.1.0 to 3.2.0
2020-11-23 11:56:24 +01:00
9b2f1f4ebb Bump ructe from 0.12.0 to 0.13.0
Bumps [ructe](https://github.com/kaj/ructe) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/kaj/ructe/releases)
- [Changelog](https://github.com/kaj/ructe/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kaj/ructe/compare/v0.12.0...v0.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-16 04:19:05 +00:00
84e47237de Bump tracing-subscriber from 0.2.14 to 0.2.15
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.2.14 to 0.2.15.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.2.14...tracing-subscriber-0.2.15)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-03 04:18:03 +00:00
909f6585b5 Always return a SVG badge
All checks were successful
continuous-integration/drone/push Build is passing
2020-11-01 13:57:56 +01:00
b48d7f1492 Bump actix-web from 3.1.0 to 3.2.0
Bumps [actix-web](https://github.com/actix/actix-web) from 3.1.0 to 3.2.0.
- [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-v3.1.0...web-v3.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-30 20:02:12 +00:00
f1e9d1806f Bump version (v0.14.4)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2020-10-30 21:01:37 +01:00
8c62d01f3c Merge pull request #191 from vbrandl/feature/tracing
Use `tracing` instead of `slog` for better ergonomics
2020-10-30 21:00:46 +01:00
26a5025a32 Fix state in test
All checks were successful
continuous-integration/drone/push Build is passing
2020-10-30 17:15:09 +01:00
6f931ce46f Use tracing instead of slog for better ergonomics
All checks were successful
continuous-integration/drone/push Build is passing
2020-10-30 16:40:35 +01:00
2d46592c4a Merge pull request #190 from vbrandl/feature/structured-logging
Feature/structured logging
2020-10-30 13:24:45 +01:00
c2d496f2b4 Add logger to test state
All checks were successful
continuous-integration/drone/push Build is passing
2020-10-30 13:20:24 +01:00
19d37806f2 Remove unused import
All checks were successful
continuous-integration/drone/push Build is passing
2020-10-30 13:11:05 +01:00
b4bd9b8830 Refactor to use slog for structured logging
All checks were successful
continuous-integration/drone/push Build is passing
2020-10-30 13:03:06 +01:00
3c8227d0e9 Add slog dependencies 2020-10-30 13:02:53 +01:00
d6409c21ec Bump version (v0.14.3)
All checks were successful
continuous-integration/drone/tag Build is passing
2020-10-28 09:08:30 +01:00
990b5acbda Merge pull request #184 from vbrandl/dependabot/cargo/git2-0.13.12
Bump git2 from 0.13.11 to 0.13.12
2020-10-28 09:07:35 +01:00
f9e14e2ffd Bump git2 from 0.13.11 to 0.13.12
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.11 to 0.13.12.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.11...0.13.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-28 08:05:44 +00:00
a73afe6851 Merge pull request #186 from vbrandl/dependabot/cargo/bytes-0.6.0
Bump bytes from 0.5.6 to 0.6.0
2020-10-28 09:04:22 +01:00
20544b27d9 Bump bytes from 0.5.6 to 0.6.0
Bumps [bytes](https://github.com/tokio-rs/bytes) from 0.5.6 to 0.6.0.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v0.5.6...v0.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-27 09:32:39 +00:00
288573b1a4 Merge pull request #178 from vbrandl/dependabot/cargo/actix-web-3.1.0
Bump actix-web from 3.0.2 to 3.1.0
2020-10-27 10:31:01 +01:00
a12755d7be Merge pull request #182 from vbrandl/dependabot/cargo/structopt-0.3.20
Bump structopt from 0.3.17 to 0.3.20
2020-10-27 09:10:24 +01:00
a248531ce2 Bump actix-web from 3.0.2 to 3.1.0
Bumps [actix-web](https://github.com/actix/actix-web) from 3.0.2 to 3.1.0.
- [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-v3.0.2...web-v3.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-27 08:07:18 +00:00
de7919a031 Bump structopt from 0.3.17 to 0.3.20
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.17 to 0.3.20.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.17...v0.3.20)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-27 08:07:15 +00:00
3913039010 Merge pull request #183 from vbrandl/dependabot/cargo/serde_json-1.0.59
Bump serde_json from 1.0.57 to 1.0.59
2020-10-27 09:05:57 +01:00
078d3cdcf9 Merge pull request #185 from vbrandl/dependabot/cargo/serde-1.0.117
Bump serde from 1.0.116 to 1.0.117
2020-10-27 09:05:49 +01:00
c552a84870 Merge pull request #188 from vbrandl/dependabot/cargo/futures-0.3.7
Bump futures from 0.3.5 to 0.3.7
2020-10-27 09:05:37 +01:00
7c1a14b6ad Bump futures from 0.3.5 to 0.3.7
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.5 to 0.3.7.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.5...0.3.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-26 04:17:33 +00:00
c69b8207b8 Bump serde from 1.0.116 to 1.0.117
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.116 to 1.0.117.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.116...v1.0.117)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-16 04:22:26 +00:00
a319f400e9 Bump serde_json from 1.0.57 to 1.0.59
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.57 to 1.0.59.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.57...v1.0.59)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-13 04:19:16 +00:00
ddcb041f3f Bump version
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2020-09-19 14:23:21 +02:00
2a73370c9f Use normalize path middleware 2020-09-19 14:22:56 +02:00
689a2109fa Merge pull request #175 from vbrandl/dependabot/cargo/actix-web-3.0.2
Bump actix-web from 3.0.0 to 3.0.2
2020-09-19 14:16:00 +02:00
e82146c912 Merge pull request #174 from vbrandl/dependabot/cargo/serde-1.0.116
Bump serde from 1.0.115 to 1.0.116
2020-09-19 14:15:51 +02:00
568398f1c6 Bump actix-web from 3.0.0 to 3.0.2
Bumps [actix-web](https://github.com/actix/actix-web) from 3.0.0 to 3.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-v3.0.0...web-v3.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-16 04:18:46 +00:00
1cc6363cba Bump serde from 1.0.115 to 1.0.116
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.115 to 1.0.116.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.115...v1.0.116)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 04:18:28 +00:00
dcfca96051 Bump version
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2020-09-12 14:22:00 +02:00
981c347acf Bump version 2020-09-12 14:14:12 +02:00
22aad6ed77 Fix breaking changes 2020-09-12 14:13:19 +02:00
b06bbbba8f Upgrade actix-web to 3.0.0 2020-09-12 14:01:59 +02:00
e06e6736c0 Merge pull request #170 from vbrandl/dependabot/cargo/reqwest-0.10.8
Bump reqwest from 0.10.6 to 0.10.8
2020-09-11 19:48:23 +02:00
0abfba8b4f Bump reqwest from 0.10.6 to 0.10.8
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.10.6 to 0.10.8.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.10.6...v0.10.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-11 17:40:12 +00:00
ca87bf9282 Merge pull request #172 from vbrandl/dependabot/cargo/git2-0.13.11
Bump git2 from 0.13.5 to 0.13.11
2020-09-11 19:39:02 +02:00
4f37b101ae Merge pull request #169 from vbrandl/dependabot/cargo/structopt-0.3.17
Bump structopt from 0.3.15 to 0.3.17
2020-09-11 19:38:52 +02:00
e16f02d729 Merge pull request #166 from vbrandl/dependabot/cargo/serde-1.0.115
Bump serde from 1.0.114 to 1.0.115
2020-09-11 19:38:35 +02:00
1256996d19 Bump structopt from 0.3.15 to 0.3.17
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.15 to 0.3.17.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.15...v0.3.17)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-11 17:21:11 +00:00
c1d1551283 Bump git2 from 0.13.5 to 0.13.11
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.5 to 0.13.11.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.5...0.13.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-11 17:21:09 +00:00
26bdb3dbb5 Bump serde from 1.0.114 to 1.0.115
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.114 to 1.0.115.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.114...v1.0.115)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-11 17:20:46 +00:00
c9d959d4c5 Merge pull request #167 from vbrandl/dependabot/cargo/ructe-0.12.0
Bump ructe from 0.11.4 to 0.12.0
2020-09-11 19:19:51 +02:00
15ca2f10b8 Merge pull request #164 from vbrandl/dependabot/cargo/serde_json-1.0.57
Bump serde_json from 1.0.56 to 1.0.57
2020-09-11 19:19:40 +02:00
2a81fbe9f2 Merge pull request #161 from vbrandl/dependabot/cargo/log4rs-0.13.0
Bump log4rs from 0.12.0 to 0.13.0
2020-09-11 19:19:21 +02:00
fe276458db Merge pull request #162 from vbrandl/dependabot/cargo/badge-0.3.0
Bump badge from 0.2.0 to 0.3.0
2020-09-11 19:16:54 +02:00
73d034ff00 Bump ructe from 0.11.4 to 0.12.0
Bumps [ructe](https://github.com/kaj/ructe) from 0.11.4 to 0.12.0.
- [Release notes](https://github.com/kaj/ructe/releases)
- [Commits](https://github.com/kaj/ructe/compare/v0.11.4...v0.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 04:17:07 +00:00
63e6a3d2db Bump serde_json from 1.0.56 to 1.0.57
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.56 to 1.0.57.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.56...v1.0.57)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-27 04:17:23 +00:00
fbb5bbd20e Bump badge from 0.2.0 to 0.3.0
Bumps [badge](https://github.com/rust-lang/docs.rs) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/rust-lang/docs.rs/releases)
- [Commits](https://github.com/rust-lang/docs.rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-27 04:16:38 +00:00
7ff238fea6 Bump log4rs from 0.12.0 to 0.13.0
Bumps [log4rs](https://github.com/estk/log4rs) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/estk/log4rs/releases)
- [Changelog](https://github.com/estk/log4rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/estk/log4rs/compare/v0.12.0...v0.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-23 04:19:01 +00:00
06e9926cb5 Bump version number
All checks were successful
continuous-integration/drone/push Build is passing
2020-07-20 20:18:05 +02:00
c9a54eda49 Allow requesting badges for branches != master
This changed the cache structure to allow caching data for multiple
branches. The service still assumes a default branch named `master` but
using the `branch` get parameter, the default branch can be changed.

The 404 page for the missing `master` branch was changed to explain the
new parameter.
2020-07-20 20:14:22 +02:00
382cd73bae Merge pull request #146 from vbrandl/dependabot/cargo/reqwest-0.10.6
Bump reqwest from 0.10.4 to 0.10.6
2020-07-17 14:26:31 +02:00
8e5270a1d8 Bump reqwest from 0.10.4 to 0.10.6
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.10.4 to 0.10.6.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.10.4...v0.10.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-17 11:13:46 +00:00
fdf3fda24a Merge pull request #151 from vbrandl/dependabot/cargo/structopt-0.3.15
Bump structopt from 0.3.14 to 0.3.15
2020-07-17 13:12:29 +02:00
219099779b Merge pull request #153 from vbrandl/dependabot/cargo/serde-1.0.114
Bump serde from 1.0.110 to 1.0.114
2020-07-17 13:12:10 +02:00
7393ba54f1 Bump structopt from 0.3.14 to 0.3.15
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.14 to 0.3.15.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.14...v0.3.15)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-16 19:17:00 +00:00
c14cf28a3e Bump serde from 1.0.110 to 1.0.114
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.110 to 1.0.114.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.110...v1.0.114)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-16 19:16:22 +00:00
68a0604365 Merge pull request #154 from vbrandl/dependabot/cargo/serde_json-1.0.56
Bump serde_json from 1.0.53 to 1.0.56
2020-07-16 21:15:26 +02:00
8dc07554f6 Merge pull request #157 from vbrandl/dependabot/cargo/bytes-0.5.6
Bump bytes from 0.5.4 to 0.5.6
2020-07-16 21:15:04 +02:00
64bb6c2922 Merge pull request #158 from vbrandl/dependabot/cargo/log-0.4.11
Bump log from 0.4.8 to 0.4.11
2020-07-16 21:14:42 +02:00
4be0cdeb5f Bump log from 0.4.8 to 0.4.11
Bumps [log](https://github.com/rust-lang/log) from 0.4.8 to 0.4.11.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.8...0.4.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-16 04:17:29 +00:00
0c9da804bb Bump bytes from 0.5.4 to 0.5.6
Bumps [bytes](https://github.com/tokio-rs/bytes) from 0.5.4 to 0.5.6.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v0.5.4...v0.5.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-14 04:19:23 +00:00
f95a2a7923 Bump serde_json from 1.0.53 to 1.0.56
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.53 to 1.0.56.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.53...v1.0.56)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-30 04:15:29 +00:00
8eff7db8ae Document deletion feature
All checks were successful
continuous-integration/drone/push Build is passing
2020-05-15 14:03:17 +02:00
57df8ab209 Update dependencies
All checks were successful
continuous-integration/drone/push Build is passing
2020-05-15 13:58:57 +02:00
ffea4f21ef Update nixpkgs channel 2020-05-15 13:58:45 +02:00
0b0e88c604 Bump version number
All checks were successful
continuous-integration/drone/push Build is passing
2020-05-15 13:44:02 +02:00
c48e27c649 Merge pull request #138 from vbrandl/dependabot/cargo/log4rs-0.12.0
Bump log4rs from 0.11.0 to 0.12.0
2020-05-15 13:43:21 +02:00
dfa353c356 Bump log4rs from 0.11.0 to 0.12.0
Bumps [log4rs](https://github.com/estk/log4rs) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/estk/log4rs/releases)
- [Changelog](https://github.com/estk/log4rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/estk/log4rs/compare/v0.11.0...v0.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-15 11:37:13 +00:00
2f1209d1e0 Create folders to fix test
All checks were successful
continuous-integration/drone/push Build is passing
2020-05-15 13:34:48 +02:00
195815fc8a Merge pull request #139 from vbrandl/dependabot/cargo/serde-1.0.110
Bump serde from 1.0.106 to 1.0.110
2020-05-15 13:17:10 +02:00
4e393fdd57 Merge pull request #140 from vbrandl/dependabot/cargo/serde_json-1.0.53
Bump serde_json from 1.0.52 to 1.0.53
2020-05-15 13:17:02 +02:00
75f14f7878 Merge pull request #141 from vbrandl/dependabot/cargo/futures-0.3.5
Bump futures from 0.3.4 to 0.3.5
2020-05-15 13:16:39 +02:00
349640acc5 Implement endpoint for cache deletion
All checks were successful
continuous-integration/drone/push Build is passing
2020-05-15 13:15:54 +02:00
1d0eca90a7 Implement simple integration test 2020-05-15 12:15:18 +02:00
81bb65db4e Use async/await syntax 2020-05-15 12:15:02 +02:00
6295477ccf Bump futures from 0.3.4 to 0.3.5
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.4 to 0.3.5.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.4...0.3.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-11 04:19:54 +00:00
b7324b3b38 Bump serde_json from 1.0.52 to 1.0.53
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.52 to 1.0.53.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.52...v1.0.53)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-11 04:19:34 +00:00
e90fb7f54c Bump serde from 1.0.106 to 1.0.110
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.106 to 1.0.110.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.106...v1.0.110)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-11 04:19:10 +00:00
253de8cea2 Merge pull request #132 from vbrandl/dependabot/cargo/structopt-0.3.14
All checks were successful
continuous-integration/drone/push Build is passing
Bump structopt from 0.3.12 to 0.3.14
2020-05-01 13:18:45 +02:00
bd014301fd Merge pull request #124 from vbrandl/dependabot/cargo/number_prefix-0.4.0
Bump number_prefix from 0.3.0 to 0.4.0
2020-05-01 13:18:38 +02:00
45c0d26e33 Use new number_prefix API 2020-05-01 13:18:22 +02:00
0edceb6a7d Bump number_prefix from 0.3.0 to 0.4.0
Bumps [number_prefix](https://github.com/ogham/rust-number-prefix) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/ogham/rust-number-prefix/releases)
- [Commits](https://github.com/ogham/rust-number-prefix/compare/v0.3.0...v0.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-01 11:11:21 +00:00
056d798d61 Bump structopt from 0.3.12 to 0.3.14
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.12 to 0.3.14.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.12...v0.3.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-01 11:11:16 +00:00
96f2e9422c Merge pull request #122 from vbrandl/dependabot/cargo/serde-1.0.106
Bump serde from 1.0.105 to 1.0.106
2020-05-01 13:10:00 +02:00
df19951729 Bump serde from 1.0.105 to 1.0.106
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.105 to 1.0.106.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.105...v1.0.106)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-01 11:09:53 +00:00
bfc97dad32 Merge pull request #134 from vbrandl/dependabot/cargo/git2-0.13.5
Bump git2 from 0.13.1 to 0.13.5
2020-05-01 13:09:35 +02:00
d28ac95aa2 Merge pull request #135 from vbrandl/dependabot/cargo/ructe-0.11.4
Bump ructe from 0.9.2 to 0.11.4
2020-05-01 13:08:58 +02:00
8a0df3e52c Merge pull request #136 from vbrandl/dependabot/cargo/serde_json-1.0.52
Bump serde_json from 1.0.50 to 1.0.52
2020-05-01 13:08:49 +02:00
e2c42a5287 Merge pull request #137 from vbrandl/dependabot/cargo/actix-rt-1.1.1
Bump actix-rt from 1.0.0 to 1.1.1
2020-05-01 13:08:35 +02:00
f638124930 Bump actix-rt from 1.0.0 to 1.1.1
Bumps [actix-rt](https://github.com/actix/actix-net) from 1.0.0 to 1.1.1.
- [Release notes](https://github.com/actix/actix-net/releases)
- [Commits](https://github.com/actix/actix-net/compare/rt-1.0.0...rt-1.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-01 04:16:49 +00:00
9cabea63c3 Bump serde_json from 1.0.50 to 1.0.52
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.50 to 1.0.52.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.50...v1.0.52)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-29 04:18:02 +00:00
20074ac4e1 Bump ructe from 0.9.2 to 0.11.4
Bumps [ructe](https://github.com/kaj/ructe) from 0.9.2 to 0.11.4.
- [Release notes](https://github.com/kaj/ructe/releases)
- [Commits](https://github.com/kaj/ructe/compare/v0.9.2...v0.11.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-27 04:16:47 +00:00
0ec7bd93d8 Bump git2 from 0.13.1 to 0.13.5
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.1 to 0.13.5.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.1...0.13.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-27 04:16:26 +00:00
c1a1af0109 Bump version number
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-04 13:48:04 +02:00
2c0094670b Bump dependencies 2020-04-04 13:47:37 +02:00
58fdc32627 Merge pull request #121 from vbrandl/dependabot/cargo/git2-0.13.1
Bump git2 from 0.13.0 to 0.13.1
2020-04-04 13:45:59 +02:00
cbeca19467 Update libgit2-sys 2020-04-04 13:39:17 +02:00
4cc8bd4385 Merge pull request #119 from vbrandl/dependabot/cargo/reqwest-0.10.4
Some checks failed
continuous-integration/drone/push Build is failing
Bump reqwest from 0.10.3 to 0.10.4
2020-04-04 13:23:59 +02:00
fac1efeb7d Bump reqwest from 0.10.3 to 0.10.4
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.10.3 to 0.10.4.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.10.3...v0.10.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-04 11:22:37 +00:00
1abc2d6333 Merge pull request #120 from vbrandl/dependabot/cargo/serde_json-1.0.50
Bump serde_json from 1.0.48 to 1.0.50
2020-04-04 13:21:22 +02:00
a69c523e3c Bump git2 from 0.13.0 to 0.13.1
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/git2-curl-0.13.0...0.13.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-02 04:18:28 +00:00
766c67f723 Bump serde_json from 1.0.48 to 1.0.50
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.48 to 1.0.50.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.48...v1.0.50)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-30 04:16:59 +00:00
2f70e42f9a Add git and cacerts to docker image 2020-03-22 20:54:33 +01:00
763910b515 Bump version number 2020-03-22 20:07:20 +01:00
dca32e4317 Set proper working directory 2020-03-22 20:05:06 +01:00
c301978f0b Cache nix store for CI actions 2020-03-22 19:47:09 +01:00
97fcb5a420 Use crate version for docker image 2020-03-22 19:44:05 +01:00
724c49d056 Bump version number 2020-03-22 19:43:51 +01:00
7b5d225701 Only build the binary 2020-03-22 18:33:48 +01:00
90fc0ee584 Add nix action 2020-03-22 18:22:16 +01:00
978321e6ef Bump version number 2020-03-22 18:13:29 +01:00
7e5adbee24 Update crate dependencies 2020-03-22 18:12:50 +01:00
803f95cde8 Merge pull request #112 from vbrandl/dependabot/cargo/reqwest-0.10.3
Bump reqwest from 0.10.1 to 0.10.3
2020-03-22 17:40:14 +01:00
31fe058879 Merge pull request #116 from vbrandl/dependabot/cargo/git2-0.13.0
Bump git2 from 0.11.0 to 0.13.0
2020-03-22 17:39:51 +01:00
421c1a4164 Bump reqwest from 0.10.1 to 0.10.3
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.10.1 to 0.10.3.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.10.1...v0.10.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-22 16:39:47 +00:00
06fa568225 Bump git2 from 0.11.0 to 0.13.0
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.11.0 to 0.13.0.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/git2-curl-0.11.0...git2-curl-0.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-22 16:39:06 +00:00
520ac2442f Merge pull request #117 from vbrandl/dependabot/cargo/structopt-0.3.12
Bump structopt from 0.3.9 to 0.3.12
2020-03-22 17:38:42 +01:00
61c4b18bf7 Merge pull request #118 from vbrandl/dependabot/cargo/serde-1.0.105
Bump serde from 1.0.104 to 1.0.105
2020-03-22 17:38:17 +01:00
a3ccfdc4a3 Bump serde from 1.0.104 to 1.0.105
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.104 to 1.0.105.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.104...v1.0.105)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-22 16:38:06 +00:00
70ce0f71e2 Bump structopt from 0.3.9 to 0.3.12
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.9 to 0.3.12.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.9...v0.3.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-22 16:38:05 +00:00
ce6150c48b Merge pull request #115 from vbrandl/dependabot/cargo/log4rs-0.11.0
Bump log4rs from 0.10.0 to 0.11.0
2020-03-22 17:37:28 +01:00
95b60f3753 Merge pull request #114 from vbrandl/dependabot/cargo/vergen-3.1.0
Bump vergen from 3.0.4 to 3.1.0
2020-03-22 17:37:01 +01:00
ec9f7a3635 Merge pull request #109 from vbrandl/dependabot/cargo/serde_json-1.0.48
Bump serde_json from 1.0.47 to 1.0.48
2020-03-22 17:36:35 +01:00
9fef178a27 Apply cargo fmt 2020-03-21 13:02:53 +01:00
7af58de9fa Mention nix build in readme 2020-03-20 17:47:55 +01:00
6c414bf07d Build Docker image using nix 2020-03-20 17:47:41 +01:00
d39a81720a Add shell expression 2020-03-20 17:47:18 +01:00
9ed5a5b257 Remove unused nix expressions 2020-03-20 17:46:54 +01:00
f3c138b7d4 Add nix expression to build the project 2020-03-20 17:08:00 +01:00
51b8519fc2 Update sources 2020-03-20 17:07:44 +01:00
b1bce024de add 2020-03-18 18:14:32 +01:00
89a5e52857 Delete cargo.nix 2020-03-18 07:23:34 +01:00
da9f9263d1 Bump log4rs from 0.10.0 to 0.11.0
Bumps [log4rs](https://github.com/estk/log4rs) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/estk/log4rs/releases)
- [Changelog](https://github.com/estk/log4rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/estk/log4rs/compare/v0.10.0...v0.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-12 04:17:45 +00:00
62accd6e43 Bump vergen from 3.0.4 to 3.1.0
Bumps [vergen](https://github.com/rustyhorde/vergen) from 3.0.4 to 3.1.0.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/commits/v3.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-11 04:19:00 +00:00
210a1f4592 Commit nix stuff 2020-02-15 20:26:30 +01:00
3708768f34 Add niv expressions 2020-02-14 15:54:04 +01:00
94265ba39f Add build scripts for binary and docker image 2020-02-14 15:53:53 +01:00
7e3ca9c620 Generate working nix expression to build the nix package 2020-02-14 14:07:26 +01:00
a3c978e0fc Ignore nix output directory 2020-02-14 14:06:28 +01:00
67db10460f Bump serde_json from 1.0.47 to 1.0.48
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.47 to 1.0.48.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.47...v1.0.48)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-14 04:18:31 +00:00
615f71bfd7 Add nix build expression and crate hashes 2020-02-13 00:15:41 +01:00
1010d5cf0d Bump version number 2020-02-12 21:02:13 +01:00
6896a22409 Handle non-existent master branch 2020-02-12 20:56:47 +01:00
3c2f06ebae Merge pull request #89 from vbrandl/dependabot/cargo/git2-0.11.0
Bump git2 from 0.9.1 to 0.11.0
2020-02-12 20:28:01 +01:00
3c945f5762 Bump git2 from 0.9.1 to 0.11.0
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.9.1 to 0.11.0.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/libgit2-sys-0.9.1...git2-curl-0.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-12 19:17:59 +00:00
903abdefdc Remove unnecessray clone 2020-02-12 20:17:55 +01:00
01689fc89e Merge pull request #99 from vbrandl/dependabot/cargo/bytes-0.5.4
Bump bytes from 0.4.12 to 0.5.4
2020-02-12 20:16:34 +01:00
ede937d651 Bump bytes from 0.4.12 to 0.5.4
Bumps [bytes](https://github.com/tokio-rs/bytes) from 0.4.12 to 0.5.4.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v0.4.12...v0.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-12 19:11:52 +00:00
1805d86048 Merge branch 'master' of github.com:vbrandl/hoc 2020-02-12 20:10:14 +01:00
a81de6f89c Merge branch 'feature/dependency-upgrades' 2020-02-12 20:08:24 +01:00
dfc49c6b64 Update futures, actix and request to next major version, refactor to use async/await 2020-02-12 19:45:18 +01:00
c7cde6222a Merge remote-tracking branch 'github/dependabot/cargo/actix-web-2.0.0' into dependabot/cargo/futures-0.3.1 2020-02-12 18:47:34 +01:00
fb889aa0ec Merge pull request #108 from vbrandl/dependabot/cargo/serde_json-1.0.47
Bump serde_json from 1.0.44 to 1.0.47
2020-02-12 17:59:40 +01:00
36f29a410b Bump serde_json from 1.0.44 to 1.0.47
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.44 to 1.0.47.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.44...v1.0.47)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-12 16:59:26 +00:00
e65efb5ea1 Merge pull request #104 from vbrandl/dependabot/cargo/structopt-0.3.9
Bump structopt from 0.3.7 to 0.3.9
2020-02-12 17:58:02 +01:00
2127dbe879 Merge pull request #102 from vbrandl/dependabot/cargo/log4rs-0.10.0
Bump log4rs from 0.9.0 to 0.10.0
2020-02-12 17:57:52 +01:00
9fe0c080c7 Merge pull request #101 from vbrandl/dependabot/cargo/ructe-0.9.2
Bump ructe from 0.9.0 to 0.9.2
2020-02-12 17:57:42 +01:00
5f132ed0c8 Bump structopt from 0.3.7 to 0.3.9
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.7 to 0.3.9.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.7...v0.3.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-03 04:19:56 +00:00
5fe25b83e1 Bump log4rs from 0.9.0 to 0.10.0
Bumps [log4rs](https://github.com/estk/log4rs) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/estk/log4rs/releases)
- [Changelog](https://github.com/estk/log4rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/estk/log4rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 04:18:26 +00:00
72655edcfc Bump ructe from 0.9.0 to 0.9.2
Bumps [ructe](https://github.com/kaj/ructe) from 0.9.0 to 0.9.2.
- [Release notes](https://github.com/kaj/ructe/releases)
- [Commits](https://github.com/kaj/ructe/compare/v0.9.0...v0.9.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-27 04:18:28 +00:00
2ef4412f0a Merge pull request #91 from vbrandl/dependabot/cargo/serde-1.0.104
Some checks reported errors
continuous-integration/drone/push Build was killed
Bump serde from 1.0.103 to 1.0.104
2020-01-10 13:32:11 +01:00
3863a870c5 Bump serde from 1.0.103 to 1.0.104
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.103 to 1.0.104.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.103...v1.0.104)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-10 11:29:48 +00:00
7e29eab063 Merge pull request #93 from vbrandl/dependabot/cargo/ructe-0.9.0
Bump ructe from 0.8.0 to 0.9.0
2020-01-10 12:27:34 +01:00
303445f3ad Merge pull request #87 from vbrandl/dependabot/cargo/serde_json-1.0.44
Bump serde_json from 1.0.42 to 1.0.44
2020-01-10 12:26:58 +01:00
6a03ae9fff Merge pull request #86 from vbrandl/dependabot/cargo/log4rs-0.9.0
Bump log4rs from 0.8.3 to 0.9.0
2020-01-10 12:20:50 +01:00
9ac60b8a26 Bump ructe from 0.8.0 to 0.9.0
Bumps [ructe](https://github.com/kaj/ructe) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/kaj/ructe/releases)
- [Commits](https://github.com/kaj/ructe/compare/v0.8.0...v0.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-10 11:20:16 +00:00
d2c23ebf4f Bump serde_json from 1.0.42 to 1.0.44
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.42 to 1.0.44.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.42...v1.0.44)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-10 11:20:06 +00:00
d0ddc7f62d Merge pull request #95 from vbrandl/dependabot/cargo/structopt-0.3.7
Bump structopt from 0.3.5 to 0.3.7
2020-01-10 12:18:42 +01:00
164c97f453 Bump structopt from 0.3.5 to 0.3.7
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.5 to 0.3.7.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.5...v0.3.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-10 11:11:57 +00:00
c702bec8e2 Merge pull request #96 from vbrandl/dependabot/cargo/http-0.1.21
[Security] Bump http from 0.1.17 to 0.1.21
2020-01-10 11:55:39 +01:00
2c002a1865 Fix clippy lint
Some checks reported errors
continuous-integration/drone/push Build was killed
2020-01-10 11:46:30 +01:00
95efa4d875 Remove unnecessray clone
Some checks reported errors
continuous-integration/drone/push Build was killed
2020-01-10 11:40:14 +01:00
65f1575045 [Security] Bump http from 0.1.17 to 0.1.21
Bumps [http](https://github.com/hyperium/http) from 0.1.17 to 0.1.21. **This update includes security fixes.**
- [Release notes](https://github.com/hyperium/http/releases)
- [Changelog](https://github.com/hyperium/http/blob/v0.1.21/CHANGELOG.md)
- [Commits](https://github.com/hyperium/http/compare/v0.1.17...v0.1.21)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 20:04:27 +00:00
9f95ae74a4 Bump actix-web from 1.0.9 to 2.0.0
Bumps [actix-web](https://github.com/actix/actix-web) from 1.0.9 to 2.0.0.
- [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.9...web-v2.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-26 04:20:46 +00:00
37159f8909 Fix path pattern
Some checks are pending
continuous-integration/drone/push Build is pending
2019-12-11 19:38:56 +01:00
0142425f1e Bump log4rs from 0.8.3 to 0.9.0
Bumps [log4rs](https://github.com/estk/log4rs) from 0.8.3 to 0.9.0.
- [Release notes](https://github.com/estk/log4rs/releases)
- [Changelog](https://github.com/estk/log4rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/estk/log4rs/compare/v0.8.3...v0.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-02 04:23:17 +00:00
b72641221b Merge pull request #80 from vbrandl/dependabot/cargo/serde_json-1.0.42
Some checks are pending
continuous-integration/drone/push Build is pending
Bump serde_json from 1.0.41 to 1.0.42
2019-11-25 17:44:24 +01:00
50d985ffd4 Bump serde_json from 1.0.41 to 1.0.42
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.41 to 1.0.42.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.41...v1.0.42)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-25 16:43:36 +00:00
8b0cc49724 Merge pull request #81 from vbrandl/dependabot/cargo/serde-1.0.103
Bump serde from 1.0.101 to 1.0.103
2019-11-25 17:42:26 +01:00
6d0d53af1b Bump serde from 1.0.101 to 1.0.103
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.101 to 1.0.103.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.101...v1.0.103)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-25 16:42:03 +00:00
b666a3e3b3 Bump futures from 0.1.29 to 0.3.1
Bumps [futures](https://github.com/rust-lang-nursery/futures-rs) from 0.1.29 to 0.3.1.
- [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.29...0.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-25 16:41:24 +00:00
f5b37ba700 Merge pull request #79 from vbrandl/dependabot/cargo/serde_derive-1.0.103
Bump serde_derive from 1.0.101 to 1.0.103
2019-11-25 17:40:49 +01:00
beb3c8330c Merge pull request #77 from vbrandl/dependabot/cargo/actix-web-1.0.9
Bump actix-web from 1.0.8 to 1.0.9
2019-11-25 17:40:13 +01:00
34ee7e3853 Merge pull request #74 from vbrandl/dependabot/cargo/ructe-0.8.0
Bump ructe from 0.7.2 to 0.8.0
2019-11-25 17:40:02 +01:00
84cf8b9a6f Merge pull request #82 from vbrandl/dependabot/cargo/structopt-0.3.5
Bump structopt from 0.3.3 to 0.3.5
2019-11-25 17:39:29 +01:00
9ef0337605 Apply cargo fmt
Some checks are pending
continuous-integration/drone/push Build is pending
2019-11-25 17:35:00 +01:00
bbf5bba490 Reduce number of parameters
Some checks are pending
continuous-integration/drone/push Build is pending
2019-11-25 17:27:16 +01:00
9991f6c545 Rollback changes 2019-11-25 17:25:43 +01:00
37e3c5ee72 Change to test cargo audit
Some checks are pending
continuous-integration/drone/push Build is pending
2019-11-25 16:57:59 +01:00
edab6fd3dd Don't run the tool in CI 2019-11-25 16:55:18 +01:00
97197190f5 Use actions-rs and caching
Some checks are pending
continuous-integration/drone/push Build is pending
2019-11-25 16:53:06 +01:00
4959fabd29 Run audit if deps changed, on merge requests and scheduled
Some checks are pending
continuous-integration/drone/push Build is pending
2019-11-25 16:50:17 +01:00
fecd5d0b6a Bump structopt from 0.3.3 to 0.3.5
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.3 to 0.3.5.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.3...v0.3.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-25 04:19:40 +00:00
1060edaebe Bump serde_derive from 1.0.101 to 1.0.103
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.101 to 1.0.103.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.101...v1.0.103)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-25 04:18:37 +00:00
bc9f411297 Bump actix-web from 1.0.8 to 1.0.9
Bumps [actix-web](https://github.com/actix/actix-web) from 1.0.8 to 1.0.9.
- [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.8...web-v1.0.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-14 04:21:38 +00:00
7fc920cddd Bump version number
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/tag Build is pending
2019-11-08 17:17:55 +01:00
6a4c1edf9e Bump ructe from 0.7.2 to 0.8.0
Bumps [ructe](https://github.com/kaj/ructe) from 0.7.2 to 0.8.0.
- [Release notes](https://github.com/kaj/ructe/releases)
- [Commits](https://github.com/kaj/ructe/compare/v0.7.2...v0.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-07 04:22:25 +00:00
c1ea45d517 Merge pull request #68 from vbrandl/dependabot/cargo/reqwest-0.9.22
Some checks reported errors
continuous-integration/drone/push Build was killed
Bump reqwest from 0.9.20 to 0.9.22
2019-10-14 15:37:50 +02:00
0b729da42f Merge pull request #65 from vbrandl/dependabot/cargo/actix-web-1.0.8
Bump actix-web from 1.0.7 to 1.0.8
2019-10-14 15:37:35 +02:00
c0d0aa2176 Bump reqwest from 0.9.20 to 0.9.22
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.20 to 0.9.22.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/v0.9.22/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.20...v0.9.22)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-14 13:35:53 +00:00
41159c4ba4 Merge pull request #63 from vbrandl/dependabot/cargo/serde-1.0.101
Bump serde from 1.0.100 to 1.0.101
2019-10-14 15:34:09 +02:00
b40b6bcad2 Bump serde from 1.0.100 to 1.0.101
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.100 to 1.0.101.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.100...v1.0.101)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-14 13:31:42 +00:00
6e86f49585 Merge pull request #67 from vbrandl/dependabot/cargo/serde_json-1.0.41
Bump serde_json from 1.0.40 to 1.0.41
2019-10-14 15:29:52 +02:00
c8c73b6b83 Bump serde_json from 1.0.40 to 1.0.41
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.40 to 1.0.41.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.40...v1.0.41)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-14 13:25:55 +00:00
c6cc956f4d Merge pull request #69 from vbrandl/dependabot/cargo/structopt-0.3.3
Bump structopt from 0.3.1 to 0.3.3
2019-10-14 15:23:19 +02:00
e37489d2cb Merge pull request #62 from vbrandl/dependabot/cargo/serde_derive-1.0.101
Bump serde_derive from 1.0.100 to 1.0.101
2019-10-14 15:21:43 +02:00
8246be996e Bump structopt from 0.3.1 to 0.3.3
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.1 to 0.3.3.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.1...v0.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-11 05:01:25 +00:00
1f32f3eda4 Bump actix-web from 1.0.7 to 1.0.8
Bumps [actix-web](https://github.com/actix/actix-web) from 1.0.7 to 1.0.8.
- [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.7...web-v1.0.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-26 04:24:19 +00:00
ab6c317241 Bump serde_derive from 1.0.100 to 1.0.101
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.100 to 1.0.101.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.100...v1.0.101)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-17 04:23:34 +00:00
1223d429db Merge pull request #60 from vbrandl/vbrandl-patch-1
All checks were successful
continuous-integration/drone/push Build is passing
Add Github actions
2019-09-09 21:39:32 +02:00
9613aa7848 Add Github actions 2019-09-09 21:39:16 +02:00
334fa8ced5 Bump version number
All checks were successful
continuous-integration/drone/push Build is passing
2019-09-09 18:19:53 +02:00
062343dd32 Merge pull request #57 from vbrandl/dependabot/cargo/serde-1.0.100
Bump serde from 1.0.99 to 1.0.100
2019-09-09 18:18:15 +02:00
bdb2a151fa Merge pull request #56 from vbrandl/dependabot/cargo/futures-0.1.29
Bump futures from 0.1.28 to 0.1.29
2019-09-09 18:17:04 +02:00
7e66393966 Bump serde from 1.0.99 to 1.0.100
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.99 to 1.0.100.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.99...v1.0.100)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 16:16:33 +00:00
32ac5ca0d8 Merge pull request #58 from vbrandl/dependabot/cargo/structopt-0.3.1
Bump structopt from 0.2.18 to 0.3.1
2019-09-09 18:15:19 +02:00
b3b4cd0e42 Merge pull request #59 from vbrandl/dependabot/cargo/serde_derive-1.0.100
Bump serde_derive from 1.0.99 to 1.0.100
2019-09-09 18:15:07 +02:00
be08b87bbb Bump serde_derive from 1.0.99 to 1.0.100
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.99 to 1.0.100.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.99...v1.0.100)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 04:25:47 +00:00
cf4d427b96 Bump structopt from 0.2.18 to 0.3.1
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.2.18 to 0.3.1.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.2.18...v0.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 04:25:23 +00:00
b5ebc54372 Bump futures from 0.1.28 to 0.1.29
Bumps [futures](https://github.com/rust-lang-nursery/futures-rs) from 0.1.28 to 0.1.29.
- [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.28...0.1.29)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-06 04:23:07 +00:00
231741629e Merge pull request #53 from vbrandl/dependabot/cargo/actix-web-1.0.7
All checks were successful
continuous-integration/drone/push Build is passing
Bump actix-web from 1.0.5 to 1.0.7
2019-08-30 11:22:26 +02:00
135c5756b1 Merge pull request #54 from vbrandl/dependabot/cargo/ructe-0.7.2
Bump ructe from 0.7.0 to 0.7.2
2019-08-30 11:21:07 +02:00
79cfee5fa5 Bump ructe from 0.7.0 to 0.7.2
Bumps [ructe](https://github.com/kaj/ructe) from 0.7.0 to 0.7.2.
- [Release notes](https://github.com/kaj/ructe/releases)
- [Commits](https://github.com/kaj/ructe/compare/v0.7.0...v0.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-29 04:27:17 +00:00
1c9b5db4e1 Bump actix-web from 1.0.5 to 1.0.7
Bumps [actix-web](https://github.com/actix/actix-web) from 1.0.5 to 1.0.7.
- [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.5...web-v1.0.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-29 04:26:47 +00:00
6e0e452395 Bump version number
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2019-08-28 20:21:56 +02:00
9e44731650 Merge pull request #50 from vbrandl/dependabot/cargo/reqwest-0.9.20
Bump reqwest from 0.9.19 to 0.9.20
2019-08-28 20:20:37 +02:00
f673d71387 Bump reqwest from 0.9.19 to 0.9.20
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.19 to 0.9.20.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/v0.9.20/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.19...v0.9.20)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-28 18:20:05 +00:00
eda1822dce Merge pull request #51 from vbrandl/dependabot/cargo/lazy_static-1.4.0
Bump lazy_static from 1.3.0 to 1.4.0
2019-08-28 20:18:56 +02:00
fb64af3456 Bump lazy_static from 1.3.0 to 1.4.0
Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases)
- [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/compare/1.3.0...1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-28 18:18:32 +00:00
0837284798 Merge pull request #48 from vbrandl/dependabot/cargo/serde-1.0.99
Bump serde from 1.0.98 to 1.0.99
2019-08-28 20:18:24 +02:00
a7039f15b5 Merge pull request #52 from vbrandl/dependabot/cargo/spin-0.5.2
[Security] Bump spin from 0.5.0 to 0.5.2
2019-08-28 20:16:54 +02:00
b1be281982 [Security] Bump spin from 0.5.0 to 0.5.2
Bumps [spin](https://github.com/mvdnes/spin-rs) from 0.5.0 to 0.5.2. **This update includes a security fix.**
- [Release notes](https://github.com/mvdnes/spin-rs/releases)
- [Commits](https://github.com/mvdnes/spin-rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-28 17:22:32 +00:00
2795995f58 Bump serde from 1.0.98 to 1.0.99
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.98 to 1.0.99.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.98...v1.0.99)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-28 07:43:01 +00:00
913cc9dc75 Merge pull request #47 from vbrandl/dependabot/cargo/serde_derive-1.0.99
Bump serde_derive from 1.0.98 to 1.0.99
2019-08-28 09:27:35 +02:00
645d6e4a2b Bump serde_derive from 1.0.98 to 1.0.99
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.98 to 1.0.99.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.98...v1.0.99)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-28 07:23:42 +00:00
e455a89de4 Fix Docker TLS certdir
All checks were successful
continuous-integration/drone/push Build is passing
2019-08-28 09:14:17 +02:00
f2cae46624 Update CI script for new docker version
All checks were successful
continuous-integration/drone/push Build is passing
2019-08-02 15:14:31 +02:00
f47cbbe81a Merge pull request #44 from vbrandl/dependabot/cargo/serde_derive-1.0.98
All checks were successful
continuous-integration/drone/push Build is passing
Bump serde_derive from 1.0.97 to 1.0.98
2019-08-02 15:01:12 +02:00
85f90c0bdb Bump serde_derive from 1.0.97 to 1.0.98
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.97 to 1.0.98.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.97...v1.0.98)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-02 13:00:35 +00:00
9143e5dbf8 Merge pull request #45 from vbrandl/dependabot/cargo/serde-1.0.98
Bump serde from 1.0.97 to 1.0.98
2019-08-02 14:59:02 +02:00
865e3c7bbd Merge pull request #46 from vbrandl/dependabot/cargo/log-0.4.8
Bump log from 0.4.7 to 0.4.8
2019-08-02 14:58:53 +02:00
5ebdd4067c Bump version number
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2019-07-29 21:50:21 +02:00
55a1405e71 Enable NormalizePath middleware
This allows double slashes in paths
2019-07-29 21:49:25 +02:00
1436336b6a Bump log from 0.4.7 to 0.4.8
Bumps [log](https://github.com/rust-lang/log) from 0.4.7 to 0.4.8.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang-nursery/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-29 04:34:22 +00:00
5a74306e49 Bump serde from 1.0.97 to 1.0.98
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.97 to 1.0.98.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.97...v1.0.98)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-29 04:33:55 +00:00
614e5a6da5 Bump version number
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2019-07-22 22:27:19 +02:00
0128e267cc Use async client to check if a repo exists 2019-07-22 22:26:37 +02:00
c3dffac5da Use async client 2019-07-22 22:25:55 +02:00
aaaff22907 Merge pull request #42 from vbrandl/dependabot/cargo/reqwest-0.9.19
Bump reqwest from 0.9.17 to 0.9.19
2019-07-22 21:39:45 +02:00
ddfcbf11f1 Bump reqwest from 0.9.17 to 0.9.19
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.9.17 to 0.9.19.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.9.17...v0.9.19)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-22 04:28:01 +00:00
3bee454548 Bump version number
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2019-07-19 17:03:24 +02:00
9cff6f1f13 Merge pull request #40 from vbrandl/dependabot/cargo/serde-1.0.97
Bump serde from 1.0.93 to 1.0.97
2019-07-19 16:43:35 +02:00
c946c5d0b4 Bump serde from 1.0.93 to 1.0.97
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.93 to 1.0.97.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.93...v1.0.97)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-19 14:41:50 +00:00
88ae90af95 Merge pull request #39 from vbrandl/dependabot/cargo/actix-web-1.0.5
Bump actix-web from 1.0.3 to 1.0.5
2019-07-19 16:40:36 +02:00
9f783dffa8 Merge pull request #41 from vbrandl/dependabot/cargo/ructe-0.7.0
Bump ructe from 0.6.4 to 0.7.0
2019-07-19 16:40:23 +02:00
2cdf64ed80 Bump ructe from 0.6.4 to 0.7.0
Bumps [ructe](https://github.com/kaj/ructe) from 0.6.4 to 0.7.0.
- [Release notes](https://github.com/kaj/ructe/releases)
- [Commits](https://github.com/kaj/ructe/compare/v0.6.4...v0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-19 14:40:13 +00:00
9e024b530e Merge pull request #38 from vbrandl/dependabot/cargo/serde_derive-1.0.97
Bump serde_derive from 1.0.94 to 1.0.97
2019-07-19 16:38:43 +02:00
0db7b26541 Bump actix-web from 1.0.3 to 1.0.5
Bumps [actix-web](https://github.com/actix/actix-web) from 1.0.3 to 1.0.5.
- [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.3...web-v1.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-18 15:13:53 +00:00
009d2c4813 Bump serde_derive from 1.0.94 to 1.0.97
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.94 to 1.0.97.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.94...v1.0.97)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-18 15:13:40 +00:00
f0ed6c2e23 Merge pull request #35 from vbrandl/dependabot/cargo/log-0.4.7
All checks were successful
continuous-integration/drone/push Build is passing
Bump log from 0.4.6 to 0.4.7
2019-07-14 14:25:47 +02:00
d16a21e74e Bump log from 0.4.6 to 0.4.7
Bumps [log](https://github.com/rust-lang/log) from 0.4.6 to 0.4.7.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang-nursery/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.6...0.4.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-11 06:35:54 +00:00
7e721ac212 Fork in for loop
[ci skip]
2019-07-07 21:01:57 +02:00
4eb5d06cd1 Fork in loop
[ci skip]
2019-07-07 20:33:08 +02:00
b71207ca51 Add helper scripts for finding and loading active repos (on github)
[ci skip]
2019-07-07 20:22:32 +02:00
f3902f800f Remove migration subcommand
All checks were successful
continuous-integration/drone/push Build is passing
2019-07-07 18:27:50 +02:00
b8e454762e Bump version number
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2019-07-07 14:53:51 +02:00
268734efdd Merge branch 'feature/commit-count'
Closes #33
2019-07-07 14:53:10 +02:00
c71925f61e Add migration subcommand 2019-07-07 14:52:42 +02:00
c5bbd14a05 Update documentation for the JSON endpoint 2019-07-07 13:36:14 +02:00
a239a3f80b Calculate number of commits
The number of commits is shown in the overview page and returned in the
JSON response.

Closes #33
2019-07-07 13:30:17 +02:00
00b4e60341 Add parse error 2019-07-07 13:29:26 +02:00
ed1cafafd0 Show commit count in overview page 2019-07-07 13:29:03 +02:00
bdb10fd54a Add commit count to the cache struct 2019-07-07 13:28:43 +02:00
1f01c3b964 Bump version number
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2019-07-05 12:50:55 +02:00
3f94789b8b Merge pull request #32 from vbrandl/dependabot/cargo/actix-web-1.0.3
Bump actix-web from 1.0.2 to 1.0.3
2019-07-05 12:49:40 +02:00
e4f8604861 Bump actix-web from 1.0.2 to 1.0.3
All checks were successful
continuous-integration/drone/push Build is passing
Bumps [actix-web](https://github.com/actix/actix-web) from 1.0.2 to 1.0.3.
- [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.2...web-v1.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-03 04:24:43 +00:00
25a179dad6 Bump version number
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2019-07-02 17:13:51 +02:00
6ee44f7ba3 Revert "Update dependencies"
This reverts commit 7e13f93ee3. This
commit broke following builds. It was impossible to clone new
repositories.

Reverting the commit closes #31.
2019-07-02 17:11:58 +02:00
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
44 changed files with 6411 additions and 2300 deletions

7
.env.example Normal file
View File

@ -0,0 +1,7 @@
HOC_REPODIR='./repos'
HOC_CACHEDIR='./cache'
HOC_PORT=8080
HOC_HOST='0.0.0.0'
HOC_WORKERS=4
HOC_BASE_URL='http://0.0.0.0:8080'

10
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
assignees:
- vbrandl

28
.github/workflows/audit.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Security audit
on:
schedule:
- cron: '0 1 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
pull_request:
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache cargo registry, index and build directory
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: audit-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

76
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,76 @@
name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
publish:
name: Publishing for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
rust: [stable]
include:
- os: macos-latest
artifact_prefix: macos
target: x86_64-apple-darwin
binary_postfix: ""
- os: ubuntu-latest
artifact_prefix: linux
target: x86_64-unknown-linux-gnu
binary_postfix: ""
- os: windows-latest
artifact_prefix: windows
target: x86_64-pc-windows-msvc
binary_postfix: ".exe"
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Cache cargo registry, index and build directory
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: release-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cargo build
uses: actions-rs/cargo@v1
with:
command: build
toolchain: ${{ matrix.rust }}
args: --release --target ${{ matrix.target }}
- name: Packaging final binary
shell: bash
run: |
cd target/${{ matrix.target }}/release
strip hoc${{ matrix.binary_postfix }}
tar czvf hoc-${{ matrix.artifact_prefix }}.tar.gz hoc${{ matrix.binary_postfix }}
if [[ ${{ runner.os }} == 'Windows' ]]; then
certutil -hashfile hoc-${{ matrix.artifact_prefix }}.tar.gz sha256 | grep -E [A-Fa-f0-9]{64} > hoc-${{ matrix.artifact_prefix }}.sha256
else
shasum -a 256 hoc-${{ matrix.artifact_prefix }}.tar.gz > hoc-${{ matrix.artifact_prefix }}.sha256
fi
- name: Releasing assets
uses: softprops/action-gh-release@v1
with:
files: |
target/${{ matrix.target }}/release/hoc-${{ matrix.artifact_prefix }}.tar.gz
target/${{ matrix.target }}/release/hoc-${{ matrix.artifact_prefix }}.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

98
.github/workflows/rust.yml vendored Normal file
View File

@ -0,0 +1,98 @@
on: [push, pull_request]
jobs:
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt
- name: Cache cargo registry, index and build directory
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: rustfmt-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check Formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt
- name: Cache cargo registry, index and build directory
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: clippy-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Clippy Linting
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
test:
name: Test Suite
runs-on: ${{ matrix.os }}
strategy:
matrix:
# add windows-latest when it is clear why tests are failing
# os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest]
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Cache cargo registry, index and build directory
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: test-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run Tests
uses: actions-rs/cargo@v1
with:
command: test

2
.gitignore vendored
View File

@ -3,3 +3,5 @@
repos repos
cache cache
hoc.log hoc.log
result
.env

View File

@ -1,51 +0,0 @@
image: docker:stable
services:
- docker:dind
stages:
- build
- release
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
CONTAINER_BUILDER_IMAGE: $CI_REGISTRY_IMAGE:builder-latest
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
before_script:
- export CONTAINER_TAG_IMAGE="$CI_REGISTRY_IMAGE:${CI_COMMIT_TAG:1}"
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
build:
stage: build
script:
- docker pull $CONTAINER_TEST_IMAGE || true
- docker pull $CONTAINER_RELEASE_IMAGE || true
- docker pull $CONTAINER_TAG_IMAGE || true
- docker pull $CONTAINER_BUILDER_IMAGE || true
- docker build --pull -t $CONTAINER_BUILDER_IMAGE --target builder .
- docker build --pull -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_BUILDER_IMAGE
- docker push $CONTAINER_TEST_IMAGE
release-image:
stage: release
script:
- docker pull $CONTAINER_TEST_IMAGE
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
- docker push $CONTAINER_RELEASE_IMAGE
only:
- master
release-tag:
stage: release
script:
- docker pull $CONTAINER_TEST_IMAGE
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_TAG_IMAGE
- docker push $CONTAINER_TAG_IMAGE
only:
- /^v\d+\.\d+\.\d+/
except:
- branch

View File

@ -1,17 +0,0 @@
language: rust
rust:
- stable
- beta
- nightly
cache:
- cargo
matrix:
allow_failures:
- rust: nightly
notifications:
email:
on_failure: always

3166
Cargo.lock generated

File diff suppressed because it is too large Load Diff

3357
Cargo.nix Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,46 @@
[package] [package]
name = "hoc" name = "hoc"
version = "0.9.2" version = "0.18.0"
authors = ["Valentin Brandl <vbrandl@riseup.net>"] authors = ["Valentin Brandl <vbrandl@riseup.net>"]
edition = "2018" edition = "2018"
build = "build.rs" build = "build.rs"
[lib]
path = "src/lib.rs"
[[bin]]
path = "src/main.rs"
name = "hoc"
[dependencies] [dependencies]
actix-web = "1.0.0" actix-rt = "2.2.0"
badge = "0.2.0" actix-web = "4.0.0-beta.8"
bytes = "0.4.12" badge = "0.3.0"
futures = "0.1.27" bytes = "1.0.1"
git2 = "0.9.1" config = { version = "0.11.0", features = ["toml"] }
lazy_static = "1.3.0" dotenv = "0.15.0"
log = "0.4.6" futures = "0.3.17"
log4rs = "0.8.3" git2 = "0.13.20"
number_prefix = "0.3.0" lazy_static = "1.4.0"
openssl-probe = "0.1.2" number_prefix = "0.4.0"
reqwest = "0.9.17" openssl-probe = "0.1.4"
serde = "1.0.91" reqwest = "0.11.4"
serde_derive = "1.0.91" serde = "1.0.126"
serde_json = "1.0.39" serde_derive = "1.0.123"
structopt = "0.2.16" serde_json = "1.0.64"
tracing = "0.1.26"
tracing-actix-web = "0.4.0-beta.11"
tracing-bunyan-formatter = "0.2.4"
tracing-futures = "0.2.5"
tracing-log = "0.1.2"
tracing-subscriber = { version = "0.2.19", features = ["registry", "env-filter"] }
[build-dependencies] [build-dependencies]
ructe = "0.6.2" ructe = "0.13.4"
vergen = "3.0.4" vergen = { version = "5.1.13", default-features = false, features = ["git"] }
[dev-dependencies]
awc = "3.0.0-beta.7"
ructe = "0.13.4"
tempfile = "3.2.0"
tokio = "1.11.0"

View File

@ -1,7 +1,8 @@
FROM ekidd/rust-musl-builder:stable as builder FROM ekidd/rust-musl-builder:stable as builder
# create new cargo project # create new cargo project
RUN USER=rust cargo init --bin RUN USER=rust cargo init --lib
RUN echo 'fn main() { println!("Hello, world!"); }' >> src/main.rs
# copy build config # copy build config
COPY --chown=rust ./Cargo.lock ./Cargo.lock COPY --chown=rust ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml COPY ./Cargo.toml ./Cargo.toml

View File

@ -1,9 +1,8 @@
# Hits-of-Code # Hits-of-Code
[![Hits-of-Code](https://hitsofcode.com/github/vbrandl/hoc)](https://hitsofcode.com/view/github/vbrandl/hoc) [![Hits-of-Code](https://hitsofcode.com/github/vbrandl/hoc)](https://hitsofcode.com/github/vbrandl/hoc/view)
[![Drone build](https://drone.vbrandl.net/api/badges/vbrandl/hoc/status.svg)](https://drone.vbrandl.net/vbrandl/hoc) [![Drone build](https://drone.vbrandl.net/api/badges/vbrandl/hoc/status.svg)](https://drone.vbrandl.net/vbrandl/hoc)
[![Gitlab build](https://gitlab.com/vbrandl/hoc/badges/master/pipeline.svg)](https://gitlab.com/vbrandl/hoc/pipelines) [![Gitlab build](https://gitlab.com/vbrandl/hoc/badges/master/pipeline.svg)](https://gitlab.com/vbrandl/hoc/pipelines)
[![Travis build](https://travis-ci.org/vbrandl/hoc.svg?branch=master)](https://travis-ci.org/vbrandl/hoc)
[![dependency status](https://deps.rs/repo/github/vbrandl/hoc/status.svg)](https://deps.rs/repo/github/vbrandl/hoc) [![dependency status](https://deps.rs/repo/github/vbrandl/hoc/status.svg)](https://deps.rs/repo/github/vbrandl/hoc)
Small webservice, that returns a badge of the Hits-of-Code of a git repository, as described by [Yegor Small webservice, that returns a badge of the Hits-of-Code of a git repository, as described by [Yegor
@ -27,7 +26,11 @@ where `<service>` is one of `gitub`, `gitlab` or `bitbucket`. The HoC data can a
https://<host>/<service>/<user>/<repo>/json https://<host>/<service>/<user>/<repo>/json
``` ```
There is also an overview page available via `https://<host>/view/<service>/<user>/<repo>` There is also an overview page available via `https://<host>/<service>/<user>/<repo>/view`
To delete a repository and the cache from the server, send a `POST` request to
`https://<host>/<service>/<user>/<repo>/delete`. On the overview page, there is a button to perform this operation. It
will respond with a redirect to the overview page so the cache is rebuilt directly.
## Building ## Building
@ -45,17 +48,29 @@ $ docker build .
inside the repository. inside the repository.
I'm currently working on migrating to [nix](https://nixos.org/nix). To get a development shell, run `nix-shell`, to
build the package run `nix-build --attr package` and to build the Docker image, run `nix-build --attr dockerImage`.
## Running ## Running
Run either the binary produced by cargo, the Docker container you just built (using docker-compose) or pull the image Rename [`hoc.toml.example`](./hoc.toml.example) to `hoc.toml` or [`.env.example`](./.env.example) to `.env` and set the
from [Docker Hub](https://hub.docker.com/r/vbrandl/hits-of-code) correct value for `base_url`/`HOC_BASE_URL`. If you don't want to use a configuration or dotenv file, you can pass all
parameters directly via environment variables. For variable names see [`.env.example`](./.env.example).
To start a local instance of the service just run:
``` ```
$ docker run -it --rm vbrandl/hits-of-code --help $ HOC_BASE_URL='http://0.0.0.0:8080' ./hoc
``` ```
When running the binary directly, you need a git binary in your `PATH`. You can also use the Docker image:
```
$ docker run -p 8080:8080 --env HOC_BASE_URL='http://0.0.0.0:8080' -it --rm vbrandl/hits-of-code
```
When running the binary directly, you need a `git` binary in your `PATH`.
## License ## License

View File

@ -2,11 +2,12 @@ extern crate ructe;
extern crate vergen; extern crate vergen;
use ructe::Ructe; use ructe::Ructe;
use vergen::{generate_cargo_keys, ConstantsFlags}; use vergen::{vergen, Config, ShaKind};
fn main() { fn main() {
let flags = ConstantsFlags::SHA_SHORT; let mut config = Config::default();
generate_cargo_keys(flags).expect("Unable to generate the cargo keys!"); *config.git_mut().sha_kind_mut() = ShaKind::Short;
vergen(config).expect("Unable to generate static repo info");
Ructe::from_env() Ructe::from_env()
.expect("ructe") .expect("ructe")
.compile_templates("templates") .compile_templates("templates")

1
crate-hashes.json Normal file
View File

@ -0,0 +1 @@
{}

56
default.nix Normal file
View File

@ -0,0 +1,56 @@
{ sources ? import ./nix/sources.nix
, system ? builtins.currentSystem
}:
let
rustOverlay = import "${sources.nixpkgs-mozilla}/rust-overlay.nix";
cargo2nixOverlay = import "${sources.cargo2nix}/overlay";
pkgs = import sources.nixpkgs {
# pkgs = import <nixpkgs> {
inherit system;
overlays = [ cargo2nixOverlay rustOverlay ];
};
rustPkgs = pkgs.rustBuilder.makePackageSet' {
rustChannel = "stable";
packageFun = import ./Cargo.nix;
localPatterns =
[
''^(src|tests)(/.*)?''
''[^/]*\.(rs|toml)$''
# include other directory from the project repository
''^templates(/.*)?''
''^static(/.*)?''
''^.git.*(/.*)?''
];
# packageOverrides
};
in
rec {
inherit rustPkgs;
shell = pkgs.mkShell {
inputsFrom = pkgs.lib.mapAttrsToList (_: pkg: pkg { }) rustPkgs.noBuild.workspace;
nativeBuildInputs = with rustPkgs; [ cargo rustc ];
};
package = (rustPkgs.workspace.hoc {}).overrideAttrs (drv: {
buildInputs = drv.buildInputs or [ ] ++ [ pkgs.git ];
});
dockerImage =
pkgs.dockerTools.buildImage {
name = "vbrandl/hits-of-code";
tag = package.version;
contents =
[
package
pkgs.cacert
pkgs.gitMinimal
];
config = {
Cmd = [ "/bin/hoc" ];
WorkingDir = "/home/hoc";
};
};
}

View File

@ -1,4 +1,4 @@
version: "2" version: "3"
services: services:
hoc: hoc:
@ -9,3 +9,5 @@ services:
# ports: # ports:
# - "127.0.0.1:8080:8080" # - "127.0.0.1:8080:8080"
restart: always restart: always
env_file:
- ./.env

15
hoc.toml Normal file
View File

@ -0,0 +1,15 @@
# every parameter can also be set (or overwritten) by passing an environment
# variable namend `HOC_<PARAMETERNAME>`, e.g.
# `HOC_BASE_URL='https://hitsofcode.com' ./hoc`
# these config parameters have default values and must not explicitly be set
repodir = "./repos"
cachedir = "./cache"
port = 8080
host = "0.0.0.0"
workers = 4
# these parameters don't have default values and must be set
# this should be the public base URL of the service, e.g. `https://hitsofcode.com`
base_url = "http://0.0.0.0:8080"

15
hoc.toml.example Normal file
View File

@ -0,0 +1,15 @@
# every parameter can also be set (or overwritten) by passing an environment
# variable namend `HOC_<PARAMETERNAME>`, e.g.
# `HOC_BASE_URL='https://hitsofcode.com' ./hoc`
# these config parameters have default values and must not explicitly be set
repodir = "./repos"
cachedir = "./cache"
port = 8080
host = "0.0.0.0"
workers = 4
# these parameters don't have default values and must be set
# this should be the public base URL of the service, e.g. `https://hitsofcode.com`
base_url = "http://0.0.0.0:8080"

50
nix/sources.json Normal file
View File

@ -0,0 +1,50 @@
{
"cargo2nix": {
"branch": "master",
"description": "Convert a Cargo.lock to mkRustCrate statements for import in Nix",
"homepage": "",
"owner": "tenx-tech",
"repo": "cargo2nix",
"rev": "7bc062ccffc41dc7d3759b8b797e8b4f8dd23a15",
"sha256": "1z7xwk1hbp26aydsk3y07riy0ivwqss06n1470mvdl7allfcd1w5",
"type": "tarball",
"url": "https://github.com/tenx-tech/cargo2nix/archive/7bc062ccffc41dc7d3759b8b797e8b4f8dd23a15.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"niv": {
"branch": "master",
"description": "Easy dependency management for Nix projects",
"homepage": "https://github.com/nmattia/niv",
"owner": "nmattia",
"repo": "niv",
"rev": "98c74a80934123cb4c3bf3314567f67311eb711a",
"sha256": "1w8n54hapd4x9f1am33icvngkqns7m3hl9yair38yqq08ffwg0kn",
"type": "tarball",
"url": "https://github.com/nmattia/niv/archive/98c74a80934123cb4c3bf3314567f67311eb711a.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
"branch": "nixpkgs-unstable",
"description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to",
"homepage": "https://github.com/NixOS/nixpkgs",
"owner": "NixOS",
"repo": "nixpkgs-channels",
"rev": "f6bfb371cba2b5a02f200c2747c1fe2c72bd782f",
"sha256": "0y3hlbyvznrpr1d2vxj2511hkjg733wdnxfaib3fgy9i9jr8ivzn",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs-channels/archive/f6bfb371cba2b5a02f200c2747c1fe2c72bd782f.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs-mozilla": {
"branch": "master",
"description": "mozilla related nixpkgs (extends nixos/nixpkgs repo)",
"homepage": null,
"owner": "mozilla",
"repo": "nixpkgs-mozilla",
"rev": "e912ed483e980dfb4666ae0ed17845c4220e5e7c",
"sha256": "08fvzb8w80bkkabc1iyhzd15f4sm7ra10jn32kfch5klgl0gj3j3",
"type": "tarball",
"url": "https://github.com/mozilla/nixpkgs-mozilla/archive/e912ed483e980dfb4666ae0ed17845c4220e5e7c.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}

134
nix/sources.nix Normal file
View File

@ -0,0 +1,134 @@
# This file has been generated by Niv.
let
#
# The fetchers. fetch_<type> fetches specs of type <type>.
#
fetch_file = pkgs: spec:
if spec.builtin or true then
builtins_fetchurl { inherit (spec) url sha256; }
else
pkgs.fetchurl { inherit (spec) url sha256; };
fetch_tarball = pkgs: spec:
if spec.builtin or true then
builtins_fetchTarball { inherit (spec) url sha256; }
else
pkgs.fetchzip { inherit (spec) url sha256; };
fetch_git = spec:
builtins.fetchGit { url = spec.repo; inherit (spec) rev ref; };
fetch_builtin-tarball = spec:
builtins.trace
''
WARNING:
The niv type "builtin-tarball" will soon be deprecated. You should
instead use `builtin = true`.
$ niv modify <package> -a type=tarball -a builtin=true
''
builtins_fetchTarball { inherit (spec) url sha256; };
fetch_builtin-url = spec:
builtins.trace
''
WARNING:
The niv type "builtin-url" will soon be deprecated. You should
instead use `builtin = true`.
$ niv modify <package> -a type=file -a builtin=true
''
(builtins_fetchurl { inherit (spec) url sha256; });
#
# Various helpers
#
# The set of packages used when specs are fetched using non-builtins.
mkPkgs = sources:
let
sourcesNixpkgs =
import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) {};
hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath;
hasThisAsNixpkgsPath = <nixpkgs> == ./.;
in
if builtins.hasAttr "nixpkgs" sources
then sourcesNixpkgs
else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then
import <nixpkgs> {}
else
abort
''
Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or
add a package called "nixpkgs" to your sources.json.
'';
# The actual fetching function.
fetch = pkgs: name: spec:
if ! builtins.hasAttr "type" spec then
abort "ERROR: niv spec ${name} does not have a 'type' attribute"
else if spec.type == "file" then fetch_file pkgs spec
else if spec.type == "tarball" then fetch_tarball pkgs spec
else if spec.type == "git" then fetch_git spec
else if spec.type == "builtin-tarball" then fetch_builtin-tarball spec
else if spec.type == "builtin-url" then fetch_builtin-url spec
else
abort "ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}";
# Ports of functions for older nix versions
# a Nix version of mapAttrs if the built-in doesn't exist
mapAttrs = builtins.mapAttrs or (
f: set: with builtins;
listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set))
);
# fetchTarball version that is compatible between all the versions of Nix
builtins_fetchTarball = { url, sha256 }@attrs:
let
inherit (builtins) lessThan nixVersion fetchTarball;
in
if lessThan nixVersion "1.12" then
fetchTarball { inherit url; }
else
fetchTarball attrs;
# fetchurl version that is compatible between all the versions of Nix
builtins_fetchurl = { url, sha256 }@attrs:
let
inherit (builtins) lessThan nixVersion fetchurl;
in
if lessThan nixVersion "1.12" then
fetchurl { inherit url; }
else
fetchurl attrs;
# Create the final "sources" from the config
mkSources = config:
mapAttrs (
name: spec:
if builtins.hasAttr "outPath" spec
then abort
"The values in sources.json should not have an 'outPath' attribute"
else
spec // { outPath = fetch config.pkgs name spec; }
) config.sources;
# The "config" used by the fetchers
mkConfig =
{ sourcesFile ? ./sources.json
, sources ? builtins.fromJSON (builtins.readFile sourcesFile)
, pkgs ? mkPkgs sources
}: rec {
# The sources, i.e. the attribute set of spec name to spec
inherit sources;
# The "pkgs" (evaluated nixpkgs) to use for e.g. non-builtin fetchers
inherit pkgs;
};
in
mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); }

10
scripts/find-active.sh Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env sh
set -e
DIR=${1:-repos}
for url in $(./scripts/list.sh "${DIR}")
do
(curl "${url}" --silent | grep -q hitsofcode) && echo "${url}" &
done

21
scripts/load-active.sh Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env sh
set -e
ACTIVE=${1}
if [ -z "${ACTIVE}" ]
then
echo "Usage: $0 <list of active repos>"
exit 1
fi
while IFS= read -r url
do
imgs=$(curl "${url}" --silent | grep hitsofcode | grep -o -P 'https://camo.githubusercontent.com/[a-z0-9]+/[a-z0-9]+')
[ -z "${imgs}" ] || echo "${url}"
for img in ${imgs}
do
curl "$img" --silent > /dev/null &
done
done < "${ACTIVE}"

1
shell.nix Normal file
View File

@ -0,0 +1 @@
with import ./. { }; shell

View File

@ -1,55 +1,136 @@
use crate::Error; use crate::error::{Error, Result};
use std::{ use std::{
borrow::Cow, borrow::Cow,
collections::HashMap,
fs::{create_dir_all, File, OpenOptions}, fs::{create_dir_all, File, OpenOptions},
io::BufReader, io::BufReader,
path::Path, path::Path,
}; };
/// Enum to indicate the state of the cache /// Enum to indicate the state of the cache
#[derive(Debug)]
pub(crate) enum CacheState<'a> { pub(crate) enum CacheState<'a> {
/// Current head and cached head are the same /// Current head and cached head are the same
Current(u64), Current {
count: u64,
commits: u64,
cache: Cache<'a>,
},
/// Cached head is older than current head /// Cached head is older than current head
Old(Cache<'a>), Old {
head: String,
cache: Cache<'a>,
},
NoneForBranch(Cache<'a>),
/// No cache was found /// No cache was found
No, No,
} }
impl<'a> CacheState<'a> { impl<'a> CacheState<'a> {
pub(crate) fn read_from_file(path: impl AsRef<Path>, head: &str) -> Result<CacheState, Error> { #[instrument]
pub(crate) fn read_from_file(
path: impl AsRef<Path> + std::fmt::Debug,
branch: &str,
head: &str,
) -> Result<CacheState<'a>> {
trace!("Reading cache");
if path.as_ref().exists() { if path.as_ref().exists() {
let cache: Cache = serde_json::from_reader(BufReader::new(File::open(path)?))?; let cache: Cache = serde_json::from_reader(BufReader::new(File::open(path)?))?;
if cache.head == head { Ok(cache
Ok(CacheState::Current(cache.count)) .entries
} else { .get(branch)
Ok(CacheState::Old(cache)) .map(|c| {
} if c.head == head {
trace!("Cache is up to date");
CacheState::Current {
count: c.count,
commits: c.commits,
// TODO: get rid of clone
cache: cache.clone(),
}
} else {
trace!("Cache is out of date");
CacheState::Old {
head: c.head.to_string(),
// TODO: get rid of clone
cache: cache.clone(),
}
}
})
// TODO: get rid of clone
.unwrap_or_else(|| CacheState::NoneForBranch(cache.clone())))
} else { } else {
Ok(CacheState::No) Ok(CacheState::No)
} }
} }
pub(crate) fn calculate_new_cache(self, count: u64, head: Cow<'a, str>) -> Cache { #[instrument]
pub(crate) fn calculate_new_cache(
self,
count: u64,
commits: u64,
head: Cow<'a, str>,
branch: &'a str,
) -> Cache<'a> {
trace!("Calculating new cache");
match self { match self {
CacheState::Old(mut cache) => { CacheState::Old { mut cache, .. } => {
cache.head = head; if let Some(mut cache) = cache.entries.get_mut(branch) {
cache.count += count; cache.head = head;
cache.count += count;
cache.commits += commits;
}
cache cache
} }
CacheState::No | CacheState::Current(_) => Cache { head, count }, CacheState::Current { cache, .. } => cache,
CacheState::NoneForBranch(mut cache) => {
trace!("Creating new cache for branch");
cache.entries.insert(
branch.into(),
CacheEntry {
head,
count,
commits,
},
);
cache
}
CacheState::No => {
trace!("Creating new cache file");
let mut entries = HashMap::with_capacity(1);
entries.insert(
branch.into(),
CacheEntry {
head,
count,
commits,
},
);
Cache { entries }
}
} }
} }
} }
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize, Clone, Debug)]
pub(crate) struct Cache<'a> { pub(crate) struct Cache<'a> {
pub entries: HashMap<Cow<'a, str>, CacheEntry<'a>>,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
pub(crate) struct CacheEntry<'a> {
/// HEAD commit ref
pub head: Cow<'a, str>, pub head: Cow<'a, str>,
/// HoC value
pub count: u64, pub count: u64,
/// Number of commits
pub commits: u64,
} }
impl<'a> Cache<'a> { impl<'a> Cache<'a> {
pub(crate) fn write_to_file(&self, path: impl AsRef<Path>) -> Result<(), Error> { #[instrument]
pub(crate) fn write_to_file(&self, path: impl AsRef<Path> + std::fmt::Debug) -> Result<()> {
trace!("Persisting cache to disk");
create_dir_all(path.as_ref().parent().ok_or(Error::Internal)?)?; create_dir_all(path.as_ref().parent().ok_or(Error::Internal)?)?;
serde_json::to_writer( serde_json::to_writer(
OpenOptions::new() OpenOptions::new()

View File

@ -1,71 +1,38 @@
use crate::{error::Result, statics::OPT}; use config::{Config, ConfigError, Environment, File};
use log::LevelFilter;
use log4rs::{
append::{console::ConsoleAppender, file::FileAppender},
config::{Appender, Config, Root},
encode::pattern::PatternEncoder,
};
use std::path::PathBuf; use std::path::PathBuf;
use structopt::StructOpt;
#[derive(StructOpt, Debug)] #[derive(Debug, Deserialize)]
pub(crate) struct Opt { pub struct Settings {
#[structopt(
short = "o",
long = "outdir",
parse(from_os_str),
default_value = "./repos"
)]
/// Path to store cloned repositories /// Path to store cloned repositories
pub(crate) outdir: PathBuf, pub repodir: PathBuf,
#[structopt(
short = "c",
long = "cachedir",
parse(from_os_str),
default_value = "./cache"
)]
/// Path to store cache /// Path to store cache
pub(crate) cachedir: PathBuf, pub cachedir: PathBuf,
#[structopt(short = "p", long = "port", default_value = "8080")]
/// Port to listen on /// Port to listen on
pub(crate) port: u16, pub port: u16,
#[structopt(short = "h", long = "host", default_value = "0.0.0.0")]
/// Interface to listen on /// Interface to listen on
pub(crate) host: String, pub host: String,
#[structopt(short = "d", long = "domain", default_value = "hitsofcode.com")] /// Base URL
/// Interface to listen on pub base_url: String,
pub(crate) domain: String,
#[structopt(short = "w", long = "workers", default_value = "4")]
/// Number of worker threads /// Number of worker threads
pub(crate) workers: usize, pub workers: usize,
#[structopt(
short = "l",
long = "logfile",
parse(from_os_str),
default_value = "./hoc.log"
)]
/// The logfile
pub(crate) logfile: PathBuf,
} }
pub(crate) fn init() -> Result<()> { impl Settings {
std::env::set_var("RUST_LOG", "actix_web=info,hoc=info"); #[deprecated]
// pretty_env_logger::init(); pub fn new() -> Result<Self, ConfigError> {
openssl_probe::init_ssl_cert_env_vars(); Self::load()
let stdout = ConsoleAppender::builder().build(); }
let file = FileAppender::builder()
.encoder(Box::new(PatternEncoder::new("{d} - {m}{n}"))) pub fn load() -> Result<Self, ConfigError> {
.build(&OPT.logfile) let mut config = Config::new();
.unwrap(); config
let config = Config::builder() .merge(File::with_name("hoc.toml").required(false))?
.appender(Appender::builder().build("stdout", Box::new(stdout))) .merge(Environment::with_prefix("hoc"))?
.appender(Appender::builder().build("file", Box::new(file))) .set_default("repodir", "./repos")?
.build( .set_default("cachedir", "./cache")?
Root::builder() .set_default("workers", 4)?
.appender("stdout") .set_default("port", 8080)?
.appender("file") .set_default("host", "0.0.0.0")?;
.build(LevelFilter::Info), config.try_into()
)?; }
log4rs::init_config(config)?;
Ok(())
} }

View File

@ -1,10 +1,13 @@
use crate::error::Result; use crate::error::Result;
use std::{fs::read_dir, path::Path, result::Result as StdResult}; use std::{fs::read_dir, path::Path, result::Result as StdResult};
#[instrument]
pub(crate) fn count_repositories<P>(repo_path: P) -> Result<usize> pub(crate) fn count_repositories<P>(repo_path: P) -> Result<usize>
where where
P: AsRef<Path>, P: AsRef<Path> + std::fmt::Debug,
{ {
trace!("Counting repositories");
std::fs::create_dir_all(&repo_path)?;
Ok(read_dir(repo_path)? Ok(read_dir(repo_path)?
.filter_map(StdResult::ok) .filter_map(StdResult::ok)
.filter(|entry| entry.file_type().map(|ft| ft.is_dir()).unwrap_or(false)) .filter(|entry| entry.file_type().map(|ft| ft.is_dir()).unwrap_or(false))

View File

@ -1,9 +1,6 @@
use crate::{ use crate::{statics::VERSION_INFO, templates};
statics::{REPO_COUNT, VERSION_INFO}, use actix_web::{http::StatusCode, HttpResponse, ResponseError};
templates, use std::fmt;
};
use actix_web::{HttpResponse, ResponseError};
use std::{fmt, sync::atomic::Ordering};
pub(crate) type Result<T> = std::result::Result<T, Error>; pub(crate) type Result<T> = std::result::Result<T, Error>;
@ -14,9 +11,9 @@ pub(crate) enum Error {
Git(git2::Error), Git(git2::Error),
Internal, Internal,
Io(std::io::Error), Io(std::io::Error),
Log(log::SetLoggerError), Parse(std::num::ParseIntError),
LogBuilder(log4rs::config::Errors),
Serial(serde_json::Error), Serial(serde_json::Error),
BranchNotFound,
} }
impl fmt::Display for Error { impl fmt::Display for Error {
@ -27,24 +24,35 @@ impl fmt::Display for Error {
Error::Git(e) => write!(fmt, "Git({})", e), Error::Git(e) => write!(fmt, "Git({})", e),
Error::Internal => write!(fmt, "Internal Error"), Error::Internal => write!(fmt, "Internal Error"),
Error::Io(e) => write!(fmt, "Io({})", e), Error::Io(e) => write!(fmt, "Io({})", e),
Error::Log(e) => write!(fmt, "Log({})", e), Error::Parse(e) => write!(fmt, "Parse({})", e),
Error::LogBuilder(e) => write!(fmt, "LogBuilder({})", e),
Error::Serial(e) => write!(fmt, "Serial({})", e), Error::Serial(e) => write!(fmt, "Serial({})", e),
Error::BranchNotFound => write!(fmt, "Repo doesn't have master branch"),
} }
} }
} }
impl ResponseError for Error { impl ResponseError for Error {
fn error_response(&self) -> HttpResponse { fn status_code(&self) -> StatusCode {
let mut buf = Vec::new(); match self {
templates::p500(&mut buf, VERSION_INFO, REPO_COUNT.load(Ordering::Relaxed)).unwrap(); Error::BranchNotFound => StatusCode::NOT_FOUND,
HttpResponse::InternalServerError() _ => StatusCode::INTERNAL_SERVER_ERROR,
.content_type("text/html") }
.body(buf)
} }
fn render_response(&self) -> HttpResponse { fn error_response(&self) -> HttpResponse {
self.error_response() let mut buf = Vec::new();
match self {
Error::BranchNotFound => {
templates::p404_no_master(&mut buf, VERSION_INFO, 0).unwrap();
HttpResponse::NotFound().content_type("text/html").body(buf)
}
_ => {
templates::p500(&mut buf, VERSION_INFO, 0).unwrap();
HttpResponse::InternalServerError()
.content_type("text/html")
.body(buf)
}
}
} }
} }
@ -62,12 +70,6 @@ impl From<git2::Error> for Error {
} }
} }
impl From<log::SetLoggerError> for Error {
fn from(err: log::SetLoggerError) -> Self {
Error::Log(err)
}
}
impl From<std::io::Error> for Error { impl From<std::io::Error> for Error {
fn from(err: std::io::Error) -> Self { fn from(err: std::io::Error) -> Self {
Error::Io(err) Error::Io(err)
@ -86,8 +88,8 @@ impl From<reqwest::Error> for Error {
} }
} }
impl From<log4rs::config::Errors> for Error { impl From<std::num::ParseIntError> for Error {
fn from(err: log4rs::config::Errors) -> Self { fn from(err: std::num::ParseIntError) -> Self {
Error::LogBuilder(err) Error::Parse(err)
} }
} }

532
src/lib.rs Normal file
View File

@ -0,0 +1,532 @@
#![type_length_limit = "2257138"]
#[macro_use]
extern crate actix_web;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate tracing;
mod cache;
pub mod config;
mod count;
mod error;
mod service;
mod statics;
pub mod telemetry;
mod template;
use crate::{
cache::CacheState,
config::Settings,
error::{Error, Result},
service::{Bitbucket, FormService, GitHub, Gitlab, Service, Sourcehut},
statics::{CLIENT, CSS, FAVICON, VERSION_INFO},
template::RepoInfo,
};
use actix_web::{
dev::Server,
http::header::{CacheControl, CacheDirective, Expires, LOCATION},
middleware::{self, TrailingSlash},
web, App, HttpResponse, HttpServer, Responder,
};
use badge::{Badge, BadgeOptions};
use git2::{BranchType, Repository};
use number_prefix::NumberPrefix;
use std::{
borrow::Cow,
fs::create_dir_all,
io,
net::TcpListener,
path::Path,
process::Command,
sync::atomic::AtomicUsize,
sync::atomic::Ordering,
time::{Duration, SystemTime},
};
use tracing::Instrument;
include!(concat!(env!("OUT_DIR"), "/templates.rs"));
#[derive(Deserialize, Serialize)]
struct GeneratorForm<'a> {
service: FormService,
user: Cow<'a, str>,
repo: Cow<'a, str>,
}
#[derive(Debug)]
pub(crate) struct State {
settings: Settings,
}
impl State {
fn repos(&self) -> String {
self.settings.repodir.display().to_string()
}
fn cache(&self) -> String {
self.settings.cachedir.display().to_string()
}
}
#[derive(Serialize)]
struct JsonResponse<'a> {
head: &'a str,
branch: &'a str,
count: u64,
commits: u64,
}
#[derive(Deserialize, Debug)]
struct BranchQuery {
branch: Option<String>,
}
fn pull(path: impl AsRef<Path>) -> Result<()> {
let repo = Repository::open_bare(path)?;
let mut origin = repo.find_remote("origin")?;
origin.fetch(&["refs/heads/*:refs/heads/*"], None, None)?;
Ok(())
}
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 cache_dir = Path::new(&cache_dir);
let repo = Repository::open_bare(&repo_dir)?;
// TODO: do better...
let head = repo
.find_branch(branch, BranchType::Local)
.map_err(|_| Error::BranchNotFound)?
.into_reference();
let head = format!("{}", head.target().ok_or(Error::BranchNotFound)?);
let mut arg_commit_count = vec!["rev-list".to_string(), "--count".to_string()];
let mut arg = vec![
"log".to_string(),
"--pretty=tformat:".to_string(),
"--numstat".to_string(),
"--ignore-space-change".to_string(),
"--ignore-all-space".to_string(),
"--ignore-submodules".to_string(),
"--no-color".to_string(),
"--find-copies-harder".to_string(),
"-M".to_string(),
"--diff-filter=ACDM".to_string(),
];
let cache = CacheState::read_from_file(&cache_dir, branch, &head)?;
match &cache {
CacheState::Current { count, commits, .. } => {
info!("Using cache");
return Ok((*count, head, *commits));
}
CacheState::Old { head, .. } => {
info!("Updating cache");
arg.push(format!("{}..{}", head, branch));
arg_commit_count.push(format!("{}..{}", head, branch));
}
CacheState::No | CacheState::NoneForBranch(..) => {
info!("Creating cache");
arg.push(branch.to_string());
arg_commit_count.push(branch.to_string());
}
};
arg.push("--".to_string());
arg.push(".".to_string());
let output = Command::new("git")
.args(&arg)
.current_dir(&repo_dir)
.output()?
.stdout;
let output = String::from_utf8_lossy(&output);
let output_commits = Command::new("git")
.args(&arg_commit_count)
.current_dir(&repo_dir)
.output()?
.stdout;
let output_commits = String::from_utf8_lossy(&output_commits);
let commits: u64 = output_commits.trim().parse()?;
let count: u64 = output
.lines()
.map(|s| {
s.split_whitespace()
.take(2)
.map(str::parse::<u64>)
.filter_map(std::result::Result::ok)
.sum::<u64>()
})
.sum();
let cache = cache.calculate_new_cache(count, commits, (&head).into(), branch);
cache.write_to_file(cache_dir)?;
Ok((count, head, commits))
}
async fn remote_exists(url: &str) -> Result<bool> {
let resp = CLIENT.head(url).send().await?;
Ok(resp.status() == reqwest::StatusCode::OK)
}
enum HocResult {
Hoc {
hoc: u64,
commits: u64,
hoc_pretty: String,
head: String,
url: String,
repo: String,
service_path: String,
},
NotFound,
}
async fn delete_repo_and_cache<T>(
state: web::Data<State>,
repo_count: web::Data<AtomicUsize>,
data: web::Path<(String, String)>,
) -> Result<impl Responder>
where
T: Service,
{
let data = data.into_inner();
let span = info_span!(
"deleting repository and cache",
service = T::domain(),
user = data.0.as_str(),
repo = data.1.as_str()
);
let future = async {
let repo = format!(
"{}/{}/{}",
T::domain(),
data.0.to_lowercase(),
data.1.to_lowercase()
);
info!("Deleting cache and repository");
let cache_dir = format!("{}/{}.json", &state.cache(), repo);
let repo_dir = format!("{}/{}", &state.repos(), repo);
std::fs::remove_file(&cache_dir).or_else(|e| {
if e.kind() == io::ErrorKind::NotFound {
Ok(())
} else {
Err(e)
}
})?;
std::fs::remove_dir_all(&repo_dir).or_else(|e| {
if e.kind() == io::ErrorKind::NotFound {
Ok(())
} else {
Err(e)
}
})?;
repo_count.fetch_sub(1, Ordering::Relaxed);
Ok(HttpResponse::TemporaryRedirect()
.insert_header((
LOCATION,
format!("/{}/{}/{}/view", T::url_path(), data.0, data.1),
))
.finish())
};
future.instrument(span).await
}
async fn handle_hoc_request<T, F>(
state: web::Data<State>,
repo_count: web::Data<AtomicUsize>,
data: web::Path<(String, String)>,
branch: &str,
mapper: F,
) -> Result<HttpResponse>
where
T: Service,
F: FnOnce(HocResult) -> Result<HttpResponse>,
{
let data = data.into_inner();
let span = info_span!(
"handling hoc calculation",
service = T::domain(),
user = data.0.as_str(),
repo = data.1.as_str(),
branch
);
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 remote_exists = remote_exists(&url).await?;
let file = Path::new(&path);
if !file.exists() {
if !remote_exists {
warn!("Repository does not exist");
return mapper(HocResult::NotFound);
}
info!("Cloning for the first time");
create_dir_all(file)?;
let repo = Repository::init_bare(file)?;
repo.remote_add_fetch("origin", "refs/heads/*:refs/heads/*")?;
repo.remote_set_url("origin", &url)?;
repo_count.fetch_add(1, Ordering::Relaxed);
}
pull(&path)?;
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),
};
let res = HocResult::Hoc {
hoc,
commits,
hoc_pretty,
head,
url,
repo,
service_path,
};
mapper(res)
};
future.instrument(span).await
}
pub(crate) async fn json_hoc<T: Service>(
state: web::Data<State>,
repo_count: web::Data<AtomicUsize>,
data: web::Path<(String, String)>,
branch: web::Query<BranchQuery>,
) -> Result<HttpResponse> {
let branch = branch.branch.as_deref().unwrap_or("master");
let rc_clone = repo_count.clone();
let mapper = move |r| match r {
HocResult::NotFound => p404(rc_clone),
HocResult::Hoc {
hoc, head, commits, ..
} => Ok(HttpResponse::Ok().json(JsonResponse {
branch,
head: &head,
count: hoc,
commits,
})),
};
handle_hoc_request::<T, _>(state, repo_count, data, branch, mapper).await
}
fn no_cache_response(body: Vec<u8>) -> HttpResponse {
let expiration = SystemTime::now() + Duration::from_secs(30);
HttpResponse::Ok()
.content_type("image/svg+xml")
.insert_header(Expires(expiration.into()))
.insert_header(CacheControl(vec![
CacheDirective::MaxAge(0u32),
CacheDirective::MustRevalidate,
CacheDirective::NoCache,
CacheDirective::NoStore,
]))
.body(body)
}
pub(crate) async fn calculate_hoc<T: Service>(
state: web::Data<State>,
repo_count: web::Data<AtomicUsize>,
data: web::Path<(String, String)>,
branch: web::Query<BranchQuery>,
) -> HttpResponse {
let rc_clone = repo_count.clone();
let mapper = move |r| match r {
HocResult::NotFound => p404(rc_clone),
HocResult::Hoc { hoc_pretty, .. } => {
let badge_opt = BadgeOptions {
subject: "Hits-of-Code".to_string(),
color: "#007ec6".to_string(),
status: hoc_pretty,
};
let badge = Badge::new(badge_opt)?;
// TODO: remove clone
let body = badge.to_svg().as_bytes().to_vec();
Ok(no_cache_response(body))
}
};
let branch = branch.branch.as_deref().unwrap_or("master");
let error_badge = |_| {
let error_badge = Badge::new(BadgeOptions {
subject: "Hits-of-Code".to_string(),
color: "#ff0000".to_string(),
status: "error".to_string(),
})
.unwrap();
let body = error_badge.to_svg().as_bytes().to_vec();
no_cache_response(body)
};
handle_hoc_request::<T, _>(state, repo_count, data, branch, mapper)
.await
.unwrap_or_else(error_badge)
}
async fn overview<T: Service>(
state: web::Data<State>,
repo_count: web::Data<AtomicUsize>,
data: web::Path<(String, String)>,
branch: web::Query<BranchQuery>,
) -> Result<HttpResponse> {
let branch = branch.branch.as_deref().unwrap_or("master");
let base_url = state.settings.base_url.clone();
let rc_clone = repo_count.clone();
let mapper = move |r| match r {
HocResult::NotFound => p404(rc_clone),
HocResult::Hoc {
hoc,
commits,
hoc_pretty,
url,
head,
repo,
service_path,
} => {
let mut buf = Vec::new();
let repo_info = RepoInfo {
commit_url: &T::commit_url(&repo, &head),
commits,
base_url: &base_url,
head: &head,
hoc,
hoc_pretty: &hoc_pretty,
path: &service_path,
url: &url,
branch,
};
templates::overview(
&mut buf,
VERSION_INFO,
rc_clone.load(Ordering::Relaxed),
repo_info,
)?;
Ok(HttpResponse::Ok().content_type("text/html").body(buf))
}
};
handle_hoc_request::<T, _>(state, repo_count, data, branch, mapper).await
}
#[get("/health_check")]
async fn health_check() -> HttpResponse {
HttpResponse::Ok().finish()
}
#[get("/")]
async fn index(
state: web::Data<State>,
repo_count: web::Data<AtomicUsize>,
) -> Result<HttpResponse> {
let mut buf = Vec::new();
templates::index(
&mut buf,
VERSION_INFO,
repo_count.load(Ordering::Relaxed),
&state.settings.base_url,
)?;
Ok(HttpResponse::Ok().content_type("text/html").body(buf))
}
#[post("/generate")]
async fn generate(
params: web::Form<GeneratorForm<'_>>,
state: web::Data<State>,
repo_count: web::Data<AtomicUsize>,
) -> Result<HttpResponse> {
let repo = format!("{}/{}", params.user, params.repo);
let mut buf = Vec::new();
templates::generate(
&mut buf,
VERSION_INFO,
repo_count.load(Ordering::Relaxed),
&state.settings.base_url,
params.service.url(),
params.service.service(),
&repo,
)?;
Ok(HttpResponse::Ok().content_type("text/html").body(buf))
}
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))?;
Ok(HttpResponse::NotFound().content_type("text/html").body(buf))
}
async fn async_p404(repo_count: web::Data<AtomicUsize>) -> Result<HttpResponse> {
p404(repo_count)
}
fn css() -> HttpResponse {
HttpResponse::Ok().content_type("text/css").body(CSS)
}
fn favicon32() -> HttpResponse {
HttpResponse::Ok().content_type("image/png").body(FAVICON)
}
async fn start_server(listener: TcpListener, settings: Settings) -> std::io::Result<Server> {
let workers = settings.workers;
let repo_count =
// TODO: errorhandling
web::Data::new(AtomicUsize::new(count::count_repositories(&settings.repodir).unwrap()));
let state = web::Data::new(State { settings });
Ok(HttpServer::new(move || {
App::new()
.app_data(state.clone())
.app_data(repo_count.clone())
.wrap(tracing_actix_web::TracingLogger::default())
.wrap(middleware::NormalizePath::new(TrailingSlash::Trim))
.service(index)
.service(health_check)
.service(web::resource("/tacit-css.min.css").route(web::get().to(css)))
.service(web::resource("/favicon.ico").route(web::get().to(favicon32)))
.service(generate)
.service(web::resource("/github/{user}/{repo}").to(calculate_hoc::<GitHub>))
.service(web::resource("/gitlab/{user}/{repo}").to(calculate_hoc::<Gitlab>))
.service(web::resource("/bitbucket/{user}/{repo}").to(calculate_hoc::<Bitbucket>))
.service(web::resource("/sourcehut/{user}/{repo}").to(calculate_hoc::<Sourcehut>))
.service(
web::resource("/github/{user}/{repo}/delete")
.route(web::post().to(delete_repo_and_cache::<GitHub>)),
)
.service(
web::resource("/gitlab/{user}/{repo}/delete")
.route(web::post().to(delete_repo_and_cache::<Gitlab>)),
)
.service(
web::resource("/bitbucket/{user}/{repo}/delete")
.route(web::post().to(delete_repo_and_cache::<Bitbucket>)),
)
.service(
web::resource("/sourcehut/{user}/{repo}/delete")
.route(web::post().to(delete_repo_and_cache::<Sourcehut>)),
)
.service(web::resource("/github/{user}/{repo}/json").to(json_hoc::<GitHub>))
.service(web::resource("/gitlab/{user}/{repo}/json").to(json_hoc::<Gitlab>))
.service(web::resource("/bitbucket/{user}/{repo}/json").to(json_hoc::<Bitbucket>))
.service(web::resource("/sourcehut/{user}/{repo}/json").to(json_hoc::<Sourcehut>))
.service(web::resource("/view/github/{user}/{repo}").to(overview::<GitHub>))
.service(web::resource("/view/gitlab/{user}/{repo}").to(overview::<Gitlab>))
.service(web::resource("/view/bitbucket/{user}/{repo}").to(overview::<Bitbucket>))
.service(web::resource("/github/{user}/{repo}/view").to(overview::<GitHub>))
.service(web::resource("/gitlab/{user}/{repo}/view").to(overview::<Gitlab>))
.service(web::resource("/bitbucket/{user}/{repo}/view").to(overview::<Bitbucket>))
.service(web::resource("/sourcehut/{user}/{repo}/view").to(overview::<Sourcehut>))
.default_service(web::to(async_p404))
})
.workers(workers)
.listen(listener)?
.run())
}
pub async fn run(listener: TcpListener, settings: Settings) -> std::io::Result<Server> {
let span = info_span!("hoc", version = env!("CARGO_PKG_VERSION"));
let _ = span.enter();
start_server(listener, settings).instrument(span).await
}

View File

@ -1,360 +1,26 @@
#![type_length_limit = "2257138"] use hoc::{config::Settings, telemetry};
#[macro_use] use std::net::TcpListener;
extern crate actix_web;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate log;
#[macro_use]
extern crate serde_derive;
mod cache; fn init() {
mod config; dotenv::dotenv().ok();
mod count; openssl_probe::init_ssl_cert_env_vars();
mod error;
mod service;
mod statics;
use crate::{ telemetry::init_subscriber(telemetry::get_subscriber("hoc", "info"))
cache::CacheState,
error::{Error, Result},
service::{Bitbucket, FormService, GitHub, Gitlab, Service},
statics::{CLIENT, CSS, FAVICON, OPT, REPO_COUNT, VERSION_INFO},
};
use actix_web::{
error::ErrorBadRequest,
http::header::{CacheControl, CacheDirective, Expires},
middleware, web, App, HttpResponse, HttpServer,
};
use badge::{Badge, BadgeOptions};
use bytes::Bytes;
use futures::{unsync::mpsc, Future, Stream};
use git2::Repository;
use number_prefix::{NumberPrefix, Prefixed, Standalone};
use std::{
borrow::Cow,
fs::create_dir_all,
path::Path,
process::Command,
sync::atomic::Ordering,
sync::Arc,
time::{Duration, SystemTime},
};
include!(concat!(env!("OUT_DIR"), "/templates.rs"));
#[derive(Deserialize, Serialize)]
struct GeneratorForm<'a> {
service: FormService,
user: Cow<'a, str>,
repo: Cow<'a, str>,
} }
struct State { #[actix_rt::main]
repos: String, async fn main() -> std::io::Result<()> {
cache: String, init();
}
// TODO: error handling
#[derive(Serialize)] let settings = Settings::load().expect("Cannot load config");
struct JsonResponse<'a> {
head: &'a str, let address = format!("{}:{}", settings.host, settings.port);
count: u64, // TODO: error handling
} let listener = TcpListener::bind(address)?;
hoc::run(listener, settings)
fn pull(path: impl AsRef<Path>) -> Result<()> { .await
let repo = Repository::open_bare(path)?; .expect("Server error")
let mut origin = repo.find_remote("origin")?; .await
origin.fetch(&["refs/heads/*:refs/heads/*"], None, None)?;
Ok(())
}
fn hoc(repo: &str, repo_dir: &str, cache_dir: &str) -> Result<(u64, String)> {
let repo_dir = format!("{}/{}", repo_dir, repo);
let cache_dir = format!("{}/{}.json", cache_dir, repo);
let cache_dir = Path::new(&cache_dir);
let head = format!(
"{}",
Repository::open_bare(&repo_dir)?
.head()?
.target()
.ok_or(Error::Internal)?
);
let mut arg = vec![
"log".to_string(),
"--pretty=tformat:".to_string(),
"--numstat".to_string(),
"--ignore-space-change".to_string(),
"--ignore-all-space".to_string(),
"--ignore-submodules".to_string(),
"--no-color".to_string(),
"--find-copies-harder".to_string(),
"-M".to_string(),
"--diff-filter=ACDM".to_string(),
];
let cache = CacheState::read_from_file(&cache_dir, &head)?;
match &cache {
CacheState::Current(res) => {
info!("Using cache for {}", repo_dir);
return Ok((*res, head));
}
CacheState::Old(cache) => {
info!("Updating cache for {}", repo_dir);
arg.push(format!("{}..HEAD", cache.head));
}
CacheState::No => {
info!("Creating cache for {}", repo_dir);
}
};
arg.push("--".to_string());
arg.push(".".to_string());
let output = Command::new("git")
.args(&arg)
.current_dir(&repo_dir)
.output()?
.stdout;
let output = String::from_utf8_lossy(&output);
let count: u64 = output
.lines()
.map(|s| {
s.split_whitespace()
.take(2)
.map(str::parse::<u64>)
.filter_map(std::result::Result::ok)
.sum::<u64>()
})
.sum();
let cache = cache.calculate_new_cache(count, (&head).into());
cache.write_to_file(cache_dir)?;
Ok((cache.count, head))
}
fn remote_exists(url: &str) -> Result<bool> {
Ok(CLIENT.head(url).send()?.status() == reqwest::StatusCode::OK)
}
enum HocResult {
Hoc {
hoc: u64,
hoc_pretty: String,
head: String,
url: String,
repo: String,
service_path: String,
},
NotFound,
}
fn handle_hoc_request<T, F>(
state: web::Data<Arc<State>>,
data: web::Path<(String, String)>,
mapper: F,
) -> impl Future<Item = HttpResponse, Error = Error>
where
T: Service,
F: Fn(HocResult) -> Result<HttpResponse>,
{
futures::future::result(Ok(()))
.and_then(move |_| {
let repo = format!("{}/{}", data.0.to_lowercase(), data.1.to_lowercase());
let service_path = format!("{}/{}", T::domain(), repo);
let path = format!("{}/{}", state.repos, service_path);
let file = Path::new(&path);
let url = format!("https://{}", service_path);
if !file.exists() {
if !remote_exists(&url)? {
warn!("Repository does not exist: {}", url);
return Ok(HocResult::NotFound);
}
info!("Cloning {} for the first time", url);
create_dir_all(file)?;
let repo = Repository::init_bare(file)?;
repo.remote_add_fetch("origin", "refs/heads/*:refs/heads/*")?;
repo.remote_set_url("origin", &url)?;
REPO_COUNT.fetch_add(1, Ordering::Relaxed);
}
pull(&path)?;
let (hoc, head) = hoc(&service_path, &state.repos, &state.cache)?;
let hoc_pretty = match NumberPrefix::decimal(hoc as f64) {
Standalone(hoc) => hoc.to_string(),
Prefixed(prefix, hoc) => format!("{:.1}{}", hoc, prefix),
};
Ok(HocResult::Hoc {
hoc,
hoc_pretty,
head,
url,
repo,
service_path,
})
})
.and_then(mapper)
}
fn json_hoc<T: Service>(
state: web::Data<Arc<State>>,
data: web::Path<(String, String)>,
) -> impl Future<Item = HttpResponse, Error = Error> {
let mapper = |r| match r {
HocResult::NotFound => p404(),
HocResult::Hoc { hoc, head, .. } => Ok(HttpResponse::Ok().json(JsonResponse {
head: &head,
count: hoc,
})),
};
handle_hoc_request::<T, _>(state, data, mapper)
}
fn calculate_hoc<T: Service>(
state: web::Data<Arc<State>>,
data: web::Path<(String, String)>,
) -> impl Future<Item = HttpResponse, Error = Error> {
let mapper = |r| match r {
HocResult::NotFound => p404(),
HocResult::Hoc { hoc_pretty, .. } => {
let badge_opt = BadgeOptions {
subject: "Hits-of-Code".to_string(),
color: "#007ec6".to_string(),
status: hoc_pretty,
};
let badge = Badge::new(badge_opt)?;
let (tx, rx_body) = mpsc::unbounded();
let _ = tx.unbounded_send(Bytes::from(badge.to_svg().as_bytes()));
let expiration = SystemTime::now() + Duration::from_secs(30);
Ok(HttpResponse::Ok()
.content_type("image/svg+xml")
.set(Expires(expiration.into()))
.set(CacheControl(vec![
CacheDirective::MaxAge(0u32),
CacheDirective::MustRevalidate,
CacheDirective::NoCache,
CacheDirective::NoStore,
]))
.streaming(rx_body.map_err(|_| ErrorBadRequest("bad request"))))
}
};
handle_hoc_request::<T, _>(state, data, mapper)
}
fn overview<T: Service>(
state: web::Data<Arc<State>>,
data: web::Path<(String, String)>,
) -> impl Future<Item = HttpResponse, Error = Error> {
let mapper = |r| match r {
HocResult::NotFound => p404(),
HocResult::Hoc {
hoc,
hoc_pretty,
url,
head,
repo,
service_path,
} => {
let mut buf = Vec::new();
templates::overview(
&mut buf,
VERSION_INFO,
REPO_COUNT.load(Ordering::Relaxed),
&OPT.domain,
&service_path,
&url,
hoc,
&hoc_pretty,
&head,
&T::commit_url(&repo, &head),
)?;
let (tx, rx_body) = mpsc::unbounded();
let _ = tx.unbounded_send(Bytes::from(buf));
Ok(HttpResponse::Ok()
.content_type("text/html")
.streaming(rx_body.map_err(|_| ErrorBadRequest("bad request"))))
}
};
handle_hoc_request::<T, _>(state, data, mapper)
}
#[get("/")]
fn index() -> Result<HttpResponse> {
let mut buf = Vec::new();
templates::index(
&mut buf,
VERSION_INFO,
REPO_COUNT.load(Ordering::Relaxed),
&OPT.domain,
)?;
Ok(HttpResponse::Ok().content_type("text/html").body(buf))
}
#[post("/generate")]
fn generate(params: web::Form<GeneratorForm>) -> Result<HttpResponse> {
let repo = format!("{}/{}", params.user, params.repo);
let mut buf = Vec::new();
templates::generate(
&mut buf,
VERSION_INFO,
REPO_COUNT.load(Ordering::Relaxed),
&OPT.domain,
params.service.url(),
params.service.service(),
&repo,
)?;
let (tx, rx_body) = mpsc::unbounded();
let _ = tx.unbounded_send(Bytes::from(buf));
Ok(HttpResponse::Ok()
.content_type("text/html")
.streaming(rx_body.map_err(|_| ErrorBadRequest("bad request"))))
}
fn p404() -> Result<HttpResponse> {
let mut buf = Vec::new();
templates::p404(&mut buf, VERSION_INFO, REPO_COUNT.load(Ordering::Relaxed))?;
Ok(HttpResponse::NotFound().content_type("text/html").body(buf))
}
#[get("/tacit-css.min.css")]
fn css() -> HttpResponse {
HttpResponse::Ok().content_type("text/css").body(CSS)
}
#[get("/favicon.ico")]
fn favicon32() -> HttpResponse {
HttpResponse::Ok().content_type("image/png").body(FAVICON)
}
fn main() -> Result<()> {
config::init()?;
let interface = format!("{}:{}", OPT.host, OPT.port);
let state = Arc::new(State {
repos: OPT.outdir.display().to_string(),
cache: OPT.cachedir.display().to_string(),
});
Ok(HttpServer::new(move || {
App::new()
.data(state.clone())
.wrap(middleware::Logger::default())
.service(index)
.service(css)
.service(favicon32)
.service(generate)
.service(web::resource("/github/{user}/{repo}").to_async(calculate_hoc::<GitHub>))
.service(web::resource("/gitlab/{user}/{repo}").to_async(calculate_hoc::<Gitlab>))
.service(web::resource("/bitbucket/{user}/{repo}").to_async(calculate_hoc::<Bitbucket>))
.service(web::resource("/github/{user}/{repo}/json").to_async(json_hoc::<GitHub>))
.service(web::resource("/gitlab/{user}/{repo}/json").to_async(json_hoc::<Gitlab>))
.service(web::resource("/bitbucket/{user}/{repo}/json").to_async(json_hoc::<Bitbucket>))
.service(web::resource("/view/github/{user}/{repo}").to_async(overview::<GitHub>))
.service(web::resource("/view/gitlab/{user}/{repo}").to_async(overview::<Gitlab>))
.service(web::resource("/view/bitbucket/{user}/{repo}").to_async(overview::<Bitbucket>))
.default_service(web::resource("").route(web::get().to_async(p404)))
})
.workers(OPT.workers)
.bind(interface)?
.run()?)
} }

View File

@ -12,6 +12,8 @@ pub(crate) enum FormService {
Gitlab, Gitlab,
#[serde(rename = "bitbucket")] #[serde(rename = "bitbucket")]
Bitbucket, Bitbucket,
#[serde(rename = "sourcehut")]
Sourcehut,
} }
impl FormService { impl FormService {
@ -20,6 +22,7 @@ impl FormService {
FormService::GitHub => "github.com", FormService::GitHub => "github.com",
FormService::Gitlab => "gitlab.com", FormService::Gitlab => "gitlab.com",
FormService::Bitbucket => "bitbucket.org", FormService::Bitbucket => "bitbucket.org",
FormService::Sourcehut => "git.sr.ht",
} }
} }
@ -28,6 +31,7 @@ impl FormService {
FormService::GitHub => "github", FormService::GitHub => "github",
FormService::Gitlab => "gitlab", FormService::Gitlab => "gitlab",
FormService::Bitbucket => "bitbucket", FormService::Bitbucket => "bitbucket",
FormService::Sourcehut => "sourcehut",
} }
} }
} }
@ -73,3 +77,17 @@ impl Service for Bitbucket {
format!("https://{}/{}/commits/{}", Self::domain(), repo, commit_ref) format!("https://{}/{}/commits/{}", Self::domain(), repo, commit_ref)
} }
} }
pub(crate) struct Sourcehut;
impl Service for Sourcehut {
fn domain() -> &'static str {
"git.sr.ht"
}
fn url_path() -> &'static str {
"sourcehut"
}
fn commit_url(repo: &str, commit_ref: &str) -> String {
format!("https://{}/{}/commit/{}", Self::domain(), repo, commit_ref)
}
}

View File

@ -1,14 +1,10 @@
use crate::{config::Opt, count::count_repositories};
use std::sync::atomic::AtomicUsize;
use structopt::StructOpt;
pub struct VersionInfo<'a> { pub struct VersionInfo<'a> {
pub commit: &'a str, pub commit: &'a str,
pub version: &'a str, pub version: &'a str,
} }
pub(crate) const VERSION_INFO: VersionInfo = VersionInfo { pub(crate) const VERSION_INFO: VersionInfo = VersionInfo {
commit: env!("VERGEN_SHA_SHORT"), commit: env!("VERGEN_GIT_SHA_SHORT"),
version: env!("CARGO_PKG_VERSION"), version: env!("CARGO_PKG_VERSION"),
}; };
pub(crate) const CSS: &str = include_str!("../static/tacit-css.min.css"); pub(crate) const CSS: &str = include_str!("../static/tacit-css.min.css");
@ -16,7 +12,4 @@ pub(crate) const FAVICON: &[u8] = include_bytes!("../static/favicon32.png");
lazy_static! { lazy_static! {
pub(crate) static ref CLIENT: reqwest::Client = reqwest::Client::new(); pub(crate) static ref CLIENT: reqwest::Client = reqwest::Client::new();
pub(crate) static ref OPT: Opt = Opt::from_args();
pub(crate) static ref REPO_COUNT: AtomicUsize =
AtomicUsize::new(count_repositories(&OPT.outdir).unwrap());
} }

21
src/telemetry.rs Normal file
View File

@ -0,0 +1,21 @@
use tracing::{subscriber::set_global_default, Subscriber};
use tracing_bunyan_formatter::{BunyanFormattingLayer, JsonStorageLayer};
use tracing_log::LogTracer;
use tracing_subscriber::{layer::SubscriberExt, EnvFilter, Registry};
pub fn get_subscriber(name: &str, env_filter: &str) -> impl Subscriber + Send + Sync {
let env_filter =
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new(env_filter));
let formatting_layer = BunyanFormattingLayer::new(name.to_string(), std::io::stdout);
Registry::default()
.with(env_filter)
.with(JsonStorageLayer)
.with(formatting_layer)
}
pub fn init_subscriber(subscriber: impl Subscriber + Send + Sync) {
LogTracer::init().expect("Failed to set logger");
set_global_default(subscriber).expect("Failed to set tracing subscriber");
}

11
src/template.rs Normal file
View File

@ -0,0 +1,11 @@
pub struct RepoInfo<'a> {
pub commit_url: &'a str,
pub commits: u64,
pub base_url: &'a str,
pub head: &'a str,
pub hoc: u64,
pub hoc_pretty: &'a str,
pub path: &'a str,
pub url: &'a str,
pub branch: &'a str,
}

View File

@ -1,7 +1,7 @@
@use super::base; @use super::base;
@use crate::statics::VersionInfo; @use crate::statics::VersionInfo;
@(version_info: VersionInfo, repo_count: usize, domain: &str, url: &str, service: &str, path: &str) @(version_info: VersionInfo, repo_count: usize, base_url: &str, url: &str, service: &str, path: &str)
@:base("Hits-of-Code Badges", "Badge Generator", { @:base("Hits-of-Code Badges", "Badge Generator", {
@ -10,7 +10,7 @@ Here is the markdown for the badge for <a href="https://@url/@path">@url/@path</
</p> </p>
<pre> <pre>
[![Hits-of-Code](https://@domain/@service/@path)](https://@domain/view/@service/@path) [![Hits-of-Code](@base_url/@service/@path)](@base_url/@service/@path/view)
</pre> </pre>
<p> <p>
@ -18,6 +18,6 @@ It will be rendered like this
</p> </p>
<pre> <pre>
<a href="https://@domain/view/@service/@path"><img src="https://@domain/@service/@path" alt="example badge" /></a> <a href="@base_url/@service/@path/view"><img src="@base_url/@service/@path" alt="example badge" /></a>
</pre> </pre>
}, version_info, repo_count) }, version_info, repo_count)

View File

@ -1,7 +1,7 @@
@use super::base; @use super::base;
@use crate::statics::VersionInfo; @use crate::statics::VersionInfo;
@(version_info: VersionInfo, repo_count: usize, domain: &str) @(version_info: VersionInfo, repo_count: usize, base_url: &str)
@:base("Hits-of-Code Badges", "Hits-of-Code Badges", { @:base("Hits-of-Code Badges", "Hits-of-Code Badges", {
@ -20,20 +20,20 @@ gives an overview about the amount of work put into a codebase.
<p> <p>
There is a <a href="https://github.com/yegor256/hoc/">command-line tool</a> to calculate the HoC of a repository, but There is a <a href="https://github.com/yegor256/hoc/">command-line tool</a> to calculate the HoC of a repository, but
some people might want a nice badge to put in their README, that's why I implemented this API. Currently the API can be some people might want a nice badge to put in their README, that's why I implemented this API. Currently the API can be
used for GitHub, GitLab and Bitbucket repositories. Just put the following code in your README: used for GitHub, GitLab, Bitbucket and Sourcehut repositories. Just put the following code in your README:
</p> </p>
<pre> <pre>
[![Hits-of-Code](https://@domain/&lt;service&gt;/&lt;user&gt;/&lt;repo&gt;)](https://@domain/view/&lt;service&gt;/&lt;user&gt;/&lt;repo&gt;) [![Hits-of-Code](@base_url/&lt;service&gt;/&lt;user&gt;/&lt;repo&gt;)](@base_url/&lt;service&gt;/&lt;user&gt;/&lt;repo&gt;/view)
</pre> </pre>
<p> <p>
where <code>&lt;service&gt;</code> is one of <code>github</code>, <code>gitlab</code> or <code>bitbucket</code>. So the where <code>&lt;service&gt;</code> is one of <code>github</code>, <code>gitlab</code>, <code>bitbucket</code> or
following Markdown <code>sourcehut</code>. So the following Markdown
</p> </p>
<pre> <pre>
[![Hits-of-Code](https://@domain/github/vbrandl/hoc)](https://@domain/view/github/vbrandl/hoc) [![Hits-of-Code](@base_url/github/vbrandl/hoc)](@base_url/github/vbrandl/hoc/view)
</pre> </pre>
<p> <p>
@ -41,22 +41,29 @@ would render this badge:
</p> </p>
<pre> <pre>
<a href="https://@domain/view/github/vbrandl/hoc"><img src="https://@domain/github/vbrandl/hoc" <a href="@base_url/github/vbrandl/hoc/view"><img src="@base_url/github/vbrandl/hoc"
alt="example badge" /></a> alt="example badge" /></a>
</pre> </pre>
<p> <p>
You can also request the HoC as JSON by appending <code>/json</code> to the request path. This will return a JSON By default, this service assumes the existence of a branch named <code>master</code>. If no branch with that name exists
object with two fields: <code>count</code> and <code>head</code> with count being the HoC value and head being the in your repository or you want a badge for another branch of your repository, just append
commit ref of <code>HEAD</code>. Requesting <code>?branch=&lt;branch-name&gt;</code> to the URL.
<a href="https://@domain/github/vbrandl/hoc/json">https://@domain/github/vbrandl/hoc/json</a> might return something </p>
along the lines of
<p>
You can also request the HoC as JSON by appending <code>/json</code> to the request path. This will return a JSON object
with three fields: <code>count</code> (the HoC value), <code>commits</code> (the number of commits) and
<code>head</code> (the commit ref of HEAD). Requesting <a
href="@base_url/github/vbrandl/hoc/json">@base_url/github/vbrandl/hoc/json</a> might return something along
the lines of
</p> </p>
<pre> <pre>
&#123; &#123;
"head" : "05736ee3ba256ec9a7227c436aef2bf43db109ab", "head": "1f01c3b964b018fb0c0c2c5b572bf4ace2968546",
"count": 7582 "count": 8324,
"commits": 223
&#125; &#125;
</pre> </pre>
@ -67,6 +74,7 @@ along the lines of
<option value="github">GitHub</option> <option value="github">GitHub</option>
<option value="gitlab">Gitlab</option> <option value="gitlab">Gitlab</option>
<option value="bitbucket">Bitbucket</option> <option value="bitbucket">Bitbucket</option>
<option value="sourcehut">Sourcehut</option>
</select> </select>
<label>/</label> <label>/</label>
<input name="user" id="user" type="text" placeholder="user" /> <input name="user" id="user" type="text" placeholder="user" />
@ -87,7 +95,7 @@ welcome.
<p> <p>
You can reach me via mail: <a href="mailto:mail+hoc@@vbrandl.net">mail+hoc@@vbrandl.net</a> preferably using You can reach me via mail: <a href="mailto:mail+hoc@@vbrandl.net">mail+hoc@@vbrandl.net</a> preferably using
my <a href="https://mirror.oldsql.cc/key.asc">GPG key</a> my <a href="https://www.vbrandl.net/static/keys/0x1FFE431282F4B8CC0A7579167FB009175885FC76.asc">GPG key</a>
(<a href="http://pool.sks-keyservers.net/pks/lookup?op=get&amp;search=0x1FFE431282F4B8CC0A7579167FB009175885FC76">from a (<a href="http://pool.sks-keyservers.net/pks/lookup?op=get&amp;search=0x1FFE431282F4B8CC0A7579167FB009175885FC76">from a
keyserver</a>), or by using any other UID from my key. keyserver</a>), or by using any other UID from my key.
</p> </p>

View File

@ -1,12 +1,17 @@
@use super::base; @use super::base;
@use crate::statics::VersionInfo; @use crate::statics::VersionInfo;
@use crate::template::RepoInfo;
@(version_info: VersionInfo, repo_count: usize, domain: &str, path: &str, url: &str, hoc: u64, hoc_pretty: &str, head: &str, commit_url: &str) @(version_info: VersionInfo, repo_count: usize, repo_info: RepoInfo)
@:base("Hits-of-Code Badges", "Overview", { @:base("Hits-of-Code Badges", "Overview", {
<p> <p>
The project <a href="@url">@url</a> has <strong>@hoc_pretty</strong> (exactly @hoc) hits of code at <a href="@commit_url">@head</a>. The project <a href="@repo_info.url">@repo_info.url</a> has
<strong>@repo_info.hoc_pretty</strong> (exactly @repo_info.hoc) hits of code at
<a href="@repo_info.commit_url">@repo_info.head</a> on the
<code>@repo_info.branch</code> branch. The repository contains
<strong>@repo_info.commits</strong> commits.
</p> </p>
<p> <p>
@ -14,6 +19,11 @@ To include the badge in your readme, use the following markdown:
</p> </p>
<pre> <pre>
[![Hits-of-Code](https://@domain/@path)](https://@domain/view/@path) [![Hits-of-Code](@repo_info.base_url/@repo_info.path?branch=@repo_info.branch)](@repo_info.base_url/@repo_info.path/view?branch=@repo_info.branch)
</pre> </pre>
<form method="post" action="/@repo_info.path/delete">
<button type="submit">Rebuild Cache</button>
</form>
}, version_info, repo_count) }, version_info, repo_count)

View File

@ -0,0 +1,16 @@
@use super::base;
@use crate::statics::VersionInfo;
@(version_info: VersionInfo, repo_count: usize)
@:base("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
attaching <code>?branch=&lt;branch-name&gt;</code> to the request.
</p>
<p>
If you think, this is a mistake on my side, please <a href="mailto:mail+hoc@@vbrandl.net">drop me a mail</a>.
</p>
}, version_info, repo_count)

16
tests/badge.rs Normal file
View File

@ -0,0 +1,16 @@
mod util;
#[actix_rt::test]
async fn badge_succeeds() {
let test_app = util::spawn_app().await;
let client = awc::Client::default();
let response = client
.get(&format!("{}/github/vbrandl/hoc", test_app.address))
.send()
.await
.expect("Failed to execute request");
assert!(response.status().is_success());
}

16
tests/health_check.rs Normal file
View File

@ -0,0 +1,16 @@
mod util;
#[actix_rt::test]
async fn health_check_works() {
let test_app = util::spawn_app().await;
let client = awc::Client::default();
let response = client
.get(&format!("{}/health_check", test_app.address))
.send()
.await
.expect("Failed to execute request");
assert!(response.status().is_success());
}

16
tests/index.rs Normal file
View File

@ -0,0 +1,16 @@
mod util;
#[actix_rt::test]
async fn index_returns_success() {
let test_app = util::spawn_app().await;
let client = awc::Client::default();
let response = client
.get(&format!("{}/", test_app.address))
.send()
.await
.expect("Failed to execute request");
assert!(response.status().is_success());
}

16
tests/json.rs Normal file
View File

@ -0,0 +1,16 @@
mod util;
#[actix_rt::test]
async fn json_returns_success() {
let test_app = util::spawn_app().await;
let client = awc::Client::default();
let response = client
.get(&format!("{}/github/vbrandl/hoc/json", test_app.address))
.send()
.await
.expect("Failed to execute request");
assert!(response.status().is_success());
}

50
tests/util/mod.rs Normal file
View File

@ -0,0 +1,50 @@
use hoc::{config::Settings, telemetry};
use std::net::TcpListener;
use tempfile::{tempdir, TempDir};
lazy_static::lazy_static! {
static ref TRACING: () = {
let filter = if std::env::var("TEST_LOG").is_ok() { "debug" } else { "" };
let subscriber = telemetry::get_subscriber("test", filter);
telemetry::init_subscriber(subscriber);
};
}
pub struct TestApp {
pub address: String,
repo_dir: TempDir,
cache_dir: TempDir,
}
pub async fn spawn_app() -> TestApp {
lazy_static::initialize(&TRACING);
let listener = TcpListener::bind("127.0.0.1:0").expect("Failed to bind random port");
let port = listener.local_addr().unwrap().port();
let address = format!("http://127.0.0.1:{}", port);
let repo_dir = tempdir().expect("Cannot create repo_dir");
let cache_dir = tempdir().expect("Cannot create cache_dir");
let mut settings = Settings::load().expect("Failed to read configuration.");
settings.repodir = repo_dir.path().to_path_buf();
settings.cachedir = cache_dir.path().to_path_buf();
// configuration.database.database_name = Uuid::new_v4().to_string();
// let connection_pool = configure_database(&configuration.database).await;
let server = hoc::run(listener, settings)
.await
.expect("Failed to bind address");
let _ = tokio::spawn(server);
TestApp {
address,
repo_dir,
cache_dir,
}
}

80
vm.nix Normal file
View File

@ -0,0 +1,80 @@
# Nix configuration for a VM to run a custom configured Vim
#
# It is intended as an example of building a VM that builds Vim for testing
# and evaluation purposes. It does not represent a production or secure
# deployment.
{ sources ? import ./nix/sources.nix
, pkgs ? import sources.nixpkgs { }
, callPackage ? pkgs.callPackage
, config
, lib
, ...
}:
# config, pkgs, lib, ... }:
let
hoc = pkgs.callPackage ./default.nix { };
# hoc = cargoNix.rootCrate.build;
in
{
environment = {
systemPackages = with pkgs; [
(
hoc
# import ./default.nix
)
];
};
networking.hostName = "hoc"; # Define your hostname.
system.stateVersion = "19.09"; # The version of NixOS originally installed
# Set security options:
security = {
sudo = {
enable = true; # Enable sudo
wheelNeedsPassword = false; # Allow wheel members to run sudo without a passowrd
};
};
networking.firewall.allowedTCPPorts = [ 80 ];
# List services that you want to enable:
services.openssh = {
enable = true; # Enable the OpenSSH daemon.
#permitRootLogin = "yes"; # Probably want to change this in production
#challengeResponseAuthentication = true; # Probably want to change this in production
#passwordAuthentication = true; # Probably want to change this in production
openFirewall = true;
hostKeys = [
{
path = "/etc/ssh/ssh_host_ed25519_key"; # Generate a key for the vm
type = "ed25519"; # Use the current best key type
}
];
};
# Users of the Vim VM:
users.mutableUsers = false; # Remove any users not defined in here
users.users.root = {
password = "123456"; # Probably want to change this in production
};
# Misc groups:
users.groups.nixos.gid = 1000;
# NixOS users
users.users.nixos = {
isNormalUser = true;
uid = 1000;
group = "nixos";
extraGroups = [ "wheel" ];
password = "123456"; # Probably want to change this in production
};
}