An optimized version of the classify client endpoint in Normandy
Перейти к файлу
Mike Cooper 75f4a0fbe8
Format code with rustfmt
2018-12-10 15:39:09 -08:00
.circleci Install rustfmt and clippy 2018-12-10 15:37:29 -08:00
src Format code with rustfmt 2018-12-10 15:39:09 -08:00
.dockerignore Updates to deploy in Google App Engine 2018-12-10 14:54:52 -08:00
.gitignore add README 2018-12-10 15:26:41 -08:00
.therapist.yml Clippy 2018-12-10 15:18:29 -08:00
Cargo.lock Updates to deploy in Google App Engine 2018-12-10 14:54:52 -08:00
Cargo.toml Use an actix worker for geoip lookups 2018-12-07 14:58:02 -05:00
Dockerfile Updates to deploy in Google App Engine 2018-12-10 14:54:52 -08:00
README.md add README 2018-12-10 15:26:41 -08:00
app.yaml Updates to deploy in Google App Engine 2018-12-10 14:54:52 -08:00

README.md

Classify Client

This is an optimized version of the classify client endpoint in [Normandy][https://github.com/mozilla/normandy].

Dev instructions

This is a normal Cargo project, so after cloning the repository, you can build and run it with

$ cargo build
$ cargo run

This project should run on the latest stable version of Rust. Unstable features are not allowed.

GeoIP Database

A GeoIP database is required. For development purposes, one can be obtained from the Maxmind website. The GeoLite2 Country database is recommended. It should be placed at the root of the repository.

Tests

Tests can be run with Cargo as well

$ cargo test

Linting

Linting is handled via Therapist. After installing it, enable the git hooks using either therapist install or therapist install --fix. The --fix variant will automatically format your code upon commit. The variant without --fix will simply show an error and ask you to reformat the code using other means before committing. Therapist runs in CI.

The checks Therapist runs are:

  • Rustfmt
  • Clippy, using the clippy::all preset