From 0dbdacc9744936be003f618544c7c2e48d263043 Mon Sep 17 00:00:00 2001 From: Valerian Saliou Date: Tue, 13 Aug 2019 09:08:04 +0300 Subject: [PATCH] Compatibility w/ Rust 1.35-nightly Signed-off-by: Valerian Saliou --- Cargo.lock | 761 ++++++++++++++++++++++------------- Cargo.toml | 7 +- README.md | 2 +- src/config/logger.rs | 2 +- src/config/mod.rs | 2 +- src/config/reader.rs | 7 +- src/exchange/manager.rs | 15 +- src/main.rs | 43 +- src/notifier/email.rs | 23 +- src/responder/asset_file.rs | 9 +- src/responder/auth_guard.rs | 8 +- src/responder/catchers.rs | 4 +- src/responder/context.rs | 7 +- src/responder/manager.rs | 23 +- src/responder/mod.rs | 8 +- src/responder/routes.rs | 461 ++++++++++----------- src/responder/track_guard.rs | 4 +- src/responder/utilities.rs | 103 +++-- src/storage/choices.rs | 13 +- src/storage/db.rs | 8 +- src/storage/mod.rs | 2 +- src/storage/models.rs | 2 +- src/track/payment.rs | 41 +- 23 files changed, 860 insertions(+), 695 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4687407..dfb2ebe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "adler32" version = "1.0.2" @@ -30,11 +32,12 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "arrayvec" -version = "0.4.7" +name = "atty" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -44,9 +47,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -54,8 +57,8 @@ name = "backtrace-sys" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -63,7 +66,7 @@ name = "base64" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -72,7 +75,7 @@ name = "base64" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -81,10 +84,18 @@ name = "base64" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "base64" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bigdecimal" version = "0.0.10" @@ -101,7 +112,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bitflags" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -130,7 +141,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "byteorder" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -138,13 +149,13 @@ name = "bytes" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" -version = "1.0.4" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -166,18 +177,18 @@ name = "clap" version = "2.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cookie" -version = "0.9.2" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -188,7 +199,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -196,7 +207,7 @@ name = "core-foundation-sys" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -208,34 +219,32 @@ dependencies = [ ] [[package]] -name = "crossbeam-deque" +name = "devise" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "devise_codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "crossbeam-epoch" -version = "0.3.0" +name = "devise_codegen" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "crossbeam-utils" -version = "0.2.2" +name = "devise_core" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -244,7 +253,7 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bigdecimal 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "diesel_derives 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "mysqlclient-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -357,7 +366,7 @@ dependencies = [ [[package]] name = "error-chain" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -368,6 +377,16 @@ name = "fake-simd" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "filetime" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "foreign-types" version = "0.3.2" @@ -381,12 +400,29 @@ name = "foreign-types-shared" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "fsevent" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fsevent-sys" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -427,6 +463,11 @@ name = "glob" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "hex" version = "0.2.0" @@ -509,22 +550,34 @@ dependencies = [ ] [[package]] -name = "iovec" -version = "0.1.2" +name = "indexmap" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "inotify" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "isatty" -version = "0.1.6" +name = "inotify-sys" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "iovec" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -538,6 +591,11 @@ name = "itoa" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "itoa" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -559,12 +617,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazy_static" -version = "1.0.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazycell" -version = "0.6.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -578,9 +636,9 @@ dependencies = [ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -597,7 +655,7 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.37" +version = "0.2.61" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -606,7 +664,7 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -627,24 +685,21 @@ dependencies = [ ] [[package]] -name = "matches" -version = "0.1.6" +name = "maplit" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "memchr" -version = "0.1.11" +name = "matches" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "memchr" -version = "1.0.2" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -652,14 +707,9 @@ name = "memchr" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "memoffset" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "mime" version = "0.2.6" @@ -689,22 +739,32 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.13" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mio-extras" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "miow" version = "0.2.1" @@ -731,7 +791,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", "schannel 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -745,14 +805,27 @@ version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "nodrop" -version = "0.1.12" +name = "notify" +version = "4.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "fsevent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "num" @@ -811,7 +884,7 @@ name = "num_cpus" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -821,8 +894,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.27 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -836,29 +909,30 @@ name = "openssl-sys" version = "0.9.27" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "ordermap" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "pear" -version = "0.0.12" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pear_codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "pear_codegen" -version = "0.0.12" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "yansi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -868,8 +942,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "pest" -version = "0.4.1" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ucd-trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pest_derive" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pest_generator 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pest_generator" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pest_meta 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pest_meta" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "phf" @@ -911,11 +1019,27 @@ name = "pkg-config" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "quote" version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "r2d2" version = "0.8.2" @@ -945,7 +1069,7 @@ dependencies = [ "clap 2.30.0 (registry+https://github.com/rust-lang/crates.io-index)", "diesel 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "iso_country 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lettre 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "lettre_email 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -956,15 +1080,14 @@ dependencies = [ "r2d2-diesel 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket_codegen 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket_contrib 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_contrib 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "separator 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "validate 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -975,7 +1098,7 @@ version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -985,28 +1108,8 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rayon" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rayon-core" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1014,14 +1117,6 @@ name = "redox_syscall" version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "redox_termios" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "regex" version = "0.1.80" @@ -1036,13 +1131,13 @@ dependencies = [ [[package]] name = "regex" -version = "0.2.6" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1053,7 +1148,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex-syntax" -version = "0.4.2" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1087,8 +1182,8 @@ dependencies = [ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1099,62 +1194,76 @@ dependencies = [ [[package]] name = "ring" -version = "0.11.0" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rocket" -version = "0.3.6" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cookie 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", - "isatty 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ordermap 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "pear 0.0.12 (registry+https://github.com/rust-lang/crates.io-index)", - "pear_codegen 0.0.12 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "state 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_http 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "yansi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rocket_codegen" -version = "0.3.6" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "yansi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket_http 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rocket_contrib" -version = "0.3.6" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rocket 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tera 0.10.10 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "notify 4.0.12 (registry+https://github.com/rust-lang/crates.io-index)", + "rocket 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "tera 0.11.20 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rocket_http" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1163,7 +1272,7 @@ version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1187,18 +1296,31 @@ dependencies = [ "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ryu" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "safemem" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "same-file" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "schannel" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1214,11 +1336,6 @@ name = "scoped-tls" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "scopeguard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "security-framework" version = "0.1.16" @@ -1226,7 +1343,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1236,7 +1353,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1251,7 +1368,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.27" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1275,13 +1392,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.10" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1291,10 +1407,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sha-1" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "sha2" version = "0.7.0" @@ -1336,12 +1463,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.4.4" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "state" -version = "0.3.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1354,6 +1481,16 @@ dependencies = [ "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "synom" version = "0.11.3" @@ -1378,32 +1515,24 @@ dependencies = [ [[package]] name = "tera" -version = "0.10.10" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "pest 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unic-segment 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "termion" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "textwrap" version = "0.9.0" @@ -1418,7 +1547,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1431,11 +1560,10 @@ dependencies = [ [[package]] name = "thread_local" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1443,9 +1571,9 @@ name = "time" version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1457,7 +1585,7 @@ dependencies = [ "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1511,10 +1639,10 @@ dependencies = [ [[package]] name = "toml" -version = "0.4.5" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1532,6 +1660,55 @@ name = "typenum" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "ucd-trie" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unic-char-property" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unic-char-range 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unic-char-range" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unic-common" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unic-segment" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unic-ucd-segment 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unic-ucd-segment" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unic-char-property 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unic-char-range 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unic-ucd-version 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unic-ucd-version" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unic-common 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "unicase" version = "1.4.2" @@ -1572,21 +1749,18 @@ version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "unidecode" -version = "0.2.0" +name = "unicode-xid" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "unreachable" -version = "1.0.0" +name = "unidecode" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "untrusted" -version = "0.5.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1604,7 +1778,7 @@ name = "url_serde" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1645,10 +1819,20 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "void" -version = "1.0.2" +name = "version_check" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "walkdir" +version = "2.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" @@ -1656,7 +1840,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.4" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1673,6 +1857,14 @@ name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -1689,7 +1881,12 @@ dependencies = [ [[package]] name = "yansi" -version = "0.3.4" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "yansi" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] @@ -1698,32 +1895,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4" "checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" "checksum arrayref 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0fd1479b7c29641adbd35ff3b5c293922d696a92f25c8c975da3e0acbc87258f" -"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" +"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" "checksum backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbbf59b1c43eefa8c3ede390fcc36820b4999f7914104015be25025e0d62af2" "checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661" +"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" "checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9" "checksum base64 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5032d51da2741729bfdaeb2664d9b8c6d9fd1e2b90715c660b6def36628499c2" "checksum base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "229d032f1a99302697f10b27167ae6d03d49d032e6a8e2550e8d3fc13356d2b4" "checksum bigdecimal 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "bbe25700d5bafc2f57ee77fb22281e88f231a38431c3abceba0fc716d6f5c5d8" "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" -"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf" +"checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" "checksum block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab" "checksum bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f382711e76b9de6c744cc00d0497baba02fb00a787f088c879f01d09468e32" "checksum build_const 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e90dc84f5e62d2ebe7676b83c22d33b6db8bd27340fb6ffbff0a364efa0cb9c9" "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" -"checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" +"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" "checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" -"checksum cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "deaf9ec656256bb25b404c51ef50097207b9cbb29c933d31f92cae5a8a0ffee0" +"checksum cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "b548a4ee81fccb95919d4e22cfea83c7693ebfd78f0495493178db20b3139da7" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" "checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9" "checksum clap 2.30.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1c07b9257a00f3fc93b7f3c417fc15607ec7a56823bc2c37ec744e266387de5b" -"checksum cookie 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "477eb650753e319be2ae77ec368a58c638f9f0c4d941c39bad95e950fb1d1d0d" +"checksum cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99be24cfcf40d56ed37fd11c2123be833959bbc5bddecb46e1c2e442e15fa3e0" "checksum core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25bfd746d203017f7d5cbd31ee5d8e17f94b6521c7af77ece6c9e4b2d4b16c67" "checksum core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "065a5d7ffdcbc8fa145d6f0746f3555025b9097a9e9cda59f7467abae670c78d" "checksum crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd5d02c0aac6bd68393ed69e00bbc2457f3e89075c6349db7189618dc4ddc1d7" -"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" -"checksum crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "59796cc6cbbdc6bb319161349db0c3250ec73ec7fcb763a51065ec4e2e158552" -"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" +"checksum devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e04ba2d03c5fa0d954c061fc8c9c288badadffc272ebb87679a89846de3ed3" +"checksum devise_codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "066ceb7928ca93a9bedc6d0e612a8a0424048b0ab1f75971b203d01420c055d7" +"checksum devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf41c59b22b5e3ec0ea55c7847e5f358d340f3a8d6d53a5cf4f1564967f96487" "checksum diesel 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925325c57038f2f14c0413bdf6a92ca72acff644959d0a1a9ebf8d19be7e9c01" "checksum diesel_derives 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28e2b2605ac6a3b9a586383f5f8b2b5f1108f07a421ade965b266289d2805e79" "checksum digest 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "00a49051fef47a72c9623101b19bd71924a45cca838826caae3eaa4d00772603" @@ -1737,10 +1935,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" "checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" "checksum encoding_rs 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "98fd0f24d1fb71a4a6b9330c8ca04cbd4e7cc5d846b54ca74ff376bc7c9f798d" -"checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" +"checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +"checksum filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2f8c63033fcba1f51ef744505b3cad42510432b904c062afa67ad7ece008429d" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +"checksum fsevent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6" +"checksum fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0bab5b5e94f5c31fc764ba5dd9ad16568aae5d4825538c01d6bca680c9bf94a7" @@ -1748,6 +1949,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" "checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" +"checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" "checksum hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a22814455d41612f41161581c2883c0c6a1c41852729b17d5ed88f01e153aa" "checksum httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f407128745b78abc95c0ffbe4e5d37427fdc0d45470710cfef8c44522a2e37" "checksum humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" @@ -1755,35 +1957,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum hyper 0.11.21 (registry+https://github.com/rust-lang/crates.io-index)" = "a3a77dea5dccbf32ba4e9ddd7d80a5a3bb3b9f1f3835e18daf5dbea6bee0efbf" "checksum hyper-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c81fa95203e2a6087242c38691a0210f23e9f3f8f944350bd676522132e2985" "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" +"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" +"checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718" +"checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" -"checksum isatty 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8f2a233726c7bb76995cec749d59582e5664823b7245d4970354408f1d79a7a2" "checksum iso_country 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8f23e2560fa74f53c59fe1a83574ce3ab9db3a4d49f06bf61d0ec7e2ab033812" "checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c" +"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" -"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" -"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" +"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" +"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" "checksum lettre 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc9d13c63060ad406d83c6d0b66a0f755b64cbffd0deb47e96326c0f02246b39" "checksum lettre_email 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c261b51f228904adf5797e3365a78c0ee472085c5b5bb423ed63f607152962b6" -"checksum libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)" = "56aebce561378d99a0bb578f8cb15b6114d2a1814a6c7949bbe646d968bb4fa9" +"checksum libc 0.2.61 (registry+https://github.com/rust-lang/crates.io-index)" = "c665266eb592905e8503ba3403020f4b8794d26263f412ca33171600eca9a6fa" "checksum libflate 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "1a429b86418868c7ea91ee50e9170683f47fd9d94f5375438ec86ec3adb74e8e" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" +"checksum maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08cbb6b4fef96b6d77bfc40ec491b1690c779e77b05cd9f07f787ed376fd4c43" "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" "checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -"checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" -"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" "checksum mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e2e00e17be181010a91dbfefb01660b17311059dc8c7f48b9017677721e732bd" "checksum mime_guess 2.0.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130ea3c9c1b65dba905ab5a4d9ac59234a9585c24d135f264e187fe7336febbd" -"checksum mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7da01a5e23070d92d99b1ecd1cd0af36447c6fd44b0fe283c2db199fa136724f" +"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" +"checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum mysqlclient-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "879ce08e38739c54d87b7f8332a476004fe2a095f40a142a36f889779d9942b7" "checksum native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f74dbadc8b43df7864539cedb7bc91345e532fdd913cfdc23ad94f4d2d40fbc0" "checksum net2 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "9044faf1413a1057267be51b5afba8eb1090bd2231c693664aa1db716fe1eae0" -"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" +"checksum notify 4.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "3572d71f13ea8ed41867accd971fd564aa75934cf7a1fae03ddb8c74a8a49943" "checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" "checksum num-bigint 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "81b483ea42927c463e191802e7334556b48e7875297564c0e9951bd3a0ae53e3" "checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" @@ -1794,91 +1999,102 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "a3605c298474a3aa69de92d21139fb5e2a81688d308262359d85cdd0d12a7985" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-sys 0.9.27 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdc5c4a02e69ce65046f1763a0181107038e02176233acb0b3351d7cc588f9" -"checksum ordermap 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b81cf3b8cb96aa0e73bbedfcdc9708d09fec2854ba8d474be4e6f666d7379e8b" -"checksum pear 0.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "b5c2dabd6c1650d9bfac8e46be7b518b31c3885ab4412de1aca330938616c5bd" -"checksum pear_codegen 0.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "df863bb78b3ee6b049278324eea8df6b2553a8db9a3504c0e32cfcc17bc8d18c" +"checksum pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c26d2b92e47063ffce70d3e3b1bd097af121a9e0db07ca38a6cc1cf0cc85ff25" +"checksum pear_codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "336db4a192cc7f54efeb0c4e11a9245394824cc3bcbd37ba3ff51240c35d7a6e" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum pest 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3e2e823a5967bb4cdc6d3e46f47baaf4ecfeae44413a642b74ad44e59e49c7f6" +"checksum pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "933085deae3f32071f135d799d75667b63c8dc1f4537159756e3d4ceab41868c" +"checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" +"checksum pest_generator 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63120576c4efd69615b5537d3d052257328a4ca82876771d6944424ccfd9f646" +"checksum pest_meta 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5a3492a4ed208ffc247adcdcc7ba2a95be3104f58877d0d02f0df39bf3efb5e" "checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc" "checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f" "checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03" "checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2" "checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" +"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" +"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" "checksum r2d2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f9078ca6a8a5568ed142083bb2f7dc9295b69d16f867ddcc9849e51b17d8db46" "checksum r2d2-diesel 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9c29bad92da76d02bc2c020452ebc3a3fe6fa74cfab91e711c43116e4fb1a3" "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" -"checksum rayon 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a77c51c07654ddd93f6cb543c7a849863b03abc7e82591afda6dc8ad4ac3ac4a" -"checksum rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d24ad214285a7729b174ed6d3bcfcb80177807f959d95fafd5bfc5c4f201ac8" "checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" -"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" -"checksum regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5be5347bde0c48cfd8c3fdc0766cdfe9d8a755ef84d620d6794c778c91de8b2b" +"checksum regex 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3d8c9f33201f46669484bacc312b00e7541bed6aaf296dffe2bb4e0ac6b8ce2a" "checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" -"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" +"checksum regex-syntax 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b143cceb2ca5e56d5671988ef8b15615733e7ee16cd348e064333b251b89343f" "checksum relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1576e382688d7e9deecea24417e350d3062d97e32e45d70b1cde65994ff1489a" "checksum remove_dir_all 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5d2f806b0fcdabd98acd380dc8daef485e22bcb7cddc811d1337967f2528cf5" "checksum reqwest 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)" = "241faa9a8ca28a03cbbb9815a5d085f271d4c0168a19181f106aa93240c22ddb" -"checksum ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2a6dc7fc06a05e6de183c5b97058582e9da2de0c136eafe49609769c507724" -"checksum rocket 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "531c93452333bc5a13d3cbd776a8cac299215ba23be1583fdb307fef75ae0516" -"checksum rocket_codegen 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a7ad25afa7baa27347981fc4d450713d1d9f7533fd5a0c4664519fe661bcd827" -"checksum rocket_contrib 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8c65e9bac3d41a9011adb4adccc819ab4a182657eb5cd478fd0e2a3c1eb7dfe" +"checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" +"checksum rocket 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "42c1e9deb3ef4fa430d307bfccd4231434b707ca1328fae339c43ad1201cc6f7" +"checksum rocket_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "79aa1366f9b2eccddc05971e17c5de7bb75a5431eb12c2b5c66545fd348647f4" +"checksum rocket_contrib 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e0fa5c1392135adc0f96a02ba150ac4c765e27c58dbfd32aa40678e948f6e56f" +"checksum rocket_http 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b1391457ee4e80b40d4b57fa5765c0f2836b20d73bcbee4e3f35d93cf3b80817" "checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" "checksum rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11fb43a206a04116ffd7cfcf9bcb941f8eb6cc7ff667272246b0a1c74259a3cb" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" +"checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" +"checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" "checksum schannel 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "acece75e0f987c48863a6c792ec8b7d6c4177d4a027f8ccc72f849794f437016" "checksum scheduled-thread-pool 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a2ff3fc5223829be817806c6441279c676e454cc7da608faf03b0ccc09d3889" "checksum scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f417c22df063e9450888a7561788e9bd46d3bb3c1466435b4eccb903807f147d" -"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum security-framework 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "dfa44ee9c54ce5eecc9de7d5acbad112ee58755239381f687e564004ba4a2332" "checksum security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "5421621e836278a0b139268f36eee0dc7e389b784dc3f79d8f11aabadf41bead" "checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" "checksum separator 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7acc4d818f952ed02e7911df5da8098c8b00a3c5ba2832e035a750b56e8fc32b" -"checksum serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "db99f3919e20faa51bb2996057f5031d8685019b5a06139b1ce761da671b8526" +"checksum serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5626ac617da2f2d9c48af5515a21d5a480dbd151e01bb1c355e26a3e68113" "checksum serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "f4ba7591cfe93755e89eeecdbcc668885624829b020050e6aec99c2a03bd3fd0" "checksum serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e03f1c9530c3fb0a0a5c9b826bdd9246a5921ae995d75f512ac917fc4dd55b5" -"checksum serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "57781ed845b8e742fc2bf306aba8e3b408fe8c366b900e3769fbc39f49eb8b39" +"checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" "checksum serde_urlencoded 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce0fd303af908732989354c6f02e05e2e6d597152870f2c6990efb0577137480" +"checksum sha-1 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51b9d1f3b5de8a167ab06834a7c883bd197f2191e1dda1a22d9ccfeedbf9aded" "checksum sha2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7daca11f2fdb8559c4f6c588386bed5e2ad4b6605c1442935a7f08144a918688" "checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdeff4cd9ecff59ec7e3744cbca73dfe5ac35c2aedb2cfba8a1c715a18912e9d" "checksum slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f5ff4b43cb07b86c5f9236c92714a22cdf9e5a27a7d85e398e2c9403328cb8" "checksum smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c8cbcd6df1e117c2210e13ab5109635ad68a929fcbb8964dc965b76cb5ee013" -"checksum smallvec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ee4f357e8cd37bf8822e1b964e96fd39e2cb5a0424f8aaa284ccaccc2162411c" -"checksum state 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e2fe297055568778ddc83eb1d4292bcdab36bf9e5e7adf4d0ce4ee59caf778d9" +"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" +"checksum state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7345c971d1ef21ffdbd103a75990a15eb03604fc8b8852ca8cb418ee1a099028" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" +"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b157868d8ac1f56b64604539990685fa7611d8fa9e5476cf0c02cf34d32917c5" "checksum tempdir 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f73eebdb68c14bcb24aef74ea96079830e7fa7b31a6106e42ea7ee887c1e134e" -"checksum tera 0.10.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d706c3bec8103f346fc7b8a3887a2ff4195cf704bdbc6307069f32ea8a2b3af5" -"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" +"checksum tera 0.11.20 (registry+https://github.com/rust-lang/crates.io-index)" = "4b505279e19d8f7d24b1a9dc58327c9c36174b1a2c7ebdeac70792d017cb64f3" "checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" "checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" "checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" -"checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" +"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098" "checksum tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "52b4e32d8edbf29501aabb3570f027c6ceb00ccef6538f4bddba0200503e74e8" "checksum tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b9532748772222bf70297ec0e2ad0f17213b4a7dd0e6afb68e0a0768f69f4e4f" "checksum tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fbb47ae81353c63c487030659494b295f6cb6576242f907f203473b191b0389" "checksum tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" "checksum tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "772f4b04e560117fe3b0a53e490c16ddc8ba6ec437015d91fa385564996ed913" -"checksum toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7540f4ffc193e0d3c94121edb19b055670d369f77d5804db11ae053a45b6e7e" +"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" "checksum typenum 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a99dc6780ef33c78780b826cf9d2a78840b72cae9474de4bcaf9051e60ebbd" +"checksum ucd-trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8f00ed7be0c1ff1e24f46c3d2af4859f7e863672ba3a6e92e7cff702bf9f06c2" +"checksum unic-char-property 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce36d3f7ce754afdbccccf8ff0dd0134e50fb44aaae579f96218856e9e5dbd1e" +"checksum unic-char-range 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9ab85fab42ad1b26cafc03bf891f69cb4d6e15f491030e89a0122197baa8ae8" +"checksum unic-common 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8d4a7ade929ef7d971e16ced21a8cd56a63869aa6032dfb8cb083cf7d077bf" +"checksum unic-segment 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9ca47cbb09fb5fcd066b5867d11dc528302fa465277882797d6a836e1ee6f9e" +"checksum unic-ucd-segment 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48f1a08ce0409a9e391b88d1930118eec48af12742fc538bcec55f775865776e" +"checksum unic-ucd-version 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1f5e6c6c53c2d0ece4a5964bc55fcff8602153063cb4fab20958ff32998ff6" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284b6d3db520d67fbe88fd778c21510d1b0ba4a551e5d0fbb023d33405f6de8a" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" "checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" +"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unidecode 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2adb95ee07cd579ed18131f2d9e7a17c25a4b76022935c7f2460d2bfae89fd2" -"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -"checksum untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f392d7819dbe58833e26872f5f6f0d68b7bbbe90fc3667e98731c4a15ad9a7ae" +"checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" "checksum url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f808aadd8cfec6ef90e4a14eb46f24511824d1ac596b9682703c87056c8678b7" "checksum url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e7d099f1ee52f823d4bdd60c93c3602043c728f5db3b97bdb548467f7bddea" "checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" @@ -1887,11 +2103,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum validate 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a1829a754f90168990283a45eda704a117d2bd39db4ef6f6ce8c070f9e30464" "checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b" "checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +"checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" +"checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3" +"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -"checksum yansi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a503e4eea629f145a693c8ed1eddba88b3b9de5171c6ebd0e2820cf82d38f934" +"checksum yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d60c3b48c9cdec42fb06b3b84b5b087405e1fa1c644a1af3930e4dfafe93de48" +"checksum yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" diff --git a/Cargo.toml b/Cargo.toml index 06754bd..fa2b84b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ doc = false [dependencies] log = "0.3" clap = { version = "2.29", default-features = false } -lazy_static = "1.0" +lazy_static = "1.3" sha2 = "0.7" time = "0.1" rand = "0.4" @@ -38,9 +38,8 @@ native-tls = "0.1" openssl-probe = "0.1" lettre = { version = "0.7", features = ["smtp-transport"] } lettre_email = "0.7" -rocket = { version = "0.3", default-features = false } -rocket_codegen = "0.3" -rocket_contrib = { version = "0.3", features = ["tera_templates"] } +rocket = { version = "0.4", features = ["private-cookies"] } +rocket_contrib = { version = "0.4", features = ["tera_templates"] } diesel = { version = "1.1", features = ["mysql", "chrono", "numeric"] } r2d2 = "0.8" r2d2-diesel = "1.0" diff --git a/README.md b/README.md index 8b4f509..5893865 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Raider Raider is easy to integrate in your existing system. You can also customize the dashboard look & feel with templates and styles. It can be used as a self-service affiliates system, for your affiliate users to manage their account, create tracking URLs, review their balance and request for payouts. -_Tested at Rust version: `rust 1.25.0-nightly (8ccab7eed 2018-01-31)`_ +_Tested at Rust version: `rustc 1.35.0-nightly (aa99abeb2 2019-04-14)`_ **🇭🇺 Crafted in Budapest, Hungary.** diff --git a/src/config/logger.rs b/src/config/logger.rs index 1d36c2a..31b9bb1 100644 --- a/src/config/logger.rs +++ b/src/config/logger.rs @@ -5,7 +5,7 @@ // License: Mozilla Public License v2.0 (MPL v2.0) use log; -use log::{LogRecord, LogLevel, LogMetadata, LogLevelFilter, SetLoggerError}; +use log::{LogLevel, LogLevelFilter, LogMetadata, LogRecord, SetLoggerError}; pub struct ConfigLogger; diff --git a/src/config/mod.rs b/src/config/mod.rs index 8717abd..23fd753 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -6,6 +6,6 @@ mod defaults; -pub mod logger; pub mod config; +pub mod logger; pub mod reader; diff --git a/src/config/reader.rs b/src/config/reader.rs index 63f6cc5..080f371 100644 --- a/src/config/reader.rs +++ b/src/config/reader.rs @@ -4,9 +4,9 @@ // Copyright: 2018, Valerian Saliou // License: Mozilla Public License v2.0 (MPL v2.0) +use log; use std::fs::File; use std::io::Read; -use log; use toml; use super::config::*; @@ -21,9 +21,8 @@ impl ConfigReader { let mut file = File::open(&APP_ARGS.config).expect("cannot find config file"); let mut conf = String::new(); - file.read_to_string(&mut conf).expect( - "cannot read config file", - ); + file.read_to_string(&mut conf) + .expect("cannot read config file"); log::debug!("read config file: {}", &APP_ARGS.config); diff --git a/src/exchange/manager.rs b/src/exchange/manager.rs index b03be4e..9521958 100644 --- a/src/exchange/manager.rs +++ b/src/exchange/manager.rs @@ -4,13 +4,13 @@ // Copyright: 2018, Valerian Saliou // License: Mozilla Public License v2.0 (MPL v2.0) -use std::thread; -use std::sync::RwLock; -use std::sync::Arc; -use std::collections::HashMap; -use std::time::Duration; use log; use reqwest::{Client, StatusCode}; +use std::collections::HashMap; +use std::sync::Arc; +use std::sync::RwLock; +use std::thread; +use std::time::Duration; use APP_CONF; @@ -19,7 +19,6 @@ const RETRY_POLL_SECONDS: u64 = 30; lazy_static! { static ref RATES: Arc>> = Arc::new(RwLock::new(HashMap::new())); - static ref HTTP_CLIENT: Client = Client::builder() .timeout(Duration::from_secs(20)) .gzip(true) @@ -46,7 +45,9 @@ fn update_rates() -> Result<(), ()> { let response = HTTP_CLIENT .get(&format!( "{}/api/latest?access_key={}&base={}", - &APP_CONF.exchange.fixer.endpoint, &APP_CONF.exchange.fixer.access_key, &APP_CONF.payout.currency + &APP_CONF.exchange.fixer.endpoint, + &APP_CONF.exchange.fixer.access_key, + &APP_CONF.payout.currency )) .send(); diff --git a/src/main.rs b/src/main.rs index 81e733f..cc9b727 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,8 +4,7 @@ // Copyright: 2018, Valerian Saliou // License: Mozilla Public License v2.0 (MPL v2.0) -#![feature(use_extern_macros, custom_derive, plugin)] -#![plugin(rocket_codegen)] +#![feature(proc_macro_hygiene, decl_macro)] #[macro_use(log)] extern crate log; @@ -17,27 +16,28 @@ extern crate lazy_static; extern crate diesel; #[macro_use] extern crate serde_derive; -extern crate sha2; -extern crate time; -extern crate rand; -extern crate validate; -extern crate toml; +#[macro_use] +extern crate rocket; extern crate base64; -extern crate url_serde; +extern crate bigdecimal; extern crate chrono; -extern crate native_tls; -extern crate openssl_probe; +extern crate iso_country; extern crate lettre; extern crate lettre_email; +extern crate native_tls; +extern crate num_traits; +extern crate openssl_probe; extern crate r2d2; extern crate r2d2_diesel; -extern crate rocket; -extern crate rocket_contrib; +extern crate rand; extern crate reqwest; -extern crate bigdecimal; -extern crate num_traits; +extern crate rocket_contrib; extern crate separator; -extern crate iso_country; +extern crate sha2; +extern crate time; +extern crate toml; +extern crate url_serde; +extern crate validate; mod config; mod exchange; @@ -46,9 +46,9 @@ mod responder; mod storage; mod track; -use std::thread; use std::ops::Deref; use std::str::FromStr; +use std::thread; use std::time::Duration; use clap::{App, Arg}; @@ -68,7 +68,7 @@ pub static THREAD_NAME_EXCHANGE: &'static str = "raider-exchange"; pub static THREAD_NAME_RESPONDER: &'static str = "raider-responder"; macro_rules! gen_spawn_managed { - ($name:expr, $method:ident, $thread_name:ident, $managed_fn:ident) => ( + ($name:expr, $method:ident, $thread_name:ident, $managed_fn:ident) => { fn $method() { log::debug!("spawn managed thread: {}", $name); @@ -93,7 +93,7 @@ macro_rules! gen_spawn_managed { $method(); } } - ) + }; } lazy_static! { @@ -130,13 +130,14 @@ fn make_app_args() -> AppArgs { .get_matches(); // Generate owned app arguments - AppArgs { config: String::from(matches.value_of("config").expect("invalid config value")) } + AppArgs { + config: String::from(matches.value_of("config").expect("invalid config value")), + } } fn ensure_states() { // Ensure all statics are valid (a `deref` is enough to lazily initialize them) - APP_ARGS.deref(); - APP_CONF.deref(); + let (_, _) = (APP_ARGS.deref(), APP_CONF.deref()); // Ensure assets path exists assert_eq!( diff --git a/src/notifier/email.rs b/src/notifier/email.rs index eb5de34..e25ed3a 100644 --- a/src/notifier/email.rs +++ b/src/notifier/email.rs @@ -4,14 +4,16 @@ // Copyright: 2018, Valerian Saliou // License: Mozilla Public License v2.0 (MPL v2.0) -use std::time::Duration; -use log; -use native_tls::TlsConnector; -use lettre::smtp::{ClientSecurity, SmtpTransportBuilder, SmtpTransport, ConnectionReuseParameters}; use lettre::smtp::authentication::Credentials; use lettre::smtp::client::net::ClientTlsParameters; +use lettre::smtp::{ + ClientSecurity, ConnectionReuseParameters, SmtpTransport, SmtpTransportBuilder, +}; use lettre::EmailTransport; use lettre_email::EmailBuilder; +use log; +use native_tls::TlsConnector; +use std::time::Duration; use APP_CONF; @@ -52,9 +54,10 @@ impl EmailNotifier { APP_CONF.email.smtp_username.to_owned(), APP_CONF.email.smtp_password.to_owned(), APP_CONF.email.smtp_encrypt, - ).map(|mut transport| transport.send(&email_message)) - .and(Ok(())) - .or(Err(true)); + ) + .map(|mut transport| transport.send(&email_message)) + .and(Ok(())) + .or(Err(true)); } } @@ -94,10 +97,8 @@ fn acquire_transport( match (smtp_username, smtp_password) { (Some(smtp_username_value), Some(smtp_password_value)) => { - transport_builder = transport_builder.credentials(Credentials::new( - smtp_username_value, - smtp_password_value, - )); + transport_builder = transport_builder + .credentials(Credentials::new(smtp_username_value, smtp_password_value)); } _ => {} } diff --git a/src/responder/asset_file.rs b/src/responder/asset_file.rs index 9d29482..3b96ea8 100644 --- a/src/responder/asset_file.rs +++ b/src/responder/asset_file.rs @@ -5,15 +5,15 @@ // License: Mozilla Public License v2.0 (MPL v2.0) use std::fs::File; -use std::path::{Path, PathBuf}; use std::io; use std::ops::{Deref, DerefMut}; +use std::path::{Path, PathBuf}; use time::{self, Duration}; +use rocket::http::hyper::header::{CacheControl, CacheDirective, Expires, HttpDate}; +use rocket::http::ContentType; use rocket::request::Request; use rocket::response::{self, Responder}; -use rocket::http::ContentType; -use rocket::http::hyper::header::{CacheControl, CacheDirective, Expires, HttpDate}; const ASSETS_EXPIRE_SECONDS: u32 = 10800; @@ -60,8 +60,7 @@ impl<'r> Responder<'r> for AssetFile { ])); response.set_header(Expires(HttpDate( - time::now() + - Duration::seconds(ASSETS_EXPIRE_SECONDS as i64), + time::now() + Duration::seconds(ASSETS_EXPIRE_SECONDS as i64), ))); // Set content type header? diff --git a/src/responder/auth_guard.rs b/src/responder/auth_guard.rs index 19cdfc0..f66e378 100644 --- a/src/responder/auth_guard.rs +++ b/src/responder/auth_guard.rs @@ -5,11 +5,11 @@ // License: Mozilla Public License v2.0 (MPL v2.0) use log; -use rocket::Outcome; -use rocket::http::{Status, Cookies, Cookie}; -use rocket::request::{self, Request, FromRequest}; use rand::{self, Rng}; -use sha2::{Sha256, Digest}; +use rocket::http::{Cookie, Cookies, Status}; +use rocket::request::{self, FromRequest, Request}; +use rocket::Outcome; +use sha2::{Digest, Sha256}; use APP_CONF; diff --git a/src/responder/catchers.rs b/src/responder/catchers.rs index b5948cf..5d8d3bd 100644 --- a/src/responder/catchers.rs +++ b/src/responder/catchers.rs @@ -6,12 +6,12 @@ use rocket::response::Redirect; -#[error(403)] +#[catch(403)] pub fn forbidden() -> Redirect { Redirect::to("/initiate/") } -#[error(410)] +#[catch(410)] pub fn gone() -> Redirect { Redirect::to("/dashboard/") } diff --git a/src/responder/context.rs b/src/responder/context.rs index 456dae3..961130b 100644 --- a/src/responder/context.rs +++ b/src/responder/context.rs @@ -4,8 +4,8 @@ // Copyright: 2018, Valerian Saliou // License: Mozilla Public License v2.0 (MPL v2.0) -use url_serde::SerdeUrl; use separator::FixedPlaceSeparatable; +use url_serde::SerdeUrl; use config::config::ConfigTrackerBanner; use APP_CONF; @@ -25,7 +25,10 @@ lazy_static! { logo_dark_url: APP_CONF.branding.logo_dark_url.to_owned(), custom_html: APP_CONF.branding.custom_html.to_owned(), payout_currency: APP_CONF.payout.currency.to_owned(), - payout_amount_minimum: APP_CONF.payout.amount_minimum.separated_string_with_fixed_place(2), + payout_amount_minimum: APP_CONF + .payout + .amount_minimum + .separated_string_with_fixed_place(2), track_url: APP_CONF.tracker.track_url.to_owned(), track_parameter: APP_CONF.tracker.track_parameter.to_owned(), banners: ConfigContext::map_banners(&APP_CONF.tracker.banner) diff --git a/src/responder/manager.rs b/src/responder/manager.rs index f8ff7b5..dcf1015 100644 --- a/src/responder/manager.rs +++ b/src/responder/manager.rs @@ -8,9 +8,9 @@ use std::collections::HashMap; use rocket; use rocket::config::{Config, Environment}; -use rocket_contrib::Template; +use rocket_contrib::templates::Template; -use super::{routes, catchers}; +use super::{catchers, routes}; use storage::db; use APP_CONF; @@ -42,55 +42,40 @@ pub fn run() { config.set_extras(extras); // Build and run Rocket instance - rocket::custom(config, false) + rocket::custom(config) .mount( "/", routes![ routes::get_index, routes::get_robots, - routes::get_initiate_base, routes::get_initiate_login, - routes::get_initiate_login_args, routes::get_initiate_signup, - routes::get_initiate_signup_args, routes::get_initiate_recover, - routes::get_initiate_recover_args, routes::get_initiate_logout, - routes::get_dashboard_base, routes::get_dashboard_welcome, routes::get_dashboard_trackers, - routes::get_dashboard_trackers_args, routes::get_dashboard_payouts, - routes::get_dashboard_payouts_args, routes::get_dashboard_payouts_partial_payouts, routes::get_dashboard_account, - routes::get_dashboard_account_args, - routes::get_assets_fonts, routes::get_assets_images, routes::get_assets_stylesheets, routes::get_assets_javascripts, - routes::post_initiate_login_form_login, routes::post_initiate_signup_form_signup, routes::post_initiate_recover_form_recover, - routes::post_dashboard_trackers_form_create, routes::post_dashboard_trackers_form_remove, routes::post_dashboard_payouts_form_request, routes::post_dashboard_account_form_account, routes::post_dashboard_account_form_payout, - routes::post_track_payment, routes::post_track_signup, ], ) - .catch(errors![ - catchers::forbidden, - catchers::gone, - ]) + .register(catchers![catchers::forbidden, catchers::gone,]) .attach(Template::fairing()) .manage(db::pool()) .launch(); diff --git a/src/responder/mod.rs b/src/responder/mod.rs index d7be709..8c64e99 100644 --- a/src/responder/mod.rs +++ b/src/responder/mod.rs @@ -4,12 +4,12 @@ // Copyright: 2018, Valerian Saliou // License: Mozilla Public License v2.0 (MPL v2.0) -mod context; -mod routes; -mod catchers; -mod utilities; mod asset_file; mod auth_guard; +mod catchers; +mod context; +mod routes; mod track_guard; +mod utilities; pub mod manager; diff --git a/src/responder/routes.rs b/src/responder/routes.rs index 155d155..fb83e5d 100644 --- a/src/responder/routes.rs +++ b/src/responder/routes.rs @@ -4,67 +4,67 @@ // Copyright: 2018, Valerian Saliou // License: Mozilla Public License v2.0 (MPL v2.0) -use std::path::PathBuf; -use std::collections::HashSet; -use log; -use chrono::offset::Utc; -use validate::rules::email as validate_email; -use separator::{Separatable, FixedPlaceSeparatable}; use bigdecimal::BigDecimal; -use num_traits::cast::ToPrimitive; +use chrono::offset::Utc; +use diesel; +use diesel::dsl::{count, max, sum}; +use diesel::prelude::*; use iso_country::data::all as countries; +use log; +use num_traits::cast::ToPrimitive; use rand::{self, Rng}; -use rocket::error::Error as RocketError; -use rocket::response::{Redirect, Failure}; -use rocket::request::{Form, FromForm, FormItems, FromFormValue}; use rocket::http::{Cookies, Status}; -use rocket_contrib::{Template, Json}; -use diesel; -use diesel::prelude::*; -use diesel::dsl::{sum, count, max}; +use rocket::request::{Form, FormItems, FromForm, FromFormValue}; +use rocket::response::Redirect; +use rocket_contrib::json::Json; +use rocket_contrib::templates::Template; +use separator::{FixedPlaceSeparatable, Separatable}; +use std::collections::HashSet; +use std::path::PathBuf; +use validate::rules::email as validate_email; -use super::context::{CONFIG_CONTEXT, ConfigContext}; use super::asset_file::AssetFile; -use super::auth_guard::{AuthGuard, AuthAnonymousGuard, cleanup as auth_cleanup, - insert as auth_insert, password_verify as auth_password_verify, - password_encode as auth_password_encode, - password_policy_check as auth_password_policy_check, - recovery_generate as auth_recovery_generate}; +use super::auth_guard::{ + cleanup as auth_cleanup, insert as auth_insert, password_encode as auth_password_encode, + password_policy_check as auth_password_policy_check, password_verify as auth_password_verify, + recovery_generate as auth_recovery_generate, AuthAnonymousGuard, AuthGuard, +}; +use super::context::{ConfigContext, CONFIG_CONTEXT}; use super::track_guard::TrackGuard; -use super::utilities::{get_balance, get_balance_string, list_payouts, check_argument_value, - send_payout_emails}; -use track::payment::{handle_payment as track_handle_payment, handle_signup as track_handle_signup, - run_notify_payment as track_run_notify_payment, - HandlePaymentError as TrackHandlePaymentError, - HandleSignupError as TrackHandleSignupError}; +use super::utilities::{ + check_argument_value, get_balance, get_balance_string, list_payouts, send_payout_emails, +}; use notifier::email::EmailNotifier; -use storage::db::DbConn; -use storage::schemas::account::dsl::{account, id as account_id, email as account_email, - password as account_password, recovery as account_recovery, - commission as account_commission, - full_name as account_full_name, address as account_address, - country as account_country, - payout_method as account_payout_method, - payout_instructions as account_payout_instructions, - notify_balance as account_notify_balance, - created_at as account_created_at, - updated_at as account_updated_at}; -use storage::schemas::payout::dsl::{payout, id as payout_id, amount as payout_amount, - number as payout_number, currency as payout_currency, - account_id as payout_account_id, - created_at as payout_created_at, - updated_at as payout_updated_at}; -use storage::schemas::tracker::dsl::{tracker, id as tracker_id, label as tracker_label, - account_id as tracker_account_id, - created_at as tracker_created_at, - updated_at as tracker_updated_at}; -use storage::schemas::balance::dsl::{balance, amount as balance_amount, - released as balance_released, - account_id as balance_account_id, - tracker_id as balance_tracker_id, - updated_at as balance_updated_at}; -use storage::models::{Account, Tracker, AccountRecoveryUpdate}; use storage::choices::ACCOUNT_PAYOUT_METHODS; +use storage::db::DbConn; +use storage::models::{Account, AccountRecoveryUpdate, Tracker}; +use storage::schemas::account::dsl::{ + account, address as account_address, commission as account_commission, + country as account_country, created_at as account_created_at, email as account_email, + full_name as account_full_name, id as account_id, notify_balance as account_notify_balance, + password as account_password, payout_instructions as account_payout_instructions, + payout_method as account_payout_method, recovery as account_recovery, + updated_at as account_updated_at, +}; +use storage::schemas::balance::dsl::{ + account_id as balance_account_id, amount as balance_amount, balance, + released as balance_released, tracker_id as balance_tracker_id, + updated_at as balance_updated_at, +}; +use storage::schemas::payout::dsl::{ + account_id as payout_account_id, amount as payout_amount, created_at as payout_created_at, + currency as payout_currency, id as payout_id, number as payout_number, payout, + updated_at as payout_updated_at, +}; +use storage::schemas::tracker::dsl::{ + account_id as tracker_account_id, created_at as tracker_created_at, id as tracker_id, + label as tracker_label, tracker, updated_at as tracker_updated_at, +}; +use track::payment::{ + handle_payment as track_handle_payment, handle_signup as track_handle_signup, + run_notify_payment as track_run_notify_payment, HandlePaymentError as TrackHandlePaymentError, + HandleSignupError as TrackHandleSignupError, +}; use APP_CONF; #[derive(FromForm)] @@ -243,24 +243,27 @@ const TRACKERS_PER_ACCOUNT_MAXIMUM: i64 = 100; impl DashboardCommonContext { fn build(db: &DbConn, user_id: i32) -> DashboardCommonContext { - DashboardCommonContext { balance_pending: get_balance_string(db, user_id, Some(false)) } + DashboardCommonContext { + balance_pending: get_balance_string(db, user_id, Some(false)), + } } } impl<'f> FromForm<'f> for DashboardTrackersFormRemoveData { - type Error = RocketError; + type Error = (); fn from_form(form_items: &mut FormItems<'f>, _: bool) -> Result { - let mut update = DashboardTrackersFormRemoveData { trackers: HashSet::new() }; + let mut update = DashboardTrackersFormRemoveData { + trackers: HashSet::new(), + }; - for (k, v) in form_items { - let key: &str = &*k; - let value = String::from_form_value(v).or(Err(RocketError::BadParse))?; + for form_item in form_items { + let value = String::from_form_value(form_item.value).or(Err(()))?; - match key { + match form_item.key.as_str() { "tracker" => update.trackers.insert(value), _ => { - return Err(RocketError::BadParse); + return Err(()); } }; } @@ -270,22 +273,17 @@ impl<'f> FromForm<'f> for DashboardTrackersFormRemoveData { } #[get("/")] -fn get_index(_anon: AuthAnonymousGuard) -> Redirect { +pub fn get_index(_anon: AuthAnonymousGuard) -> Redirect { Redirect::found("/initiate/") } #[get("/initiate")] -fn get_initiate_base(_anon: AuthAnonymousGuard) -> Redirect { +pub fn get_initiate_base(_anon: AuthAnonymousGuard) -> Redirect { Redirect::found("/initiate/login/") } -#[get("/initiate/login")] -fn get_initiate_login(anon: AuthAnonymousGuard) -> Template { - get_initiate_login_args(anon, InitiateArgs { result: None }) -} - -#[get("/initiate/login?")] -fn get_initiate_login_args(_anon: AuthAnonymousGuard, args: InitiateArgs) -> Template { +#[get("/initiate/login?")] +pub fn get_initiate_login(_anon: AuthAnonymousGuard, args: Form) -> Template { Template::render( "initiate_login", &LoginContext { @@ -296,31 +294,29 @@ fn get_initiate_login_args(_anon: AuthAnonymousGuard, args: InitiateArgs) -> Tem } #[post("/initiate/login/form/login", data = "")] -fn post_initiate_login_form_login( +pub fn post_initiate_login_form_login( _anon: AuthAnonymousGuard, cookies: Cookies, db: DbConn, data: Form, ) -> Redirect { - let data_inner = data.get(); - - if data_inner.email.is_empty() == false && data_inner.password.is_empty() == false && - validate_email().validate(&data_inner.email).is_ok() == true && - auth_password_policy_check(&data_inner.password) == true + if data.email.is_empty() == false + && data.password.is_empty() == false + && validate_email().validate(&data.email).is_ok() == true + && auth_password_policy_check(&data.password) == true { let account_result = account - .filter(account_email.eq(&data_inner.email)) + .filter(account_email.eq(&data.email)) .first::(&*db); match account_result { Ok(result) => { - let mut is_auth_valid = - auth_password_verify(&result.password, &data_inner.password); + let mut is_auth_valid = auth_password_verify(&result.password, &data.password); // Attempt to check recovery password? if is_auth_valid == false { if let Some(ref recovery) = result.recovery { - is_auth_valid = auth_password_verify(recovery, &data_inner.password); + is_auth_valid = auth_password_verify(recovery, &data.password); } } @@ -330,7 +326,9 @@ fn post_initiate_login_form_login( if result.recovery.is_some() == true { let recovery_update = diesel::update(account.filter(account_id.eq(result.id))) - .set(&AccountRecoveryUpdate { recovery: Vec::new() }) + .set(&AccountRecoveryUpdate { + recovery: Vec::new(), + }) .execute(&*db); match recovery_update { @@ -354,13 +352,8 @@ fn post_initiate_login_form_login( Redirect::to("/initiate/login/?result=failure") } -#[get("/initiate/signup")] -fn get_initiate_signup(anon: AuthAnonymousGuard) -> Template { - get_initiate_signup_args(anon, InitiateArgs { result: None }) -} - -#[get("/initiate/signup?")] -fn get_initiate_signup_args(_anon: AuthAnonymousGuard, args: InitiateArgs) -> Template { +#[get("/initiate/signup?")] +pub fn get_initiate_signup(_anon: AuthAnonymousGuard, args: Form) -> Template { Template::render( "initiate_signup", &SignupContext { @@ -371,30 +364,25 @@ fn get_initiate_signup_args(_anon: AuthAnonymousGuard, args: InitiateArgs) -> Te } #[post("/initiate/signup/form/signup", data = "")] -fn post_initiate_signup_form_signup( +pub fn post_initiate_signup_form_signup( _anon: AuthAnonymousGuard, cookies: Cookies, db: DbConn, data: Form, ) -> Redirect { - let data_inner = data.get(); - - if data_inner.email.is_empty() == false && data_inner.password.is_empty() == false && - validate_email().validate(&data_inner.email).is_ok() == true && - data_inner.password == data_inner.password_repeat && - auth_password_policy_check(&data_inner.password) == true + if data.email.is_empty() == false + && data.password.is_empty() == false + && validate_email().validate(&data.email).is_ok() == true + && data.password == data.password_repeat + && auth_password_policy_check(&data.password) == true { let now_date = Utc::now().naive_utc(); let insert_result = diesel::insert_into(account) .values(( - &account_email.eq(&data_inner.email), - &account_password.eq( - &auth_password_encode(&data_inner.password), - ), - &account_commission.eq(BigDecimal::from( - APP_CONF.tracker.commission_default, - )), + &account_email.eq(&data.email), + &account_password.eq(&auth_password_encode(&data.password)), + &account_commission.eq(BigDecimal::from(APP_CONF.tracker.commission_default)), &account_created_at.eq(&now_date), &account_updated_at.eq(&now_date), )) @@ -402,7 +390,7 @@ fn post_initiate_signup_form_signup( if insert_result.is_ok() == true { let account_result = account - .filter(account_email.eq(&data_inner.email)) + .filter(account_email.eq(&data.email)) .first::(&*db); match account_result { @@ -422,13 +410,8 @@ fn post_initiate_signup_form_signup( Redirect::to("/initiate/signup/?result=failure") } -#[get("/initiate/recover")] -fn get_initiate_recover(anon: AuthAnonymousGuard) -> Template { - get_initiate_recover_args(anon, InitiateArgs { result: None }) -} - -#[get("/initiate/recover?")] -fn get_initiate_recover_args(_anon: AuthAnonymousGuard, args: InitiateArgs) -> Template { +#[get("/initiate/recover?")] +pub fn get_initiate_recover(_anon: AuthAnonymousGuard, args: Form) -> Template { Template::render( "initiate_recover", &RecoverContext { @@ -440,18 +423,14 @@ fn get_initiate_recover_args(_anon: AuthAnonymousGuard, args: InitiateArgs) -> T } #[post("/initiate/recover/form/recover", data = "")] -fn post_initiate_recover_form_recover( +pub fn post_initiate_recover_form_recover( _anon: AuthAnonymousGuard, db: DbConn, data: Form, ) -> Redirect { - let data_inner = data.get(); - - if data_inner.email.is_empty() == false && - validate_email().validate(&data_inner.email).is_ok() == true - { + if data.email.is_empty() == false && validate_email().validate(&data.email).is_ok() == true { let result = account - .filter(account_email.eq(&data_inner.email)) + .filter(account_email.eq(&data.email)) .first::(&*db); if let Ok(account_result) = result { @@ -492,7 +471,9 @@ fn post_initiate_recover_form_recover( &account_result.email, "Recover your password".to_string(), &message, - ).is_ok() == true + ) + .is_ok() + == true { return Redirect::to("/initiate/recover/?result=success"); } @@ -504,14 +485,14 @@ fn post_initiate_recover_form_recover( } #[get("/initiate/logout")] -fn get_initiate_logout(_auth: AuthGuard, cookies: Cookies) -> Redirect { +pub fn get_initiate_logout(_auth: AuthGuard, cookies: Cookies) -> Redirect { auth_cleanup(cookies); Redirect::to("/initiate/") } #[get("/dashboard")] -fn get_dashboard_base(auth: AuthGuard, db: DbConn) -> Redirect { +pub fn get_dashboard_base(auth: AuthGuard, db: DbConn) -> Redirect { let tracker_count_result = tracker .filter(tracker_account_id.eq(auth.0)) .select(count(tracker_id)) @@ -525,7 +506,7 @@ fn get_dashboard_base(auth: AuthGuard, db: DbConn) -> Redirect { } #[get("/dashboard/welcome")] -fn get_dashboard_welcome(auth: AuthGuard, db: DbConn) -> Template { +pub fn get_dashboard_welcome(auth: AuthGuard, db: DbConn) -> Template { let account_result = account.filter(account_id.eq(auth.0)).first::(&*db); let tracker_count_result = tracker @@ -550,44 +531,41 @@ fn get_dashboard_welcome(auth: AuthGuard, db: DbConn) -> Template { ) } -#[get("/dashboard/trackers")] -fn get_dashboard_trackers(auth: AuthGuard, db: DbConn) -> Template { - get_dashboard_trackers_args(auth, db, DashboardArgs { result: None }) -} - -#[get("/dashboard/trackers?")] -fn get_dashboard_trackers_args(auth: AuthGuard, db: DbConn, args: DashboardArgs) -> Template { +#[get("/dashboard/trackers?")] +pub fn get_dashboard_trackers(auth: AuthGuard, db: DbConn, args: Form) -> Template { let mut trackers = Vec::new(); tracker .filter(tracker_account_id.eq(auth.0)) .order(tracker_label.asc()) .load::(&*db) - .map(|results| for result in results { - log::debug!("got tracker: {:?}", result); - - let total_earned: Option = balance - .filter(balance_account_id.eq(auth.0)) - .filter(balance_tracker_id.eq(&result.id)) - .select(sum(balance_amount)) - .first(&*db) - .ok() - .and_then(|value: Option| if let Some(value_inner) = - value - { - value_inner.to_f32() - } else { - None + .map(|results| { + for result in results { + log::debug!("got tracker: {:?}", result); + + let total_earned: Option = balance + .filter(balance_account_id.eq(auth.0)) + .filter(balance_tracker_id.eq(&result.id)) + .select(sum(balance_amount)) + .first(&*db) + .ok() + .and_then(|value: Option| { + if let Some(value_inner) = value { + value_inner.to_f32() + } else { + None + } + }); + + trackers.push(DashboardTrackersContextTracker { + tracking_id: result.id, + label: result.label, + statistics_signups: result.statistics_signups.separated_string(), + total_earned: total_earned + .unwrap_or(0.0) + .separated_string_with_fixed_place(2), }); - - trackers.push(DashboardTrackersContextTracker { - tracking_id: result.id, - label: result.label, - statistics_signups: result.statistics_signups.separated_string(), - total_earned: total_earned - .unwrap_or(0.0) - .separated_string_with_fixed_place(2), - }); + } }) .ok(); @@ -607,13 +585,11 @@ fn get_dashboard_trackers_args(auth: AuthGuard, db: DbConn, args: DashboardArgs) } #[post("/dashboard/trackers/form/create", data = "")] -fn post_dashboard_trackers_form_create( +pub fn post_dashboard_trackers_form_create( auth: AuthGuard, db: DbConn, data: Form, ) -> Redirect { - let data_inner = data.get(); - let now_date = Utc::now().naive_utc(); let new_tracker_id = rand::thread_rng() .gen_ascii_chars() @@ -630,7 +606,7 @@ fn post_dashboard_trackers_form_create( let result = diesel::insert_into(tracker) .values(( &tracker_id.eq(&new_tracker_id), - &tracker_label.eq(&data_inner.name), + &tracker_label.eq(&data.name), &tracker_account_id.eq(&auth.0), &tracker_created_at.eq(&now_date), &tracker_updated_at.eq(&now_date), @@ -641,7 +617,7 @@ fn post_dashboard_trackers_form_create( log::debug!( "created tracker: {} named: {} for user_id: {}", new_tracker_id, - data_inner.name, + data.name, auth.0 ); @@ -650,7 +626,7 @@ fn post_dashboard_trackers_form_create( Err(()) }; - Redirect::to(&format!( + Redirect::to(format!( "/dashboard/trackers/?result={}", if insert_result.is_ok() == true { "create_success" @@ -661,16 +637,17 @@ fn post_dashboard_trackers_form_create( } #[post("/dashboard/trackers/form/remove", data = "")] -fn post_dashboard_trackers_form_remove( +pub fn post_dashboard_trackers_form_remove( auth: AuthGuard, db: DbConn, data: Form, ) -> Redirect { - let data_inner = data.get(); - - let delete_result = diesel::delete(tracker.filter(tracker_account_id.eq(auth.0)).filter( - tracker_id.eq_any(&data_inner.trackers), - )).execute(&*db); + let delete_result = diesel::delete( + tracker + .filter(tracker_account_id.eq(auth.0)) + .filter(tracker_id.eq_any(&data.trackers)), + ) + .execute(&*db); let count_updated = delete_result.as_ref().unwrap_or(&0); @@ -680,7 +657,7 @@ fn post_dashboard_trackers_form_remove( auth.0 ); - Redirect::to(&format!( + Redirect::to(format!( "/dashboard/trackers/?result={}", if count_updated > &0 { "remove_success" @@ -692,13 +669,8 @@ fn post_dashboard_trackers_form_remove( )) } -#[get("/dashboard/payouts")] -fn get_dashboard_payouts(auth: AuthGuard, db: DbConn) -> Template { - get_dashboard_payouts_args(auth, db, DashboardArgs { result: None }) -} - -#[get("/dashboard/payouts?")] -fn get_dashboard_payouts_args(auth: AuthGuard, db: DbConn, args: DashboardArgs) -> Template { +#[get("/dashboard/payouts?")] +pub fn get_dashboard_payouts(auth: AuthGuard, db: DbConn, args: Form) -> Template { let payouts_total = payout .filter(payout_account_id.eq(auth.0)) .select(count(payout_id)) @@ -726,7 +698,7 @@ fn get_dashboard_payouts_args(auth: AuthGuard, db: DbConn, args: DashboardArgs) } #[get("/dashboard/payouts/partial/payouts/")] -fn get_dashboard_payouts_partial_payouts( +pub fn get_dashboard_payouts_partial_payouts( auth: AuthGuard, db: DbConn, page_number: u16, @@ -743,17 +715,20 @@ fn get_dashboard_payouts_partial_payouts( } #[post("/dashboard/payouts/form/request")] -fn post_dashboard_payouts_form_request(auth: AuthGuard, db: DbConn) -> Result { +pub fn post_dashboard_payouts_form_request( + auth: AuthGuard, + db: DbConn, +) -> Result { let account_result = account.filter(account_id.eq(auth.0)).first::(&*db); if let Ok(account_inner) = account_result { let result_code = { // Check if user has all payout details properly configured - if account_inner.full_name.unwrap_or_default().is_empty() || - account_inner.address.unwrap_or_default().is_empty() || - account_inner.country.unwrap_or_default().is_empty() || - account_inner.payout_method.unwrap_or_default().is_empty() || - account_inner + if account_inner.full_name.unwrap_or_default().is_empty() + || account_inner.address.unwrap_or_default().is_empty() + || account_inner.country.unwrap_or_default().is_empty() + || account_inner.payout_method.unwrap_or_default().is_empty() + || account_inner .payout_instructions .unwrap_or_default() .is_empty() @@ -768,22 +743,20 @@ fn post_dashboard_payouts_form_request(auth: AuthGuard, db: DbConn) -> Result>(&*db) - .map(|value| if value.is_none() { Some(0) } else { value }); + let maximum_result = payout + .filter(payout_account_id.eq(auth.0)) + .select(max(payout_number)) + .first::>(&*db) + .map(|value| if value.is_none() { Some(0) } else { value }); match (update_result, maximum_result) { (Ok(_), Ok(Some(maximum_number))) => { @@ -823,25 +796,21 @@ fn post_dashboard_payouts_form_request(auth: AuthGuard, db: DbConn) -> Result Result { - get_dashboard_account_args(auth, db, DashboardArgs { result: None }) -} - -#[get("/dashboard/account?")] -fn get_dashboard_account_args( +#[get("/dashboard/account?")] +pub fn get_dashboard_account( auth: AuthGuard, db: DbConn, - args: DashboardArgs, -) -> Result { + args: Form, +) -> Result { let account_result = account.filter(account_id.eq(auth.0)).first::(&*db); if let Ok(account_inner) = account_result { @@ -874,28 +843,24 @@ fn get_dashboard_account_args( }, )) } else { - Err(Failure(Status::PreconditionFailed)) + Err(Status::PreconditionFailed) } } #[post("/dashboard/account/form/account", data = "")] -fn post_dashboard_account_form_account( +pub fn post_dashboard_account_form_account( auth: AuthGuard, db: DbConn, data: Form, ) -> Redirect { - let data_inner = data.get(); - - let notify_balance_value = data_inner.notify_balance == Some("1".to_string()); + let notify_balance_value = data.notify_balance == Some("1".to_string()); - let update_result = if data_inner.password.is_empty() == false { - if auth_password_policy_check(&data_inner.password) == true { + let update_result = if data.password.is_empty() == false { + if auth_password_policy_check(&data.password) == true { diesel::update(account.filter(account_id.eq(auth.0))) .set(( - account_email.eq(&data_inner.email), - account_password.eq( - &auth_password_encode(&data_inner.password), - ), + account_email.eq(&data.email), + account_password.eq(&auth_password_encode(&data.password)), account_notify_balance.eq(¬ify_balance_value), )) .execute(&*db) @@ -906,7 +871,7 @@ fn post_dashboard_account_form_account( } else { diesel::update(account.filter(account_id.eq(auth.0))) .set(( - account_email.eq(&data_inner.email), + account_email.eq(&data.email), account_notify_balance.eq(¬ify_balance_value), )) .execute(&*db) @@ -921,7 +886,7 @@ fn post_dashboard_account_form_account( auth.0 ); - Redirect::to(&format!( + Redirect::to(format!( "/dashboard/account/?result={}", if count_updated > &0 { "success" @@ -934,22 +899,18 @@ fn post_dashboard_account_form_account( } #[post("/dashboard/account/form/payout", data = "")] -fn post_dashboard_account_form_payout( +pub fn post_dashboard_account_form_payout( auth: AuthGuard, db: DbConn, data: Form, ) -> Redirect { - let data_inner = data.get(); - let update_result = diesel::update(account.filter(account_id.eq(auth.0))) .set(( - account_full_name.eq(&data_inner.full_name), - account_address.eq(&data_inner.address), - account_country.eq(&data_inner.country), - account_payout_method.eq(&data_inner.payout_method), - account_payout_instructions.eq( - &data_inner.payout_instructions, - ), + account_full_name.eq(&data.full_name), + account_address.eq(&data.address), + account_country.eq(&data.country), + account_payout_method.eq(&data.payout_method), + account_payout_instructions.eq(&data.payout_instructions), )) .execute(&*db); @@ -961,7 +922,7 @@ fn post_dashboard_account_form_payout( auth.0 ); - Redirect::to(&format!( + Redirect::to(format!( "/dashboard/account/?result={}", if count_updated > &0 { "success" @@ -973,13 +934,17 @@ fn post_dashboard_account_form_payout( )) } -#[post("/track/payment/", data = "", format = "application/json")] -fn post_track_payment( +#[post( + "/track/payment/", + data = "", + format = "application/json" +)] +pub fn post_track_payment( _auth: TrackGuard, db: DbConn, tracking_id: String, data: Json, -) -> Result<(), Failure> { +) -> Result<(), Status> { match track_handle_payment( &db, &tracking_id, @@ -988,11 +953,13 @@ fn post_track_payment( &data.trace, ) { Ok(results) => { - if let Some((should_notify, - email, - source_tracker_id, - commission_amount, - commission_currency)) = results + if let Some(( + should_notify, + email, + source_tracker_id, + commission_amount, + commission_currency, + )) = results { // Notify user about received commission if should_notify == true { @@ -1007,41 +974,41 @@ fn post_track_payment( Ok(()) } - Err(TrackHandlePaymentError::InvalidAmount) => Err(Failure(Status::BadRequest)), - Err(TrackHandlePaymentError::BadCurrency) => Err(Failure(Status::PreconditionFailed)), - Err(TrackHandlePaymentError::NotFound) => Err(Failure(Status::NotFound)), + Err(TrackHandlePaymentError::InvalidAmount) => Err(Status::BadRequest), + Err(TrackHandlePaymentError::BadCurrency) => Err(Status::PreconditionFailed), + Err(TrackHandlePaymentError::NotFound) => Err(Status::NotFound), } } #[post("/track/signup/")] -fn post_track_signup(_auth: TrackGuard, db: DbConn, tracking_id: String) -> Result<(), Failure> { +pub fn post_track_signup(_auth: TrackGuard, db: DbConn, tracking_id: String) -> Result<(), Status> { match track_handle_signup(&db, &tracking_id) { Ok(_) => Ok(()), - Err(TrackHandleSignupError::NotFound) => Err(Failure(Status::NotFound)), + Err(TrackHandleSignupError::NotFound) => Err(Status::NotFound), } } #[get("/robots.txt")] -fn get_robots() -> Option { +pub fn get_robots() -> Option { AssetFile::open(APP_CONF.assets.path.join("./public/robots.txt")).ok() } #[get("/assets/fonts/")] -fn get_assets_fonts(file: PathBuf) -> Option { +pub fn get_assets_fonts(file: PathBuf) -> Option { AssetFile::open(APP_CONF.assets.path.join("./fonts").join(file)).ok() } #[get("/assets/images/")] -fn get_assets_images(file: PathBuf) -> Option { +pub fn get_assets_images(file: PathBuf) -> Option { AssetFile::open(APP_CONF.assets.path.join("./images").join(file)).ok() } #[get("/assets/stylesheets/")] -fn get_assets_stylesheets(file: PathBuf) -> Option { +pub fn get_assets_stylesheets(file: PathBuf) -> Option { AssetFile::open(APP_CONF.assets.path.join("./stylesheets").join(file)).ok() } #[get("/assets/javascripts/")] -fn get_assets_javascripts(file: PathBuf) -> Option { +pub fn get_assets_javascripts(file: PathBuf) -> Option { AssetFile::open(APP_CONF.assets.path.join("./javascripts").join(file)).ok() } diff --git a/src/responder/track_guard.rs b/src/responder/track_guard.rs index c822b40..680e8a4 100644 --- a/src/responder/track_guard.rs +++ b/src/responder/track_guard.rs @@ -5,9 +5,9 @@ // License: Mozilla Public License v2.0 (MPL v2.0) use base64; -use rocket::Outcome; use rocket::http::Status; -use rocket::request::{self, Request, FromRequest}; +use rocket::request::{self, FromRequest, Request}; +use rocket::Outcome; use APP_CONF; pub struct TrackGuard; diff --git a/src/responder/utilities.rs b/src/responder/utilities.rs index f44a04c..46341d9 100644 --- a/src/responder/utilities.rs +++ b/src/responder/utilities.rs @@ -4,22 +4,25 @@ // Copyright: 2018, Valerian Saliou // License: Mozilla Public License v2.0 (MPL v2.0) -use std::cmp; -use log; -use separator::FixedPlaceSeparatable; use bigdecimal::BigDecimal; -use num_traits::cast::ToPrimitive; -use diesel::prelude::*; use diesel::dsl::sum; +use diesel::prelude::*; +use log; +use num_traits::cast::ToPrimitive; +use separator::FixedPlaceSeparatable; +use std::cmp; use super::routes::DashboardPayoutsContextPayout; use notifier::email::EmailNotifier; -use storage::schemas::balance::dsl::{balance, account_id as balance_account_id, - amount as balance_amount, released as balance_released}; -use storage::schemas::payout::dsl::{payout, account_id as payout_account_id, - created_at as payout_created_at}; -use storage::models::Payout; use storage::db::DbConn; +use storage::models::Payout; +use storage::schemas::balance::dsl::{ + account_id as balance_account_id, amount as balance_amount, balance, + released as balance_released, +}; +use storage::schemas::payout::dsl::{ + account_id as payout_account_id, created_at as payout_created_at, payout, +}; use APP_CONF; const PAYOUTS_LIMIT_PER_PAGE: i64 = 20; @@ -75,30 +78,29 @@ pub fn list_payouts( .limit(PAYOUTS_LIMIT_PER_PAGE + 1) .offset(paging_to_offset(page_number, PAYOUTS_LIMIT_PER_PAGE)) .load::(&**db) - .map(|results| for (index, result) in results - .into_iter() - .enumerate() - { - if (index as i64) < PAYOUTS_LIMIT_PER_PAGE { - log::debug!("got payout #{}: {:?}", index, result); - - let amount_value = result - .amount - .to_f32() - .unwrap_or(0.0) - .separated_string_with_fixed_place(2); - - payouts.push(DashboardPayoutsContextPayout { - number: result.number, - status: result.status, - amount: amount_value, - currency: result.currency, - account: result.account.unwrap_or("".to_string()), - invoice_url: result.invoice_url.unwrap_or("".to_string()), - date: result.created_at.date().format("%d/%m/%Y").to_string(), - }); - } else { - has_more = true; + .map(|results| { + for (index, result) in results.into_iter().enumerate() { + if (index as i64) < PAYOUTS_LIMIT_PER_PAGE { + log::debug!("got payout #{}: {:?}", index, result); + + let amount_value = result + .amount + .to_f32() + .unwrap_or(0.0) + .separated_string_with_fixed_place(2); + + payouts.push(DashboardPayoutsContextPayout { + number: result.number, + status: result.status, + amount: amount_value, + currency: result.currency, + account: result.account.unwrap_or("".to_string()), + invoice_url: result.invoice_url.unwrap_or("".to_string()), + date: result.created_at.date().format("%d/%m/%Y").to_string(), + }); + } else { + has_more = true; + } } }) .ok(); @@ -121,16 +123,11 @@ pub fn send_payout_emails(user_id: i32, user_email: &str, balance_due: f32, curr )); message.push_str("Here are the steps to take:\n\n"); - message.push_str( - " 1. Review the pending payout in the database and accept or refuse it.\n", - ); - message.push_str( - " 2. Generate an invoice and update the database accordingly.\n", - ); + message + .push_str(" 1. Review the pending payout in the database and accept or refuse it.\n"); + message.push_str(" 2. Generate an invoice and update the database accordingly.\n"); message.push_str(" 3. Send the money using user payout details.\n"); - message.push_str( - " 4. Notify the user by email that the payout has been processed.\n", - ); + message.push_str(" 4. Notify the user by email that the payout has been processed.\n"); message.push_str(" 5. Mark the payout as processed in the database."); // Send email @@ -138,7 +135,9 @@ pub fn send_payout_emails(user_id: i32, user_email: &str, balance_due: f32, curr &APP_CONF.payout.administrator_email, "Pending payout request".to_string(), &message, - ).is_ok() == true + ) + .is_ok() + == true { log::debug!( "sent payout request email to administrator on: {}", @@ -165,19 +164,13 @@ pub fn send_payout_emails(user_id: i32, user_email: &str, balance_due: f32, curr balance_due.separated_string_with_fixed_place(2) )); - message.push_str( - "Our team has been notified and will process it as soon as possible. ", - ); - message.push_str( - "The money will then be sent to your registered payout method.", - ); + message.push_str("Our team has been notified and will process it as soon as possible. "); + message.push_str("The money will then be sent to your registered payout method."); // Send email - if EmailNotifier::dispatch( - user_email, - "Payout request submitted".to_string(), - &message, - ).is_ok() == true + if EmailNotifier::dispatch(user_email, "Payout request submitted".to_string(), &message) + .is_ok() + == true { log::debug!("sent payout confirmation email to user on: {}", user_email); } else { diff --git a/src/storage/choices.rs b/src/storage/choices.rs index 3b66d73..3c8d763 100644 --- a/src/storage/choices.rs +++ b/src/storage/choices.rs @@ -4,10 +4,9 @@ // Copyright: 2018, Valerian Saliou // License: Mozilla Public License v2.0 (MPL v2.0) -pub const ACCOUNT_PAYOUT_METHODS: &'static [(&'static str, &'static str)] = - &[ - ("bank", "Bank wire"), - ("paypal", "PayPal"), - ("bitcoin", "Bitcoin"), - ("other", "Other (your instructions)"), - ]; +pub const ACCOUNT_PAYOUT_METHODS: &'static [(&'static str, &'static str)] = &[ + ("bank", "Bank wire"), + ("paypal", "PayPal"), + ("bitcoin", "Bitcoin"), + ("other", "Other (your instructions)"), +]; diff --git a/src/storage/db.rs b/src/storage/db.rs index 4cd668b..ec467c8 100644 --- a/src/storage/db.rs +++ b/src/storage/db.rs @@ -4,15 +4,15 @@ // Copyright: 2018, Valerian Saliou // License: Mozilla Public License v2.0 (MPL v2.0) -use std::time::Duration; -use std::ops::Deref; +use diesel::mysql::MysqlConnection; use log; use r2d2; use r2d2_diesel::ConnectionManager; use rocket::http::Status; use rocket::request::{self, FromRequest}; -use rocket::{Request, State, Outcome}; -use diesel::mysql::MysqlConnection; +use rocket::{Outcome, Request, State}; +use std::ops::Deref; +use std::time::Duration; use APP_CONF; diff --git a/src/storage/mod.rs b/src/storage/mod.rs index 41aaa15..3f895ea 100644 --- a/src/storage/mod.rs +++ b/src/storage/mod.rs @@ -4,7 +4,7 @@ // Copyright: 2018, Valerian Saliou // License: Mozilla Public License v2.0 (MPL v2.0) +pub mod choices; pub mod db; pub mod models; pub mod schemas; -pub mod choices; diff --git a/src/storage/models.rs b/src/storage/models.rs index d9aeb57..375668a 100644 --- a/src/storage/models.rs +++ b/src/storage/models.rs @@ -4,8 +4,8 @@ // Copyright: 2018, Valerian Saliou // License: Mozilla Public License v2.0 (MPL v2.0) -use chrono::naive::NaiveDateTime; use bigdecimal::BigDecimal; +use chrono::naive::NaiveDateTime; use super::schemas::{account, balance, payout, tracker}; diff --git a/src/track/payment.rs b/src/track/payment.rs index 234e496..d8301f6 100644 --- a/src/track/payment.rs +++ b/src/track/payment.rs @@ -4,29 +4,29 @@ // Copyright: 2018, Valerian Saliou // License: Mozilla Public License v2.0 (MPL v2.0) -use std::thread; -use log; +use bigdecimal::BigDecimal; use chrono::offset::Utc; use diesel; use diesel::prelude::*; -use separator::FixedPlaceSeparatable; +use log; use num_traits::ToPrimitive; -use bigdecimal::BigDecimal; +use separator::FixedPlaceSeparatable; +use std::thread; -use notifier::email::EmailNotifier; use exchange::manager::normalize as exchange_normalize; -use storage::schemas::tracker::dsl::{tracker, id as tracker_id, - statistics_signups as tracker_statistics_signups, - updated_at as tracker_updated_at}; -use storage::schemas::account::dsl::account; -use storage::schemas::balance::dsl::{balance, amount as balance_amount, - currency as balance_currency, trace as balance_trace, - account_id as balance_account_id, - tracker_id as balance_tracker_id, - created_at as balance_created_at, - updated_at as balance_updated_at}; -use storage::models::{Account, Tracker}; +use notifier::email::EmailNotifier; use storage::db::DbConn; +use storage::models::{Account, Tracker}; +use storage::schemas::account::dsl::account; +use storage::schemas::balance::dsl::{ + account_id as balance_account_id, amount as balance_amount, balance, + created_at as balance_created_at, currency as balance_currency, trace as balance_trace, + tracker_id as balance_tracker_id, updated_at as balance_updated_at, +}; +use storage::schemas::tracker::dsl::{ + id as tracker_id, statistics_signups as tracker_statistics_signups, tracker, + updated_at as tracker_updated_at, +}; use APP_CONF; pub enum HandlePaymentError { @@ -136,10 +136,7 @@ pub fn handle_signup(db: &DbConn, tracking_id: &str) -> Result<(), HandleSignupE // simplicity as Diesel doesnt seem to provide a way to do an increment in the query. let update_result = diesel::update(tracker.filter(tracker_id.eq(tracking_id))) .set(( - tracker_statistics_signups.eq( - tracker_inner.statistics_signups + - 1, - ), + tracker_statistics_signups.eq(tracker_inner.statistics_signups + 1), tracker_updated_at.eq(Utc::now().naive_utc()), )) .execute(&**db); @@ -201,7 +198,9 @@ fn dispatch_notify_payment( &user_email, "You received commission money".to_string(), &message, - ).is_ok() == true + ) + .is_ok() + == true { log::debug!( "sent balance commission notification email to user on: {}",